Thread Error: The Handle is Invalid (6)


  • I currently have a process written in c# that when right clicking on an on screen object, it initiates an export to an external web service, opens an small design window via java and then when the export is complete...the small window closes and the appropriate logs are update.


    On occasion this process throws the following exception: "Thread Error: The Handle is Invalid (6)"; I am unable to reproduce on my local machine and the stack trace is not captured. Does anyone have any ideas about this message and is it possible that the response is coming from the destination web service?



    Friday, November 30, 2007 12:08 AM

All replies

  • Hi,


    we also have this error message in our (highly multithreaded) software and I have no clue what action could cause this error.

    The software is written in C++ via Codegear C++ Builder 2007 / VCL and we're using beginthreadex to create threads.


    On experts exchange I found another guy that gets this error when a thread is resumed (I guess from being suspended).

    Today I read in MSDN that synchronizing threads using resume/suspend is NOT recommended (http://msdn.microsoft.com/de-de/library/1c9txz50.aspx), perhaps this has something to do with the problem (but I don't believe that).


    If anyone has an idea about what can cause this error, I'd be happy to hear from her/him.




    Thursday, March 10, 2011 2:27 PM