![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Hi John, Do you use .Net1.1 or .Net2.0? ManualResetEvent.Set() method has different implementation under .Net1.1 and 2.0. By reviewing your code logic steps, I did not find anything may cause this exception. Can you provide the detailed stack trace of this exception? Actually, I have searched a lot of internal database and public resource regarding this exception with ManualResetEvent.Set() method, however, I did not find much useful information. It seems that this issue is not a common reported problem. Also, since your code logic steps are not very complex, is it possible for you to create a little sample project to help me reproduce this problem? This will be more efficient for us to debug. I will wait for your further information. Thanks. Best regards, Jeffrey Tan Microsoft Online Community Support ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...ult.aspx#notif ications. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscripti...t/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
#4
| |||
| |||
|
|
Hi, Anyone know why the Set method would throw a System.IO.IOException w/a message of "The handle is invalid."? I have used Windbg to examine the ManualResetEvent object and it appears to be valid (handle > 0 value, safeWaitHandle private var agress w/handle, state of 4) Following outlines how the ManualResetEvent is created and used. ui thread creates obj Event is created in obj ctor object is added to a list ui thread calls WaitOne on event background thread wakes up and uses obj to do some work Set method is called on event when work is complete - >exception is throw here. Thanx jra |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
Hi John, Can you invoke the GetLastError API and see what is the exact error? I created a repro (see attached file) for the steps you outlined below and it seems to work for me on .NET FX 2.0 -- Cheers! Gaurav Khanna ------------------------------------------------------------- WinToolZone - www.wintoolzone.com Inside and Out - www.wintoolzone.com/blog/ ------------------------------------------------------------- This posting is provided "AS IS" with no warranties, and confers no rights. "John Aldrin" <Jrax (AT) newsgroups (DOT) nospam> wrote in message news:56564249-B3E9-4B5F-91A2-F44CF5857E4E (AT) microsoft (DOT) com... Hi, Anyone know why the Set method would throw a System.IO.IOException w/a message of "The handle is invalid."? I have used Windbg to examine the ManualResetEvent object and it appears to be valid (handle > 0 value, safeWaitHandle private var agress w/handle, state of 4) Following outlines how the ManualResetEvent is created and used. ui thread creates obj Event is created in obj ctor object is added to a list ui thread calls WaitOne on event background thread wakes up and uses obj to do some work Set method is called on event when work is complete - >exception is throw here. Thanx jra |
#7
| |||
| |||
|
#8
| |||
| |||
|
|
Hi John, There is no need to call Marshall.GetLastWin32Error now. "The handle is invalid" is actually win32 "0x6" in numeric. To get the attached files in newsgroup, you should use Outlook Express, can not use IE. I have downloaded that sample file and sent an email to you with the file. You may check it in your mailbox. Additionally, if you can create a sample reproduce project, please feel free to send it to me. It would be efficient for us to troubleshoot the root cause with the reproduce project. Thanks. Best regards, Jeffrey Tan Microsoft Online Community Support ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...ult.aspx#notif ications. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscripti...t/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
#9
| |||
| |||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |