System.NullReferenceException

  • Thread starter Thread starter TPI
  • Start date Start date
T

TPI

Helo - I need some help?

This on System.NullReferenceException I have:

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.RunMessageLoopInner(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at ELIPSON.Form1.Main()

Application is working good and goes down - that exeption i caught.

--
Robert Janda
"elPLC" Sp. z o.o.
ul. Henryka Dobrzanskiego 6
33-111 Koszyce Wielkie, Poland
tel./fax +48(014) 623 04 19
GSM 0 603 313 252
e-mail: (e-mail address removed), (e-mail address removed)
www: www.elPLC.pl, www.elPLC.com

"Ten dokument zawiera informacje poufne, które moga byc równiez objete
tajemnica handlowa lub sluzbowa. Jest on przeznaczony do wylacznego uzytku
adresata. Jesli nie sa Panstwo jego adresatem lub jesli otrzymaliscie
Panstwo ten dokument omylkowo, to wszelkie rozpowszechnianie, dystrybucja,
reprodukcja, kopiowanie, publikacja lub wykorzystanie tego dokumentu czy tez
zawartych w nim informacji jest zabronione. Jesli otrzymali Panstwo te
wiadomosc przez pomylke, prosimy o bezzwloczne skontaktowanie sie z nami
oraz usuniecie tej wiadomosci z Panstwa komputera."
 
Without seeing your code or knowing anything about what you are doing,
it is impossible to say.
 
TPI said:
Helo - I need some help?

This on System.NullReferenceException I have:

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.RunMessageLoopInner(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at ELIPSON.Form1.Main()

Application is working good and goes down - that exeption i caught.


We had a crash in our application, with a very similar stack trace. This
hotfix seemed to make it go away:

http://support.microsoft.com/?kbid=899511

Marc
http://nomagichere.blogspot.com
 
Thanks.

I found the reason of the excepion.
I added en event coming from the outside COM object -> OnDisconnected

The object was trying to raise the event when my Form was Disposed.

Thanks again.
 
Back
Top