M
Mats-Erik Grundh
NullReferenceException?
I receive this exception when i run my application:
******** Begin Exception ********
"System.NullReferenceException: Object reference not set
to an instance of an object.
at
System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW
(MSG& msg)
at
System.Windows.Forms.ComponentManager.System.Windows.Forms.
UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop
(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at
System.Windows.Forms.ThreadContext.RunMessageLoopInner
(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop
(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at CO.Win.MainModule.Main() in
C:\CODev\Utveckling\CO\CO.Win\Main.vb:line 128"
******** End Exception ********
It's impossible to find out where in my code its been
fired. I've got try-catch statements everywhere but the
exception appears only in my main module:
try
..
..
Application.Run(startForm)
Catch ex As System.NullReferenceException
End try
There is a datagrid on my form.
Thanks in advanced!
I receive this exception when i run my application:
******** Begin Exception ********
"System.NullReferenceException: Object reference not set
to an instance of an object.
at
System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW
(MSG& msg)
at
System.Windows.Forms.ComponentManager.System.Windows.Forms.
UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop
(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at
System.Windows.Forms.ThreadContext.RunMessageLoopInner
(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop
(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at CO.Win.MainModule.Main() in
C:\CODev\Utveckling\CO\CO.Win\Main.vb:line 128"
******** End Exception ********
It's impossible to find out where in my code its been
fired. I've got try-catch statements everywhere but the
exception appears only in my main module:
try
..
..
Application.Run(startForm)
Catch ex As System.NullReferenceException
End try
There is a datagrid on my form.
Thanks in advanced!