NullReferenceException in WaitForWaitHandle
-
Hi All, My C# - VS2005 Application occasionally gives the NullReferenceException when the application is being debugged in Relase mode. It occurs when the program is left idle in debug mode for a long time around 30min. Any idea why such an error could occur? Please find the call-stack of the error.
System.Windows.Forms.dll!System.Windows.Forms.Control.WaitForWaitHandle(System.Threading.WaitHandle waitHandle = {System.Threading.ManualResetEvent}) + 0x18 bytes System.Windows.Forms.dll!System.Windows.Forms.Control.MarshaledInvoke(System.Windows.Forms.Control caller, System.Delegate method, object[] args, bool synchronous) + 0x36d bytes System.Windows.Forms.dll!System.Windows.Forms.Control.Invoke(System.Delegate method, object[] args) + 0x48 bytes System.Windows.Forms.dll!System.Windows.Forms.WindowsFormsSynchronizationContext.Send(System.Threading.SendOrPostCallback d, object state) + 0x61 bytes System.dll!Microsoft.Win32.SystemEvents.SystemEventInvokeInfo.Invoke(bool checkFinalization = true, object[] args = {Dimensions:[2]}) + 0x68 bytes System.dll!Microsoft.Win32.SystemEvents.RaiseEvent(bool checkFinalization = true, object key = {object}, object[] args = {Dimensions:[2]}) + 0x106 bytes System.dll!Microsoft.Win32.SystemEvents.OnUserPreferenceChanging(int msg, System.IntPtr wParam, System.IntPtr lParam) + 0x6f bytes System.dll!Microsoft.Win32.SystemEvents.WindowProc(System.IntPtr hWnd = 591970, int msg = 8218, System.IntPtr wParam = 47, System.IntPtr lParam = 2201016) + 0x288 bytes
Any help will be great. Arti Gujare