Bug 14690 - Couldn't call Slim::Plugin::Extensions::Plugin->initPlugin: Not a HASH reference
: Couldn't call Slim::Plugin::Extensions::Plugin->initPlugin: Not a HASH reference
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Plugins
: unspecified
: PC Windows XP
: P3 normal (vote)
: 7.4.x
Assigned To: Adrian Smith
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-08 23:23 UTC by Michael Herger
Modified: 2009-10-22 11:23 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Herger 2009-10-08 23:23:02 UTC
I somehow ended up with the plugin pref in extension downloader being an array ref. Extension Downloader then would fail to load with the above message.
Comment 1 Adrian Smith 2009-10-09 08:16:52 UTC
was there a line number of where it failed in initPlugin?  Assume this is L154 
keys %$installPlugins?

Is it possible you had an extension pref file from a beta version of 7.4?  I think I used an array at one point for this but changes to a hash quite soon after so didn't add migration for it.

Looking at the current code I cant see where it would get set as an arrayref?  We could add in something defensive to reset it to an empty hash but I don't see where it is coming from at present..
Comment 2 Michael Herger 2009-10-09 22:59:58 UTC
yes, line 154:

[09-10-10 07:58:10.5926] Slim::Utils::PluginManager::load (325) Warning: Couldn't call Slim::Plugin::Extensions::Plugin->initPlugin: Not a HASH reference at D:/eclipse/7.4/server/Slim/Plugin/Extensions/Plugin.pm line 154.

It's very well possible this value dates back from 7.3 days. It's not my production or main dev machine. I don't regularly run SBS here.

Should we add a simple "if ref($installPlugins) eq 'HASH'"?
Comment 3 Adrian Smith 2009-10-10 03:13:28 UTC
I'll add some defensive code - we should really just discard any old array based pref and replace with a hash as the code in the settings page will also assume it is a hash.
Comment 4 SVN Bot 2009-10-11 05:30:19 UTC
 == Auto-comment from SVN commit #28811 to the slim repo by adrian ==
 == https://svn.slimdevices.com/slim?view=revision&revision=28811 ==

Bug: 14690
Description: avoid plugin not being loaded if prefs file contains non hash formatted pref which was used during beta for a short while
Comment 5 James Richardson 2009-10-22 11:23:20 UTC
This bug has been marked as fixed in the 7.4.1 release version of SqueezeBox
Server! 

Please see the Release Notes for all the details:
http://wiki.slimdevices.com/index.php/Release_Notes

If you haven't already, please download and install the new version from
http://www.logitechsqueezebox.com/support/download-squeezebox-server.html

If you are still experiencing this problem, feel free to reopen the bug with
your new comments and we'll have another look.