Bugzilla – Bug 2636
Server crashes if Favorites button pushed when favorites plugin disabled
Last modified: 2008-09-15 14:39:24 UTC
If you have the favorites plugin disabled and press the new Favorites button on the remote, the server crashes with the following message: 2005-11-26 23:50:33.2012 Crashing because 'PLUGIN.Favorites' has no mode functio n or a bogus function. Perhaps you mis-typed the mode name. Can't use string ("") as a subroutine ref while "strict refs" in use at /usr/loc al/slimserver/Slim/Buttons/Common.pm line 1037. At the very least, the server should not crash! However, I'm wondering whether it should be possible to disable a part of the server that is required for something as obvious as a button on the remote. I can imagine a lot of confused people who (like me) disabled the plugin a long time ago and so have forgotten doing it. More generically, why does the server crash in this situation? Given the error message, it obviously knew it was going to crash and why - couldn't it have handled the situation a bit more gracefully?
How are you causing this crash? The button works for single press to list the favourites. holding doesn't add as it is supposed to, but that is known. as for crashing, line 1037 could just be wrapped in an else (tho that would mean the message is not correct). However, it is intended to highlight that the cause should be fixed. supplying a bogus reference to be used as a function ref is a bad thing and would likely cause more problems down the line, thus crash anyway and might be misleading as to the cause. the code shows that there should have been a backtrace in that log. Did you cut that out?
I was triggering the crash with a single, short press of Favorites on the remote. There was no bt in the log.
Fixed in change 5327