Bug 2636 - Server crashes if Favorites button pushed when favorites plugin disabled
: Server crashes if Favorites button pushed when favorites plugin disabled
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Plugins
: 6.5b1
: PC Debian Linux
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-27 05:07 UTC by Max Spicer
Modified: 2008-09-15 14:39 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max Spicer 2005-11-27 05:07:12 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?
Comment 1 KDF 2005-11-27 23:00:57 UTC
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?
Comment 2 Max Spicer 2005-11-28 00:12:08 UTC
I was triggering the crash with a single, short press of Favorites on the remote.  There was no bt in the log.
Comment 3 Dan Sully 2005-11-29 16:39:20 UTC
Fixed in change 5327