Bug 9168 - PluginManager fails with more than one targetPlatform in install.xml
: PluginManager fails with more than one targetPlatform in install.xml
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Plugins
: 7.2
: PC Other
: -- normal (vote)
: 7.x
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-15 03:54 UTC by Stuart Hickinbottom
Modified: 2009-07-31 10:27 UTC (History)
0 users

See Also:
Category: ---


Attachments
Patch to fix support for multiple target platform types (357 bytes, patch)
2008-08-15 03:54 UTC, Stuart Hickinbottom
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Hickinbottom 2008-08-15 03:54:34 UTC
Created attachment 3808 [details]
Patch to fix support for multiple target platform types

This is with SqueezeCenter r22588.

I have a plugin that wants to indicate that it runs on both Linux and Windows. I've done that with the following in my install.xml:

 <targetPlatform>Linux</targetPlatform>
 <targetPlatform>Windows</targetPlatform>

Unfortunately, with more than one targetPlatform tag present PluginManager can't cope, and fails with the following log entry:

--------------
[11:44:24.3205] Slim::Utils::PluginManager::init (110) Reparsing plugin manifests - manefest checksum differs
[11:44:24.3768] diagnostics::splainthis (594) Warning: Not an ARRAY reference at
        /usr/local/squeezecenter/server/Slim/Utils/PluginManager.pm line 277 (#1)
[11:44:24.3770] diagnostics::splainthis (595) Warning:     (F) Perl was trying to evaluate a reference to an array value, but found
    a reference to something else instead.  You can use the ref() function
    to find out what kind of ref it really was.  See perlref.

[11:44:24.3777] Carp::confess (270) Warning: Uncaught exception from user code:
        Not an ARRAY reference at /usr/local/squeezecenter/server/Slim/Utils/PluginManager.pm line 277. at /usr/local/squeezecenter/server/Slim/Utils/PluginManager.pm line 275
        Slim::Utils::PluginManager::_parseInstallManifest('Slim::Utils::PluginManager', '/usr/local/squeezecenter/server/Plugins/AutoRescan/install.xml') called at /usr/local/squeezecenter/server/Slim/Utils/PluginManager.pm line 218
        Slim::Utils::PluginManager::readInstallManifests('Slim::Utils::PluginManager','ARRAY(0x926b69c)') called at /usr/local/squeezecenter/server/Slim/Utils/PluginManager.pm line 112
        Slim::Utils::PluginManager::init('Slim::Utils::PluginManager') called at /usr/local/squeezecenter/server/slimserver.pl line 413
        main::init() called at /usr/local/squeezecenter/server/slimserver.pl lin
e 462   
        main::main() called at /usr/local/squeezecenter/server/slimserver.pl lin
e 1026
--------------

I believe the code was written to support multiple target platform types, but is wrong. I've managed to fix this with the simple attached patch.
Comment 1 Blackketter Dean 2008-08-17 09:39:54 UTC
Andy, should we take this for 7.2?
Comment 2 Andy Grundman 2008-08-17 09:54:00 UTC
Yes, will apply.
Comment 3 Andy Grundman 2008-08-17 09:58:10 UTC
Fixed in change 22714.
Comment 4 Stuart Hickinbottom 2008-08-17 15:11:50 UTC
Yes, that fixes it for me; I think this can now be closed. Many thanks for committing that, Andy.
Comment 5 Spies Steven 2008-10-17 14:15:56 UTC
Verified by Stuart Hickinbottom.
Comment 6 James Richardson 2008-12-15 12:34:54 UTC
This bug has been fixed in the 7.3.0 release version of SqueezeCenter!

Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Comment 7 Chris Owens 2009-07-31 10:27:20 UTC
Reduce number of active targets for SC