Bug 6436 - Disabled plugins still run code
: Disabled plugins still run code
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Plugins
: unspecified
: PC Windows XP
: P2 normal (vote)
: ---
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-20 13:35 UTC by Philip Meyer
Modified: 2008-12-18 11:12 UTC (History)
0 users

See Also:
Category: ---


Attachments
plugin debug log (45.20 KB, text/plain)
2007-12-21 05:16 UTC, Philip Meyer
Details
Plugin cache file (30.45 KB, text/plain)
2007-12-21 06:26 UTC, Philip Meyer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Meyer 2007-12-20 13:35:25 UTC
I added extra logging to Slim/Hardware/IR.pm (patch on bug #5112) whilst debugging some issues I had with plugins not working correctly.

I discovered that the SavePlaylist plugin was registering 'play.hold' keybinding for the [playlist] mode.  This should not happen, as I have disabled the SavePlaylist plugin!

It appears that the plugin's initPlugin function is called, even when the plugin is in disabled state.

Depending on the order that plugins load, this can cause plugins to fail to work correctly, as no other plugin's that are initialised after SavePlaylist would be able to register their own keys for the [playlist] mode.

No code within a plugin should be executed if the plugin is disabled.
Comment 1 Michael Herger 2007-12-21 04:13:33 UTC
Can't reproduce this. Could you please upload your log file with "--debug server.plugin=debug"?
Comment 2 Philip Meyer 2007-12-21 05:16:31 UTC
Created attachment 2557 [details]
plugin debug log

I have set the SavePlaylist plugin to Disabled.

Looking at this log, it looks like the issue is that this internal plugin is not skipped if it is disabled, but other plugins are skipped.

On line 551 I can see my debug line showing that the plugin is registering the play.hold action.
Comment 3 Michael Herger 2007-12-21 05:46:36 UTC
The log you uploaded has <400 lines - where do you see the reference to SavePlaylist?
Comment 4 Michael Herger 2007-12-21 05:48:29 UTC
...and SavePlaylist does work for me, too. What you about the plugin cache? Could you please upload it? Then remove it and try again. I wonder whether this is one more issue with the plugin cache.
Comment 5 Philip Meyer 2007-12-21 06:19:46 UTC
Sorry, Line 330 - I had word wrap on before, so I reported the wrong line.

I will try clearing plugin cache.
Comment 6 Philip Meyer 2007-12-21 06:26:40 UTC
Created attachment 2558 [details]
Plugin cache file
Comment 7 Philip Meyer 2007-12-21 07:30:24 UTC
Tried deleting the plugin cache file and restarted.  I still see the same issue.
Comment 8 Michael Herger 2007-12-21 07:41:44 UTC
Oops, sorry for the confusion... The plugin's state isn't stored in the cache file, but in plugin/state.prefs. Do you see a line "Slim::Plugin::SavePlaylist::Plugin"?
Comment 9 Philip Meyer 2007-12-21 11:06:02 UTC
Yes:
Slim::Plugin::SavePlaylist::Plugin: 1
Comment 10 Michael Herger 2007-12-22 00:13:33 UTC
A value of 1 means it's not disabled. Could you please make sure this bug is really a bug? Or it is what it's got in the subject? I thinkt if there's an issue, then it's in the handler which should enable/disable plugins. But even this is working for me.
Comment 11 Philip Meyer 2007-12-22 07:24:01 UTC
Sorry, my mistake.  I didn't check on the Extras tab that the plugin was disabled after I added the SavePlaylist plugin back into the Slim/Plugin folder.

I was having a problem with the plugin running when it was meant to be disabled.  However, since deleting the plugin, deleting my SqueezeCenter Cache and restoring the plugin and disabling it again, things now seem to be working.

Probably some old cached config settings, which were resolved in a past SVN update.

Possibly user error - I may have misread/misinterpretted the Enable/Disable setting in the Extras settings page.
Comment 12 Jim McAtee 2007-12-22 17:43:08 UTC
> Possibly user error - I may have misread/misinterpretted the Enable/Disable
> setting in the Extras settings page.

Which is very easy to do.  That interface is going to cause a lot of support problems.
Comment 13 Chris Owens 2008-03-07 09:04:29 UTC
This bug is being closed since it was resolved for a version which is now released!  Please download the new version of SqueezeCenter (formerly SlimServer) at http://www.slimdevices.com/su_downloads.html

If you are still seeing this bug, please re-open it and we will consider it for a future release.