RTC Forums
November 24, 2024, 05:10:05 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Login
Register
RTC Forums
>
Subscription
>
Support
>
C++ XE4 and HttpServer - occasional AVs quitting application
Pages: [
1
]
« previous
next »
Print
Author
Topic: C++ XE4 and HttpServer - occasional AVs quitting application (Read 4390 times)
Claudio
Newbie
Posts: 8
C++ XE4 and HttpServer - occasional AVs quitting application
«
on:
September 22, 2013, 01:45:22 PM »
Hi again,
try this:
- drop an HttpServer on a form and set its port to, say, 80
- set Multithreaded = true
- run the application from the IDE for 5 or 10 secs and quit: two or three AVs (may not happen always)
- set Multithreaded = false
- run the application from the IDE for 5 or 10 secs and quit: no AVs at all
All these steps performed without invoking the server from a browser. If you do it, AVs quitting the application are guaranteed to happen.
Seems the multithreading here is the culprit. If you run from the OS, these AVs never happen (or, better, you probably don't see them).
Thank You
Claudio
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: C++ XE4 and HttpServer - occasional AVs quitting application
«
Reply #1 on:
September 22, 2013, 03:49:33 PM »
You need to call StopListenNow on all HttpServer components before any component is destroyed. If you don't, there wil be background threads which are still using the components *after* they are destroyed. That will cause AVs at shutdown.
See
this FAQ topic
.
Best Regards,
Danijel Tkalcec
Logged
Claudio
Newbie
Posts: 8
Re: C++ XE4 and HttpServer - occasional AVs quitting application
«
Reply #2 on:
September 23, 2013, 06:59:12 AM »
Whoops... My bad, sorry.
Thanks for the code snippets.
Claudio
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Dashboard
-----------------------------
=> General
=> 3rd-Party
=> Quick Start
-----------------------------
Subscription
-----------------------------
=> Support
Loading...