NullReferenceException in MessageLoop

  • Thread starter Thread starter Jack Wright
  • Start date Start date
J

Jack Wright

Dear All,
I frequently get a NullReferenceException in my application. The
workflow in this case is that it happens only the first time when I
drop-down a combo box and select a value...how do I track this error
and find what is null in the messageloop...will adding IMessageFilter
and using PreFilterMessage help...

Please help...

Exception Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: System.Windows.Forms
StackTrace: at
System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at
System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMetho
ds+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32
reason,
Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.DoEvents()

TALIA

Many Regards
Jack
 
Jack,
Can you post compilable sample that demosntrates the problem? Without it it
is really hard to tell.
 
Back
Top