-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Insteon: Delete Orphan Links (Audit) Freezes Up #57
Comments
Caught an error this time: tie_events eval error: Can't use an undefined value as an ARRAY reference at /usr/local/mh3/bin/../lib/Insteon/AllLinkDatabase.pm line 2008, line 11. Line 2008 of ALD.pm is: |
This appears to occur when reload code is called and then AUDIT Delete Orphans is called thereafter. |
Ahh, finally found it. Kind of. I was using "Force Reload Code" rather than "Reload Code" Forced causes the above error, while normal reload does not. This likely has something to do with something being cleared out by forced reload and an init call that is not getting repeated in a forced reload. To repeat the error:
Other variations:
I am disinclined to track this unique error down at the moment. |
Kevin, There was at least one fix that I submitted that affected the save/restore of the aldb data. You might try again after merging in that fix. Sincerely, Michael From: krkeegan [mailto:[email protected]] This appears to occur when reload code is called and then AUDIT Delete Orphans is called thereafter. — |
Failing to redefine the active_interface leads to potentially two divergent versions of the same object. Removed logic which required that active_interface be undefined before it could be defined. This may cause issues if two PLMs are used in MH, although it is not clear to me that two PLMs were ever supported by MH or that such support is even needed. Closed hollie#57
Holy crap, I finally solved this one. The "Force Reload code" voice command rereads all user code whether the file changed or not. The "Reload code" voice command only rereads that code which has changed. Whenever the insteon.mht file is reread, each of the objects is recreated and most of the initial startup commands are rerun. The issue arose because the $PLM object was recreated, but the object reference retrieved by BaseObject::active_interface() was not updated. As a result, there were basically two "versions" of the PLM object in memory which would lead to variables being set in the first one but not the second one. When the code later tried to read the variable from the second "version" things would go badly. The problem came down to a quirk in the code all the way down in the InsteonManager. Previously when adding a BaseInterface it only be set as the active_interface if the active_interface had not been set before. Now whenever a BaseInterface is added, it is set as the active_interface. So far, I have not seen any adverse effects from my change. The only issue I can see is that having two PLMs defined in MH may lead to issues. So that should be avoided. If anyone knows of a situation in which two would be needed, please let me know. This obscure bug likely caused a number of issues beyond what I was able to reproduce. |
This is fantastic, Kevin! Thanks for chasing this down. Cheers! Eloy Paris.- On 05/23/2013 08:49 PM, Kevin Robert Keegan wrote:
|
Not a whole lot of details. But Delete Orphan Links (Audit) just froze up on me. I have seen this before and don't know what causes it.
In this most recent event, I scanned all links, scanned a few devices directly, and then performed Delete Orphan Links (Audit). The log shows the following entries:
04/02/2013 11:41:49 Running: PLM AUDIT - delete orphan links
04/02/2013 11:41:49 [Insteon::ALDB_PLM] #### NOW BEGINNING DELETE ORPHAN LINKS ####
04/02/2013 11:41:49 [Insteon::ALDB_i1] Nothing else to do for $f_fm_lt_ma after deleting 0 links
but nothing else. All other commands continue to work, but I cannot perform the delete orphans (audit) without restarting MH.
The text was updated successfully, but these errors were encountered: