Announcement

Collapse
No announcement yet.

plug-in crashes

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

    plug-in crashes

    Hi Bob,

    I did a bunch of cleanup - devices and events I no longer used - in HomeSeer (2.5.0.60) and ever since the plug-in has been crashing intermittently. Mostly, it seems at the end of the day after "Switching to a new log file". In the last instance I happened to notice that earlier in the day the "Web Server stopped" after an ISY plug-in Program Error was reported. I don't think it's necessarily always like that. At least I didn't notice this in the last few crashes.

    When it first started happening I was on one version back of the plug-in so made sure to update the plug-in in case something in the latest version would fix it. (I don't have any zwave so didn't see the need to move to the latest version).

    I've attached a screenshot of the HS log and the error that was reported in the last 4 crashes (about 2 / per week at this point).

    edit: isy firmware is 4.3.6 and plug-in is 1.0.4.24

    Any ideas?
    Attached Files

    #2
    Originally posted by johnnyt View Post
    Hi Bob,

    I did a bunch of cleanup - devices and events I no longer used - in HomeSeer (2.5.0.60) and ever since the plug-in has been crashing intermittently. Mostly, it seems at the end of the day after "Switching to a new log file". In the last instance I happened to notice that earlier in the day the "Web Server stopped" after an ISY plug-in Program Error was reported. I don't think it's necessarily always like that. At least I didn't notice this in the last few crashes.

    When it first started happening I was on one version back of the plug-in so made sure to update the plug-in in case something in the latest version would fix it. (I don't have any zwave so didn't see the need to move to the latest version).

    I've attached a screenshot of the HS log and the error that was reported in the last 4 crashes (about 2 / per week at this point).

    edit: isy firmware is 4.3.6 and plug-in is 1.0.4.24

    Any ideas?
    Nothing in the log really indicates any serious issues with the plug-in. The error is simply notifying you that the ISY sent a message about a program that the plug-in doesn't know anything about. Now if you're getting that error for every program, then it would indicate that something failed while trying to query the ISY for program info.

    When it crashes, is there a stack trace in the log?
    --
    Bob Paauwe
    ISYInsteon Plug-in
    http://www.bobsplace.com/ISYInsteon/

    Comment


      #3
      Originally posted by bpwwer View Post
      The error is simply notifying you that the ISY sent a message about a program that the plug-in doesn't know anything about.
      Hmmm. I don't run HS progs or update HS devices from ISY. In fact I didn't think I could update an HS device or call an HS event from ISY. That said, I do have over 700 ISY programs and may have forgotten that I did something like that a while back. What does that look like in ISY syntax? I can't think of what it could be right now.

      Originally posted by bpwwer View Post

      When it crashes, is there a stack trace in the log?
      Sorry for my confusion but I thought the stack traces were the files I uploaded as part of the zip file I attached. If not, please let me know where to look for a stack trace. There's nothing in the HS log. Would I need to set the logging level higher (or lower, if that's better term) for the plug-in?

      Here's what I thought was a stack trace from a crash that happened this morning (not in the zip file).

      27/07/2015 8:12:55 AM
      Object reference not set to an instance of an object.
      HomeSeer version: 2.5.0.60
      Source: HSPI_ISYInsteon
      Target: Void ISYSystemEvent(System.Object, ISYCommon.updateEventArgs)
      Stack trace:
      at HSPI_ISYINSTEON.HSPI.ISYSystemEvent(Object sender, updateEventArgs e)
      at ISYCommon.isy.D2DKeyUpdate(String new_key, Boolean slow)
      at ISYCommon.isy.isyEvent.ProgramKeyEvent.UpdateNode()
      at ISYCommon.isy.ProcessEvent(Object sender, isyEventArgs evnt)
      at ISYCommon.EventQueue.QueueLoop()
      at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
      at System.Threading.ExecutionContext.runTryCode(Object userData)
      at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWi thGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
      at System.Threading.ExecutionContext.RunInternal(ExecutionConte xt executionContext, ContextCallback callback, Object state)
      at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
      at System.Threading.ThreadHelper.ThreadStart()

      Please specify what you were doing at the time of this error:

      Comment


        #4
        Originally posted by johnnyt View Post
        Hmmm. I don't run HS progs or update HS devices from ISY. In fact I didn't think I could update an HS device or call an HS event from ISY. That said, I do have over 700 ISY programs and may have forgotten that I did something like that a while back. What does that look like in ISY syntax? I can't think of what it could be right now.
        Sorry, I don't think I explained that well. As you probably know, for each of the programs defined in the ISY, the plug-in creates a HS device. The error message was generated because the ISY sent out a message about an ISY program (probably a true/false status change) but the plug-in never created a corresponding HS device and doesn't know what to do.

        I see now how this probably does relate to the crash.

        Sorry for my confusion but I thought the stack traces were the files I uploaded as part of the zip file I attached. If not, please let me know where to look for a stack trace. There's nothing in the HS log. Would I need to set the logging level higher (or lower, if that's better term) for the plug-in?

        Here's what I thought was a stack trace from a crash that happened this morning (not in the zip file).
        My bad, I missed the attachment. I was concentrating on the screen shot and didn't see that you also had an attachment.

        Looking at that and the trace that you posted I have a pretty good idea what's happening, but haven't figured out all the details of why.

        The ISY shares a generated "key" (string of characters) with the plug-in, the plug-in must send this key along with any commands that effect ISY programs or the ISY will reject the command. The changes this key, I think once a day, and when it does, it sends a notice to the plug-in that the key was changed along with the new key.

        The ISY also sends out a new key whenever any change is made to programs on the ISY. For example, if you rename a program, the ISY will send out a new key. If you create a new program, the ISY sends out a new key. Thus, when the plug-in gets the notice that there's a new key, it has to query the ISY for all the programs and compare that list with it's current list to figure out what's changed. Once it knows what has changed, it notifies HomeSeer about the change.

        In your case, it seems like something is going wrong when it tries to send a notification to HomeSeer. But the trace doesn't show any details about the notification that's failing and in fact, since this seems to be happening do to the ISY changing the key but no programming changes actually happening, it really shouldn't be trying to notify HomeSeer of anything (which is maybe why it's failing).

        So I know where to start looking for the bug.
        --
        Bob Paauwe
        ISYInsteon Plug-in
        http://www.bobsplace.com/ISYInsteon/

        Comment


          #5
          johnnyt,

          I didn't find anything obvious in the code that would cause the crash but there were a couple of places where I think it could happen if the plug-in and HS get out of sync on the HS devices. So I added some error trapping that will report errors but not crash.

          I uploaded a new version that I think will not crash and will provide some additional information on what's happening. Please try that and report back what happens.

          Also, are you seeing any errors when the plug-in starts?
          --
          Bob Paauwe
          ISYInsteon Plug-in
          http://www.bobsplace.com/ISYInsteon/

          Comment


            #6
            I think I know what could be happening... maybe.

            In my clean up I also went through and deselected all the devices I don't need in the hope that it would lighten the processing load for ISY as few devices would need updating (does it?). In the process I missed leaving 5 programs selected that HS tells ISY to run on occasion. (I would add that the exercise was painfully as I have 774 programs, 221 Variables, 135 devices and 94 scenes, i.e. over 1200 things that can be created by the plug-in. While I long ago set the plug-in to NOT automatically add new devices, I still had lots from before that and noticed that the plug-in does add new programs I create on ISY automatically regardless of the setting for devices. I was thinking of asking you to add a "select all / deselect all" feature to the filtering but didn't because I know this is now a bit of a legacy product but maybe it's something that could be easy to add to HS3 version?)

            The weird thing is that one of the programs, a hearbeat program called "Tell ISY to use HomeSeer", runs every 30 mins yet the plug-in has so far lasted longer than 30 mins. So while it would make sense to think this was caused by a cleanup that went too far, it may not be the explanation.

            I'll update with the new version and report back.
            Thanks for looking into this.

            Comment


              #7
              Hi Bob,

              With the latest version of the plug-in the log started getting hammered with messages about programs not found. See attached. A quick scan of the programs tells me it makes sense as I've filtered those programs out since I don't use them within HS.

              I'm not sure which is worse, the crashing or the infinite loop of messages but I think it's the latter so I'm going to uninstall this version and roll back for now but let me know if you would get more info from me running the latest version through a few more cycles at my end.

              Is there a way for you to make the plug-in ignore ISY messages from programs it shouldn't care about? By that I mean ISY programs that do not exist in any HS events. Where the program does exist in an event (such as the five I forgot to leave in on the config page), an error message in the log and ignoring the error would be nice. In a more ideal world, I'd like to get an email about it but I presume that would be too much work to add in. (unless there's a way to do that now?)

              Thanks.
              Attached Files

              Comment


                #8
                Yeah, after your lest message I kind of expected it would dump a bunch of error messages. The code that deals with the key updates from the ISY don't take into account that you may have filtered out programs from HS. That's the real bug and once I fix that, it should behave properly.

                It should only dump that set of error messages once a day if that makes any difference.
                --
                Bob Paauwe
                ISYInsteon Plug-in
                http://www.bobsplace.com/ISYInsteon/

                Comment


                  #9
                  Uploaded a new version that now properly ignores the programs that have been filtered. This should no longer dump error messages about those.
                  --
                  Bob Paauwe
                  ISYInsteon Plug-in
                  http://www.bobsplace.com/ISYInsteon/

                  Comment


                    #10
                    Thanks. I haven't had a crash, presumably because I re-added the programs I call from HS to the config page filter, but I happily upgraded in case I mess up again. Thanks again for looking into this and making the adjustment.

                    Comment

                    Working...
                    X