System.NullReferenceException ???

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

    System.NullReferenceException ???

    When I close my application, it always gives me this error at line...

    MyBase.Dispose( disposing)

    The error...

    An unhandled exception of type 'System.NullRef erenceException ' occurred in
    system.windows. forms.dll

    Additional information: Object reference not set to an instance of an
    object.


    Here is what I am doing in the form...
    I have a Datagrid on a form. I have a DataSet that I am constantly updating
    the rows with data I am pulling from some webservices.

    Thank you for your help.


  • Michael Murschell

    #2
    Re: System.NullRefe renceException ???

    Oh, I have a Timer (System.Timers. Timer) that runs every 10 seconds that
    calls the sub that updates the DataSet.

    "Michael Murschell" <mmurschell@gon elco.com> wrote in message
    news:elT2CueWEH A.2288@TK2MSFTN GP10.phx.gbl...[color=blue]
    > When I close my application, it always gives me this error at line...
    >
    > MyBase.Dispose( disposing)
    >
    > The error...
    >
    > An unhandled exception of type 'System.NullRef erenceException ' occurred in
    > system.windows. forms.dll
    >
    > Additional information: Object reference not set to an instance of an
    > object.
    >
    >
    > Here is what I am doing in the form...
    > I have a Datagrid on a form. I have a DataSet that I am constantly[/color]
    updating[color=blue]
    > the rows with data I am pulling from some webservices.
    >
    > Thank you for your help.
    >
    >[/color]


    Comment

    • The Grim Reaper

      #3
      Re: System.NullRefe renceException ???

      Make sure you stop the timer before you Close or Dispose the form.
      I'd do this in the Form_Closing Event - just Timer.Stop or Timer.Enabled =
      False.
      If that doesn't help, trace the error back through the call stack using the
      debugging features of the IDE.
      _______________ _______________ __
      The Grim Reaper

      "Michael Murschell" <mmurschell@gon elco.com> wrote in message
      news:%230jVYxeW EHA.556@tk2msft ngp13.phx.gbl.. .[color=blue]
      > Oh, I have a Timer (System.Timers. Timer) that runs every 10 seconds that
      > calls the sub that updates the DataSet.
      >
      > "Michael Murschell" <mmurschell@gon elco.com> wrote in message
      > news:elT2CueWEH A.2288@TK2MSFTN GP10.phx.gbl...[color=green]
      > > When I close my application, it always gives me this error at line...
      > >
      > > MyBase.Dispose( disposing)
      > >
      > > The error...
      > >
      > > An unhandled exception of type 'System.NullRef erenceException ' occurred[/color][/color]
      in[color=blue][color=green]
      > > system.windows. forms.dll
      > >
      > > Additional information: Object reference not set to an instance of an
      > > object.
      > >
      > >
      > > Here is what I am doing in the form...
      > > I have a Datagrid on a form. I have a DataSet that I am constantly[/color]
      > updating[color=green]
      > > the rows with data I am pulling from some webservices.
      > >
      > > Thank you for your help.
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...