Object reference not set to an instance of an object error

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

    Object reference not set to an instance of an object error

    I keep getting Object reference not set to an instance of an object error when trying to run my application on an installed client machine. I installed it on several others and it runs fine.

    I tried installing .Net framework 1.1 on the clients machine that is getting the error but the error remains.

    Can anyone provide help?



    Thanks.
  • Marina Levit [MVP]

    #2
    Re: Object reference not set to an instance of an object error

    No, we can't provide help.

    We have no idea where the error is happening, because you haven't told us. You have provided no code, no details, nothing.

    That error could be due to any number of things, and unless we have a lot more information, no one is going to be able to tell you why.
    "bill" <wbeatty@prodig y.net> wrote in message news:W2emg.6995 0$4L1.58978@new ssvr11.news.pro digy.com...
    I keep getting Object reference not set to an instance of an object error when trying to run my application on an installed client machine. I installed it on several others and it runs fine.

    I tried installing .Net framework 1.1 on the clients machine that is getting the error but the error remains.

    Can anyone provide help?



    Thanks.

    Comment

    • bill

      #3
      Re: Object reference not set to an instance of an object error

      See the end of this message for details on invoking
      just-in-time (JIT) debugging instead of this dialog box.

      ************** Exception Text **************
      System.NullRefe renceException: Object reference not set to an instance of an object.
      at FactsImport.For m1.Button1_Clic k(Object sender, EventArgs e)
      at System.Windows. Forms.Control.O nClick(EventArg s e)
      at System.Windows. Forms.Button.On Click(EventArgs e)
      at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs mevent)
      at System.Windows. Forms.Control.W mMouseUp(Messag e& m, MouseButtons button, Int32 clicks)
      at System.Windows. Forms.Control.W ndProc(Message& m)
      at System.Windows. Forms.ButtonBas e.WndProc(Messa ge& m)
      at System.Windows. Forms.Button.Wn dProc(Message& m)
      at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
      at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
      at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


      ************** Loaded Assemblies **************
      mscorlib
      Assembly Version: 1.0.5000.0
      Win32 Version: 1.1.4322.2032
      CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
      ----------------------------------------
      FactsImport
      Assembly Version: 1.0.2362.18225
      Win32 Version: 1.0.2362.18225
      CodeBase: file:///C:/DataImport/FactsImport.exe
      ----------------------------------------
      System.Windows. Forms
      Assembly Version: 1.0.5000.0
      Win32 Version: 1.1.4322.2032
      CodeBase: file:///c:/windows/assembly/gac/system.windows. forms/1.0.5000.0__b77 a5c561934e089/system.windows. forms.dll
      ----------------------------------------
      System
      Assembly Version: 1.0.5000.0
      Win32 Version: 1.1.4322.2032
      CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77 a5c561934e089/system.dll
      ----------------------------------------
      System.Drawing
      Assembly Version: 1.0.5000.0
      Win32 Version: 1.1.4322.2032
      CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03 f5f7f11d50a3a/system.drawing. dll
      ----------------------------------------
      Interop.DTS
      Assembly Version: 2.0.0.0
      Win32 Version: 2.0.0.0
      CodeBase: file:///C:/DataImport/Interop.DTS.DLL
      ----------------------------------------
      Microsoft.Visua lBasic
      Assembly Version: 7.0.5000.0
      Win32 Version: 7.10.6001.4
      CodeBase: file:///c:/windows/assembly/gac/microsoft.visua lbasic/7.0.5000.0__b03 f5f7f11d50a3a/microsoft.visua lbasic.dll
      ----------------------------------------

      ************** JIT Debugging **************
      To enable just in time (JIT) debugging, the config file for this
      application or machine (machine.config ) must have the
      jitDebugging value set in the system.windows. forms section.
      The application must also be compiled with debugging
      enabled.

      For example:

      <configuratio n>
      <system.windows .forms jitDebugging="t rue" />
      </configuration>

      When JIT debugging is enabled, any unhandled exception
      will be sent to the JIT debugger registered on the machine
      rather than being handled by this dialog.



      "Marina Levit [MVP]" <someone@nospam .com> wrote in message news:%23Hw3r2Ul GHA.3740@TK2MSF TNGP02.phx.gbl. ..
      No, we can't provide help.

      We have no idea where the error is happening, because you haven't told us. You have provided no code, no details, nothing.

      That error could be due to any number of things, and unless we have a lot more information, no one is going to be able to tell you why.
      "bill" <wbeatty@prodig y.net> wrote in message news:W2emg.6995 0$4L1.58978@new ssvr11.news.pro digy.com...
      I keep getting Object reference not set to an instance of an object error when trying to run my application on an installed client machine. I installed it on several others and it runs fine.

      I tried installing .Net framework 1.1 on the clients machine that is getting the error but the error remains.

      Can anyone provide help?



      Thanks.

      Comment

      • Marina Levit [MVP]

        #4
        Re: Object reference not set to an instance of an object error

        There is something wrong with the code you have in Button1_Click. Since you didn't post it it's hard to say.

        But somewhere in there, your code is crashing because it is expecting an object, and one isn't there.
        "bill" <wbeatty@prodig y.net> wrote in message news:s2fmg.5497 1$Lm5.18274@new ssvr12.news.pro digy.com...
        See the end of this message for details on invoking
        just-in-time (JIT) debugging instead of this dialog box.

        ************** Exception Text **************
        System.NullRefe renceException: Object reference not set to an instance of an object.
        at FactsImport.For m1.Button1_Clic k(Object sender, EventArgs e)
        at System.Windows. Forms.Control.O nClick(EventArg s e)
        at System.Windows. Forms.Button.On Click(EventArgs e)
        at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs mevent)
        at System.Windows. Forms.Control.W mMouseUp(Messag e& m, MouseButtons button, Int32 clicks)
        at System.Windows. Forms.Control.W ndProc(Message& m)
        at System.Windows. Forms.ButtonBas e.WndProc(Messa ge& m)
        at System.Windows. Forms.Button.Wn dProc(Message& m)
        at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
        at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
        at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


        ************** Loaded Assemblies **************
        mscorlib
        Assembly Version: 1.0.5000.0
        Win32 Version: 1.1.4322.2032
        CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
        ----------------------------------------
        FactsImport
        Assembly Version: 1.0.2362.18225
        Win32 Version: 1.0.2362.18225
        CodeBase: file:///C:/DataImport/FactsImport.exe
        ----------------------------------------
        System.Windows. Forms
        Assembly Version: 1.0.5000.0
        Win32 Version: 1.1.4322.2032
        CodeBase: file:///c:/windows/assembly/gac/system.windows. forms/1.0.5000.0__b77 a5c561934e089/system.windows. forms.dll
        ----------------------------------------
        System
        Assembly Version: 1.0.5000.0
        Win32 Version: 1.1.4322.2032
        CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77 a5c561934e089/system.dll
        ----------------------------------------
        System.Drawing
        Assembly Version: 1.0.5000.0
        Win32 Version: 1.1.4322.2032
        CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03 f5f7f11d50a3a/system.drawing. dll
        ----------------------------------------
        Interop.DTS
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.0.0
        CodeBase: file:///C:/DataImport/Interop.DTS.DLL
        ----------------------------------------
        Microsoft.Visua lBasic
        Assembly Version: 7.0.5000.0
        Win32 Version: 7.10.6001.4
        CodeBase: file:///c:/windows/assembly/gac/microsoft.visua lbasic/7.0.5000.0__b03 f5f7f11d50a3a/microsoft.visua lbasic.dll
        ----------------------------------------

        ************** JIT Debugging **************
        To enable just in time (JIT) debugging, the config file for this
        application or machine (machine.config ) must have the
        jitDebugging value set in the system.windows. forms section.
        The application must also be compiled with debugging
        enabled.

        For example:

        <configuratio n>
        <system.windows .forms jitDebugging="t rue" />
        </configuration>

        When JIT debugging is enabled, any unhandled exception
        will be sent to the JIT debugger registered on the machine
        rather than being handled by this dialog.



        "Marina Levit [MVP]" <someone@nospam .com> wrote in message news:%23Hw3r2Ul GHA.3740@TK2MSF TNGP02.phx.gbl. ..
        No, we can't provide help.

        We have no idea where the error is happening, because you haven't told us. You have provided no code, no details, nothing.

        That error could be due to any number of things, and unless we have a lot more information, no one is going to be able to tell you why.
        "bill" <wbeatty@prodig y.net> wrote in message news:W2emg.6995 0$4L1.58978@new ssvr11.news.pro digy.com...
        I keep getting Object reference not set to an instance of an object error when trying to run my application on an installed client machine. I installed it on several others and it runs fine.

        I tried installing .Net framework 1.1 on the clients machine that is getting the error but the error remains.

        Can anyone provide help?



        Thanks.

        Comment

        • bill

          #5
          Re: Object reference not set to an instance of an object error

          That's funny. The application works fine on my machine and another machine it's installed on.

          "Marina Levit [MVP]" <someone@nospam .com> wrote in message news:%23TpA4YVl GHA.3336@TK2MSF TNGP05.phx.gbl. ..
          There is something wrong with the code you have in Button1_Click. Since you didn't post it it's hard to say.

          But somewhere in there, your code is crashing because it is expecting an object, and one isn't there.
          "bill" <wbeatty@prodig y.net> wrote in message news:s2fmg.5497 1$Lm5.18274@new ssvr12.news.pro digy.com...
          See the end of this message for details on invoking
          just-in-time (JIT) debugging instead of this dialog box.

          ************** Exception Text **************
          System.NullRefe renceException: Object reference not set to an instance of an object.
          at FactsImport.For m1.Button1_Clic k(Object sender, EventArgs e)
          at System.Windows. Forms.Control.O nClick(EventArg s e)
          at System.Windows. Forms.Button.On Click(EventArgs e)
          at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs mevent)
          at System.Windows. Forms.Control.W mMouseUp(Messag e& m, MouseButtons button, Int32 clicks)
          at System.Windows. Forms.Control.W ndProc(Message& m)
          at System.Windows. Forms.ButtonBas e.WndProc(Messa ge& m)
          at System.Windows. Forms.Button.Wn dProc(Message& m)
          at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
          at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
          at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


          ************** Loaded Assemblies **************
          mscorlib
          Assembly Version: 1.0.5000.0
          Win32 Version: 1.1.4322.2032
          CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
          ----------------------------------------
          FactsImport
          Assembly Version: 1.0.2362.18225
          Win32 Version: 1.0.2362.18225
          CodeBase: file:///C:/DataImport/FactsImport.exe
          ----------------------------------------
          System.Windows. Forms
          Assembly Version: 1.0.5000.0
          Win32 Version: 1.1.4322.2032
          CodeBase: file:///c:/windows/assembly/gac/system.windows. forms/1.0.5000.0__b77 a5c561934e089/system.windows. forms.dll
          ----------------------------------------
          System
          Assembly Version: 1.0.5000.0
          Win32 Version: 1.1.4322.2032
          CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77 a5c561934e089/system.dll
          ----------------------------------------
          System.Drawing
          Assembly Version: 1.0.5000.0
          Win32 Version: 1.1.4322.2032
          CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03 f5f7f11d50a3a/system.drawing. dll
          ----------------------------------------
          Interop.DTS
          Assembly Version: 2.0.0.0
          Win32 Version: 2.0.0.0
          CodeBase: file:///C:/DataImport/Interop.DTS.DLL
          ----------------------------------------
          Microsoft.Visua lBasic
          Assembly Version: 7.0.5000.0
          Win32 Version: 7.10.6001.4
          CodeBase: file:///c:/windows/assembly/gac/microsoft.visua lbasic/7.0.5000.0__b03 f5f7f11d50a3a/microsoft.visua lbasic.dll
          ----------------------------------------

          ************** JIT Debugging **************
          To enable just in time (JIT) debugging, the config file for this
          application or machine (machine.config ) must have the
          jitDebugging value set in the system.windows. forms section.
          The application must also be compiled with debugging
          enabled.

          For example:

          <configuratio n>
          <system.windows .forms jitDebugging="t rue" />
          </configuration>

          When JIT debugging is enabled, any unhandled exception
          will be sent to the JIT debugger registered on the machine
          rather than being handled by this dialog.



          "Marina Levit [MVP]" <someone@nospam .com> wrote in message news:%23Hw3r2Ul GHA.3740@TK2MSF TNGP02.phx.gbl. ..
          No, we can't provide help.

          We have no idea where the error is happening, because you haven't told us. You have provided no code, no details, nothing.

          That error could be due to any number of things, and unless we have a lot more information, no one is going to be able to tell you why.
          "bill" <wbeatty@prodig y.net> wrote in message news:W2emg.6995 0$4L1.58978@new ssvr11.news.pro digy.com...
          I keep getting Object reference not set to an instance of an object error when trying to run my application on an installed client machine. I installed it on several others and it runs fine.

          I tried installing .Net framework 1.1 on the clients machine that is getting the error but the error remains.

          Can anyone provide help?



          Thanks.

          Comment

          • Zloth

            #6
            Re: Object reference not set to an instance of an object error

            You might try putting error trapping code in for Button1. Something like this:

            Try
            {all your button1 code}
            Catch Ex as Exception
            Msgbox(ex.Messa ge + vbNewLine + "in: " + ex.StackTrace)
            end try

            The stack trace portion will tell you the line your error is happening on.
            Note you may have to select the All tab at the bottom of your intellisense to
            see the Stacktrace option.

            P.S. You might be able to highlight your code, right click, and select
            "surround with..." to put the try/catch in quickly. Refactor might be needed
            for this.

            Comment

            • Al Reid

              #7
              Re: Object reference not set to an instance of an object error

              Are you creating any objects in Button1_Click? Do you have any error checking in the procedure? Are you checking that the object is not Nothing before using it? You may have a dependency that exists on some machines and not on others. Perhaps your install package is not complete. Without seeing code there is nothing else I can suggest other than to test each object for Nothing before using it and if it is Nothing show a message box with some info that will help you track down the cause.

              --
              Al Reid

              "bill" <wbeatty@prodig y.net> wrote in message news:Gtfmg.5500 8$Lm5.10301@new ssvr12.news.pro digy.com...
              That's funny. The application works fine on my machine and another machine it's installed on.

              "Marina Levit [MVP]" <someone@nospam .com> wrote in message news:%23TpA4YVl GHA.3336@TK2MSF TNGP05.phx.gbl. ..
              There is something wrong with the code you have in Button1_Click. Since you didn't post it it's hard to say.

              But somewhere in there, your code is crashing because it is expecting an object, and one isn't there.
              "bill" <wbeatty@prodig y.net> wrote in message news:s2fmg.5497 1$Lm5.18274@new ssvr12.news.pro digy.com...
              See the end of this message for details on invoking
              just-in-time (JIT) debugging instead of this dialog box.

              ************** Exception Text **************
              System.NullRefe renceException: Object reference not set to an instance of an object.
              at FactsImport.For m1.Button1_Clic k(Object sender, EventArgs e)
              at System.Windows. Forms.Control.O nClick(EventArg s e)
              at System.Windows. Forms.Button.On Click(EventArgs e)
              at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs mevent)
              at System.Windows. Forms.Control.W mMouseUp(Messag e& m, MouseButtons button, Int32 clicks)
              at System.Windows. Forms.Control.W ndProc(Message& m)
              at System.Windows. Forms.ButtonBas e.WndProc(Messa ge& m)
              at System.Windows. Forms.Button.Wn dProc(Message& m)
              at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
              at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
              at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


              ************** Loaded Assemblies **************
              mscorlib
              Assembly Version: 1.0.5000.0
              Win32 Version: 1.1.4322.2032
              CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
              ----------------------------------------
              FactsImport
              Assembly Version: 1.0.2362.18225
              Win32 Version: 1.0.2362.18225
              CodeBase: file:///C:/DataImport/FactsImport.exe
              ----------------------------------------
              System.Windows. Forms
              Assembly Version: 1.0.5000.0
              Win32 Version: 1.1.4322.2032
              CodeBase: file:///c:/windows/assembly/gac/system.windows. forms/1.0.5000.0__b77 a5c561934e089/system.windows. forms.dll
              ----------------------------------------
              System
              Assembly Version: 1.0.5000.0
              Win32 Version: 1.1.4322.2032
              CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77 a5c561934e089/system.dll
              ----------------------------------------
              System.Drawing
              Assembly Version: 1.0.5000.0
              Win32 Version: 1.1.4322.2032
              CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03 f5f7f11d50a3a/system.drawing. dll
              ----------------------------------------
              Interop.DTS
              Assembly Version: 2.0.0.0
              Win32 Version: 2.0.0.0
              CodeBase: file:///C:/DataImport/Interop.DTS.DLL
              ----------------------------------------
              Microsoft.Visua lBasic
              Assembly Version: 7.0.5000.0
              Win32 Version: 7.10.6001.4
              CodeBase: file:///c:/windows/assembly/gac/microsoft.visua lbasic/7.0.5000.0__b03 f5f7f11d50a3a/microsoft.visua lbasic.dll
              ----------------------------------------

              ************** JIT Debugging **************
              To enable just in time (JIT) debugging, the config file for this
              application or machine (machine.config ) must have the
              jitDebugging value set in the system.windows. forms section.
              The application must also be compiled with debugging
              enabled.

              For example:

              <configuratio n>
              <system.windows .forms jitDebugging="t rue" />
              </configuration>

              When JIT debugging is enabled, any unhandled exception
              will be sent to the JIT debugger registered on the machine
              rather than being handled by this dialog.



              "Marina Levit [MVP]" <someone@nospam .com> wrote in message news:%23Hw3r2Ul GHA.3740@TK2MSF TNGP02.phx.gbl. ..
              No, we can't provide help.

              We have no idea where the error is happening, because you haven't told us. You have provided no code, no details, nothing.

              That error could be due to any number of things, and unless we have a lot more information, no one is going to be able to tell you why.
              "bill" <wbeatty@prodig y.net> wrote in message news:W2emg.6995 0$4L1.58978@new ssvr11.news.pro digy.com...
              I keep getting Object reference not set to an instance of an object error when trying to run my application on an installed client machine. I installed it on several others and it runs fine.

              I tried installing .Net framework 1.1 on the clients machine that is getting the error but the error remains.

              Can anyone provide help?



              Thanks.

              Comment

              • Marina Levit [MVP]

                #8
                Re: Object reference not set to an instance of an object error

                That doesn't mean anything. Software often works on one machine but not on another because of an environment difference, etc.

                Like I said, you didn't post the code, so we can't possibly know what is going on.
                "bill" <wbeatty@prodig y.net> wrote in message news:Gtfmg.5500 8$Lm5.10301@new ssvr12.news.pro digy.com...
                That's funny. The application works fine on my machine and another machine it's installed on.

                "Marina Levit [MVP]" <someone@nospam .com> wrote in message news:%23TpA4YVl GHA.3336@TK2MSF TNGP05.phx.gbl. ..
                There is something wrong with the code you have in Button1_Click. Since you didn't post it it's hard to say.

                But somewhere in there, your code is crashing because it is expecting an object, and one isn't there.
                "bill" <wbeatty@prodig y.net> wrote in message news:s2fmg.5497 1$Lm5.18274@new ssvr12.news.pro digy.com...
                See the end of this message for details on invoking
                just-in-time (JIT) debugging instead of this dialog box.

                ************** Exception Text **************
                System.NullRefe renceException: Object reference not set to an instance of an object.
                at FactsImport.For m1.Button1_Clic k(Object sender, EventArgs e)
                at System.Windows. Forms.Control.O nClick(EventArg s e)
                at System.Windows. Forms.Button.On Click(EventArgs e)
                at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs mevent)
                at System.Windows. Forms.Control.W mMouseUp(Messag e& m, MouseButtons button, Int32 clicks)
                at System.Windows. Forms.Control.W ndProc(Message& m)
                at System.Windows. Forms.ButtonBas e.WndProc(Messa ge& m)
                at System.Windows. Forms.Button.Wn dProc(Message& m)
                at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
                at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
                at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


                ************** Loaded Assemblies **************
                mscorlib
                Assembly Version: 1.0.5000.0
                Win32 Version: 1.1.4322.2032
                CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
                ----------------------------------------
                FactsImport
                Assembly Version: 1.0.2362.18225
                Win32 Version: 1.0.2362.18225
                CodeBase: file:///C:/DataImport/FactsImport.exe
                ----------------------------------------
                System.Windows. Forms
                Assembly Version: 1.0.5000.0
                Win32 Version: 1.1.4322.2032
                CodeBase: file:///c:/windows/assembly/gac/system.windows. forms/1.0.5000.0__b77 a5c561934e089/system.windows. forms.dll
                ----------------------------------------
                System
                Assembly Version: 1.0.5000.0
                Win32 Version: 1.1.4322.2032
                CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77 a5c561934e089/system.dll
                ----------------------------------------
                System.Drawing
                Assembly Version: 1.0.5000.0
                Win32 Version: 1.1.4322.2032
                CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03 f5f7f11d50a3a/system.drawing. dll
                ----------------------------------------
                Interop.DTS
                Assembly Version: 2.0.0.0
                Win32 Version: 2.0.0.0
                CodeBase: file:///C:/DataImport/Interop.DTS.DLL
                ----------------------------------------
                Microsoft.Visua lBasic
                Assembly Version: 7.0.5000.0
                Win32 Version: 7.10.6001.4
                CodeBase: file:///c:/windows/assembly/gac/microsoft.visua lbasic/7.0.5000.0__b03 f5f7f11d50a3a/microsoft.visua lbasic.dll
                ----------------------------------------

                ************** JIT Debugging **************
                To enable just in time (JIT) debugging, the config file for this
                application or machine (machine.config ) must have the
                jitDebugging value set in the system.windows. forms section.
                The application must also be compiled with debugging
                enabled.

                For example:

                <configuratio n>
                <system.windows .forms jitDebugging="t rue" />
                </configuration>

                When JIT debugging is enabled, any unhandled exception
                will be sent to the JIT debugger registered on the machine
                rather than being handled by this dialog.



                "Marina Levit [MVP]" <someone@nospam .com> wrote in message news:%23Hw3r2Ul GHA.3740@TK2MSF TNGP02.phx.gbl. ..
                No, we can't provide help.

                We have no idea where the error is happening, because you haven't told us. You have provided no code, no details, nothing.

                That error could be due to any number of things, and unless we have a lot more information, no one is going to be able to tell you why.
                "bill" <wbeatty@prodig y.net> wrote in message news:W2emg.6995 0$4L1.58978@new ssvr11.news.pro digy.com...
                I keep getting Object reference not set to an instance of an object error when trying to run my application on an installed client machine. I installed it on several others and it runs fine.

                I tried installing .Net framework 1.1 on the clients machine that is getting the error but the error remains.

                Can anyone provide help?



                Thanks.

                Comment

                • Cor Ligthert [MVP]

                  #9
                  Re: Object reference not set to an instance of an object error

                  Bill,

                  Are you sure that you have

                  Option Strict On
                  in top of your code page.

                  That prevent binding at runtime.
                  (As far as you are not using remoting what is the same)

                  Cor

                  "bill" <wbeatty@prodig y.net> schreef in bericht news:Gtfmg.5500 8$Lm5.10301@new ssvr12.news.pro digy.com...
                  That's funny. The application works fine on my machine and another machine it's installed on.

                  "Marina Levit [MVP]" <someone@nospam .com> wrote in message news:%23TpA4YVl GHA.3336@TK2MSF TNGP05.phx.gbl. ..
                  There is something wrong with the code you have in Button1_Click. Since you didn't post it it's hard to say.

                  But somewhere in there, your code is crashing because it is expecting an object, and one isn't there.
                  "bill" <wbeatty@prodig y.net> wrote in message news:s2fmg.5497 1$Lm5.18274@new ssvr12.news.pro digy.com...
                  See the end of this message for details on invoking
                  just-in-time (JIT) debugging instead of this dialog box.

                  ************** Exception Text **************
                  System.NullRefe renceException: Object reference not set to an instance of an object.
                  at FactsImport.For m1.Button1_Clic k(Object sender, EventArgs e)
                  at System.Windows. Forms.Control.O nClick(EventArg s e)
                  at System.Windows. Forms.Button.On Click(EventArgs e)
                  at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs mevent)
                  at System.Windows. Forms.Control.W mMouseUp(Messag e& m, MouseButtons button, Int32 clicks)
                  at System.Windows. Forms.Control.W ndProc(Message& m)
                  at System.Windows. Forms.ButtonBas e.WndProc(Messa ge& m)
                  at System.Windows. Forms.Button.Wn dProc(Message& m)
                  at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
                  at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
                  at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


                  ************** Loaded Assemblies **************
                  mscorlib
                  Assembly Version: 1.0.5000.0
                  Win32 Version: 1.1.4322.2032
                  CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
                  ----------------------------------------
                  FactsImport
                  Assembly Version: 1.0.2362.18225
                  Win32 Version: 1.0.2362.18225
                  CodeBase: file:///C:/DataImport/FactsImport.exe
                  ----------------------------------------
                  System.Windows. Forms
                  Assembly Version: 1.0.5000.0
                  Win32 Version: 1.1.4322.2032
                  CodeBase: file:///c:/windows/assembly/gac/system.windows. forms/1.0.5000.0__b77 a5c561934e089/system.windows. forms.dll
                  ----------------------------------------
                  System
                  Assembly Version: 1.0.5000.0
                  Win32 Version: 1.1.4322.2032
                  CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77 a5c561934e089/system.dll
                  ----------------------------------------
                  System.Drawing
                  Assembly Version: 1.0.5000.0
                  Win32 Version: 1.1.4322.2032
                  CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03 f5f7f11d50a3a/system.drawing. dll
                  ----------------------------------------
                  Interop.DTS
                  Assembly Version: 2.0.0.0
                  Win32 Version: 2.0.0.0
                  CodeBase: file:///C:/DataImport/Interop.DTS.DLL
                  ----------------------------------------
                  Microsoft.Visua lBasic
                  Assembly Version: 7.0.5000.0
                  Win32 Version: 7.10.6001.4
                  CodeBase: file:///c:/windows/assembly/gac/microsoft.visua lbasic/7.0.5000.0__b03 f5f7f11d50a3a/microsoft.visua lbasic.dll
                  ----------------------------------------

                  ************** JIT Debugging **************
                  To enable just in time (JIT) debugging, the config file for this
                  application or machine (machine.config ) must have the
                  jitDebugging value set in the system.windows. forms section.
                  The application must also be compiled with debugging
                  enabled.

                  For example:

                  <configuratio n>
                  <system.windows .forms jitDebugging="t rue" />
                  </configuration>

                  When JIT debugging is enabled, any unhandled exception
                  will be sent to the JIT debugger registered on the machine
                  rather than being handled by this dialog.



                  "Marina Levit [MVP]" <someone@nospam .com> wrote in message news:%23Hw3r2Ul GHA.3740@TK2MSF TNGP02.phx.gbl. ..
                  No, we can't provide help.

                  We have no idea where the error is happening, because you haven't told us. You have provided no code, no details, nothing.

                  That error could be due to any number of things, and unless we have a lot more information, no one is going to be able to tell you why.
                  "bill" <wbeatty@prodig y.net> wrote in message news:W2emg.6995 0$4L1.58978@new ssvr11.news.pro digy.com...
                  I keep getting Object reference not set to an instance of an object error when trying to run my application on an installed client machine. I installed it on several others and it runs fine.

                  I tried installing .Net framework 1.1 on the clients machine that is getting the error but the error remains.

                  Can anyone provide help?



                  Thanks.

                  Comment

                  • bill

                    #10
                    Re: Object reference not set to an instance of an object error

                    Thanks to all that responded. I found a solution although it would be
                    better to have this resolved in the deploy package. The application
                    executes a DTS package in a SQL Server environment. I discovered that the
                    machines it worked on have SQL Enterprise Manager installed. So, I
                    installed EM on a machine it didn't work on, then removed EM, leaving the
                    DLLs. Now the application works fine.


                    "Zloth" <Zloth@noemail. noemail> wrote in message
                    news:9CF0699E-292D-4DA3-A056-6187CC8B5072@mi crosoft.com...[color=blue]
                    > You might try putting error trapping code in for Button1. Something like
                    > this:
                    >
                    > Try
                    > {all your button1 code}
                    > Catch Ex as Exception
                    > Msgbox(ex.Messa ge + vbNewLine + "in: " + ex.StackTrace)
                    > end try
                    >
                    > The stack trace portion will tell you the line your error is happening on.
                    > Note you may have to select the All tab at the bottom of your intellisense
                    > to
                    > see the Stacktrace option.
                    >
                    > P.S. You might be able to highlight your code, right click, and select
                    > "surround with..." to put the try/catch in quickly. Refactor might be
                    > needed
                    > for this.[/color]


                    Comment

                    Working...