System.NullReferenceException

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • TPI

    #1

    System.NullReferenceException

    Helo - I need some help?

    This on System.NullRefe renceException I have:

    at System.Windows. Forms.UnsafeNat iveMethods.Disp atchMessageW(MS G& msg)
    at
    System.Windows. Forms.Component Manager.System. Windows.Forms.U nsafeNativeMeth o
    ds+IMsoComponen tManager.FPushM essageLoop(Int3 2 dwComponentID, Int32 reason,
    Int32 pvLoopData)
    at System.Windows. Forms.ThreadCon text.RunMessage LoopInner(Int32 reason,
    ApplicationCont ext context)
    at System.Windows. Forms.ThreadCon text.RunMessage Loop(Int32 reason,
    ApplicationCont ext context)
    at System.Windows. Forms.Applicati on.Run(Form mainForm)
    at ELIPSON.Form1.M ain()

    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: robert.janda@el PLC.com, biuro@elPLC.com
    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 rozpowszechnian ie, 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."


  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: System.NullRefe renceException

    Without seeing your code or knowing anything about what you are doing,
    it is impossible to say.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "TPI" <rt.j@el.com> wrote in message
    news:dnun42$9nf $1@nemesis.news .tpi.pl...[color=blue]
    > Helo - I need some help?
    >
    > This on System.NullRefe renceException I have:
    >
    > at System.Windows. Forms.UnsafeNat iveMethods.Disp atchMessageW(MS G& msg)
    > at
    > System.Windows. Forms.Component Manager.System. Windows.Forms.U nsafeNativeMeth o
    > ds+IMsoComponen tManager.FPushM essageLoop(Int3 2 dwComponentID, Int32
    > reason,
    > Int32 pvLoopData)
    > at System.Windows. Forms.ThreadCon text.RunMessage LoopInner(Int32 reason,
    > ApplicationCont ext context)
    > at System.Windows. Forms.ThreadCon text.RunMessage Loop(Int32 reason,
    > ApplicationCont ext context)
    > at System.Windows. Forms.Applicati on.Run(Form mainForm)
    > at ELIPSON.Form1.M ain()
    >
    > 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: robert.janda@el PLC.com, biuro@elPLC.com
    > 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 rozpowszechnian ie, 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."
    >
    >[/color]


    Comment

    • Marc Bernard

      #3
      Re: System.NullRefe renceException

      "TPI" <rt.j@el.com> wrote in message
      news:dnun42$9nf $1@nemesis.news .tpi.pl...[color=blue]
      > Helo - I need some help?
      >
      > This on System.NullRefe renceException I have:
      >
      > at System.Windows. Forms.UnsafeNat iveMethods.Disp atchMessageW(MS G& msg)
      > at
      > System.Windows. Forms.Component Manager.System. Windows.Forms.U nsafeNativeMeth o
      > ds+IMsoComponen tManager.FPushM essageLoop(Int3 2 dwComponentID, Int32
      > reason,
      > Int32 pvLoopData)
      > at System.Windows. Forms.ThreadCon text.RunMessage LoopInner(Int32 reason,
      > ApplicationCont ext context)
      > at System.Windows. Forms.ThreadCon text.RunMessage Loop(Int32 reason,
      > ApplicationCont ext context)
      > at System.Windows. Forms.Applicati on.Run(Form mainForm)
      > at ELIPSON.Form1.M ain()
      >
      > Application is working good and goes down - that exeption i caught.[/color]


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

      Microsoft Support is here to help you with Microsoft products. Find how-to articles, videos, and training for Microsoft Copilot, Microsoft 365, Windows 11, Surface, and more.


      Marc



      Comment

      • TPI

        #4
        Re: System.NullRefe renceException

        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.


        U¿ytkownik "Marc Bernard" <firstname.last name@agfa.com> napisa³ w wiadomo¶ci
        news:u$tk6mmAGH A.140@TK2MSFTNG P12.phx.gbl...[color=blue]
        > "TPI" <rt.j@el.com> wrote in message
        > news:dnun42$9nf $1@nemesis.news .tpi.pl...[color=green]
        > > Helo - I need some help?
        > >
        > > This on System.NullRefe renceException I have:
        > >
        > > at System.Windows. Forms.UnsafeNat iveMethods.Disp atchMessageW(MS G& msg)
        > > at
        > >[/color][/color]
        System.Windows. Forms.Component Manager.System. Windows.Forms.U nsafeNativeMeth o[color=blue][color=green]
        > > ds+IMsoComponen tManager.FPushM essageLoop(Int3 2 dwComponentID, Int32
        > > reason,
        > > Int32 pvLoopData)
        > > at System.Windows. Forms.ThreadCon text.RunMessage LoopInner(Int32[/color][/color]
        reason,[color=blue][color=green]
        > > ApplicationCont ext context)
        > > at System.Windows. Forms.ThreadCon text.RunMessage Loop(Int32 reason,
        > > ApplicationCont ext context)
        > > at System.Windows. Forms.Applicati on.Run(Form mainForm)
        > > at ELIPSON.Form1.M ain()
        > >
        > > Application is working good and goes down - that exeption i caught.[/color]
        >
        >
        > 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
        >
        >[/color]


        Comment

        Working...