|
|
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » Assertion in Debug.cpp:246 "nesting_depth == 0" [BUGS?]
Assertion in Debug.cpp:246 "nesting_depth == 0" [BUGS?] [message #1840] |
Wed, 22 March 2006 16:25 |
hojtsy
Messages: 241 Registered: January 2006 Location: Budapest, Hungary
|
Experienced Member |
|
|
I have an assertion failure in my application while quitting. Assertion is triggered in this method of Core/Debug.cpp:
TimingInspector::~TimingInspector() {
ASSERT(nesting_depth == 0);
I have running timers and threads when I quit. Could this be the reason for this assertion? I am using 603-dev2 on Windows.
[Updated on: Wed, 03 May 2006 19:53] by Moderator Report message to a moderator
|
|
|
|
|
Re: Assertion in Debug.cpp:246 "nesting_depth == 0" [message #1846 is a reply to message #1844] |
Wed, 22 March 2006 20:37 |
|
mirek
Messages: 13980 Registered: November 2005
|
Ultimate Member |
|
|
hojtsy wrote on Wed, 22 March 2006 13:24 | I have threads running on exit because those threads are waiting for very slow HTTP servers to respond (inside library method). Since U++ does not provide thread termination, and I can not notify the library function to stop waiting, I would have to wait for the download attempts to time out, which could be 1 minute. It is not acceptable to wait 1 minute for application termination.
|
Actually, this is quite interesting topic to resolve:
- first, it is IMO impossible to correctly terminate the thread the "hard" way - in C++, many resources would be left allocated. What would indeed be needed is some form of "forced thread exception"... (is that possible)?
- lefts us with "soft" way - somehow signalling to the thread that it should terminate. In "GuiMT" example, I am doing that using active checking of "terminated" state, but that of course is not a very good way...
Any suggestions in this area are welcome!
Quote: |
I am not using TIMING or RTIMING in my application, so they should be in the library.
|
OK, I will run "find in files"
Mirek
[Updated on: Wed, 22 March 2006 20:38] Report message to a moderator
|
|
|
|
Re: Assertion in Debug.cpp:246 "nesting_depth == 0" [message #1848 is a reply to message #1847] |
Thu, 23 March 2006 00:14 |
hojtsy
Messages: 241 Registered: January 2006 Location: Budapest, Hungary
|
Experienced Member |
|
|
I was using XML.
The library function that is running in the threads during exit is the HttpClientGet. I see no other clean way for using the HttpClient than creating own thread for the communication, so that GUI remains responsive.
I guess I could create and pass a progress callback which stops these functions when exit is requested. Then I would need to count active threads somehow: the best solution would be to manage the thread count in the sThreadRoutine library function, instead of attempting to implement this in multiple client apps. Also the Core package could provide a WaitUntilThreadsExit function, which would wait on the semaphor of this thread count. Than I would somehow invoke the WaitUntilThreadsExit function when exit is requested. These desired library features seems to be usefull for practically every MT app.
|
|
|
Goto Forum:
Current Time: Thu May 16 19:12:06 CEST 2024
Total time taken to generate the page: 0.02018 seconds
|
|
|