Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » thread bug....and fix
Re: thread bug....and fix [message #52177 is a reply to message #52169] Fri, 02 August 2019 11:34 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
aftershock wrote on Wed, 31 July 2019 12:57
It is where I added the lines.
GetExitCodeThread(handle....
handle was 0 in the debugger.
Application Verifier... detected those things.



I mean, what is your code?

Somehow I fail to grasp how calling Wait with NULL handle could have happened.

To be more specific, as long as there is no catastrophic failure of client code, handle can get 0 in 3 ways:

- thread creation fails. Why do you call Wait in that case?
- Detach is called. Why do you call Wait in that case?
- no attempt to start thread (default constructor). Why do you call Wait in that case?

So I am really curious what has happened here. In other words, if above patch is really fixing something, then this requires much more careful investigation because it would mean many things are not what they should be.....

(Ideally, testcase package demonstrating the problem would be welcome).


Mirek

[Updated on: Fri, 02 August 2019 11:40]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Unable to run exe file in windows
Next Topic: ESC macro problem
Goto Forum:
  


Current Time: Thu Apr 25 21:18:11 CEST 2024

Total time taken to generate the page: 0.07423 seconds