Announcement

Collapse
No announcement yet.

System.NullReferenceException: Object reference not set to an instance of an object.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    System.NullReferenceException: Object reference not set to an instance of an object.

    Ultrajones

    I have a very frustrating bug. The screenshots are from HS4 but it will also happen in HS3.

    When this error occurs a new device is generated (resulting in a duplicate) and the old one is (in some cases) not longer updated. The ultimate result is that the control of my underfloor heating system stops working correctly for a particular area as temperature and temperature set-point are used in my events.

    It seems like a PI specific issue as I don't see it wit any other PI's.

    Click image for larger version

Name:	Capture - Log.PNG
Views:	56
Size:	126.0 KB
ID:	1383121

    Click image for larger version

Name:	Capture - device.PNG
Views:	78
Size:	174.1 KB
ID:	1383120

    ---
    John

    #2
    I am not sure how this is possible. My code won't create a device unless HomeSeer indicates it doesn't already exist. What device is is being duplicated?
    Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

    Comment


      #3
      Originally posted by Ultrajones View Post
      I am not sure how this is possible. My code won't create a device unless HomeSeer indicates it doesn't already exist. What device is is being duplicated?
      Device 171 is duplicated and a new device 1777 is created. Both devices are a child of ID172 (see below).

      I have more duplicated device, but let use this one as example.

      FYI, I own also your Netatmo3 PI and there this will never happen.

      Device ID 171
      Click image for larger version  Name:	Capture - original.PNG Views:	0 Size:	279.4 KB ID:	1383358

      Device ID 1777
      Click image for larger version  Name:	Capture - new.PNG Views:	0 Size:	378.4 KB ID:	1383359
      ---
      John
      Attached Files

      Comment


        #4
        This is the same issue, but more frustrating.

        Setpoint temperature (device ID 183) is duplicated and device ID 1719 is created. This means that the event is broken in this case.

        Click image for larger version

Name:	Capture temp.PNG
Views:	61
Size:	260.0 KB
ID:	1383361

        Comment


          #5
          Ultrajones
          Today exaclly the same error.
          5/10/2020 07:02:04 SetDeviceValue() Error System.NullReferenceException
          5/10/2020 07:02:04 SetDeviceValue() Error System.NullReferenceException: Object reference not set to an instance of an object.
          at System.Runtime.Remoting.Messaging.LogicalCallContext.Propaga teIncomingHeadersToCallContext(IMessage msg)
          at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(Mess ageData& msgData, Int32 type)
          at HomeSeerAPI.IHSApplication.DeviceValueEx(Int32 dvRef)
          at HSPI_ULTRASMARTTHERMOSTAT3.hspi_devices.SetDeviceValue(Strin g dv_addr, String dv_value)
          Click image for larger version

Name:	Capture netatmo.PNG
Views:	65
Size:	178.2 KB
ID:	1384272

          ---
          John

          Comment


            #6
            John245, were you the one I worked with to develop this plug-in? Whoever it was, they grated me access so I can troubleshoot. Are you willing to do that?
            Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

            Comment


              #7
              Originally posted by Ultrajones View Post
              John245, were you the one I worked with to develop this plug-in? Whoever it was, they grated me access so I can troubleshoot. Are you willing to do that?
              Hi Ultrajones,

              I was the one you worked with to develop the plug-in.

              I send you a PM.

              ---
              John

              Comment


                #8
                I am currently running in debug connected to your account. You have been using the plugin for a while now. Is this error new? If yes, can you attribute it to anything like a newly installed plug-in or HS3 upgrade?
                Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

                Comment


                  #9
                  Originally posted by Ultrajones View Post
                  I am currently running in debug connected to your account. You have been using the plugin for a while now. Is this error new? If yes, can you attribute it to anything like a newly installed plug-in or HS3 upgrade?
                  I have this error for a long time. But as it was mostly not affecting any device in an event I did not pay attention to it.

                  I will set-up a test machine with only this PI running and will start adding PI's.

                  ---
                  John

                  Comment


                    #10
                    Have you always run the plug-in on a Raspberry Pi?
                    Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

                    Comment


                      #11
                      No never. It is running on Windows 10.:PII stands for plug-in

                      Comment


                        #12
                        Originally posted by Ultrajones View Post
                        Have you always run the plug-in on a Raspberry Pi?
                        As this is a legacy PI I will migrate to Node-RED.

                        Solving the issue has no priority for me.

                        ---
                        John

                        Comment

                        Working...
                        X