PDA

View Full Version : crash when wiping cache



Eric Gauthier
2004-05-17, 05:34
Just to close this one out for the mailing list.

I mailed Dean a backtrace offlist to see where things were failing, and it
turns out to be in the AudioScrobbler plugin. In
Scrobbler::commandCallback, it is trapping all commands to track what has
been played, and it always expects a $client. The wipecache command does
not provide a $client so there's the problem.

Since Scrobble only cares about events with valid $clients (play, stop,
pause, etc.) I have just stuck the following at the top of
Scrobble::commandCallback

if (!$client) return;

Not the most elegant fix, but it works.

-Eric
>-----Original Message-----
>From: dean blackketter [mailto:dean (AT) slimdevices (DOT) com]
>Sent: Sunday, May 16, 2004 10:55 PM
>To: Eric Gauthier
>Subject: [slim] crash when wiping cache
>
>
>Eric,
>
>Could you insert right before line 460 in Prefs.pm:
>
> return get($client->id() . "-" . $key);
>
>this line:
>
> bt() if (!$client);
>
>Then do what you did to cause the server to crash? I need some
>additional information.
>
>-dean
>
>On May 16, 2004, at 6:28 PM, Eric Gauthier wrote:
>> Still getting the following crash in clientGet when
>attempting to Wipe
>> the
>> cache:
>>
>> Can't call method "id" without a package or object reference at
>> /usr/local/slimserver.nightly/Slim/Utils/Prefs.pm line 460.
>>
>> -Eric
>>
>>> -----Original Message-----
>>> From: discuss-bounces (AT) lists (DOT) slimdevices.com
>>> [mailto:discuss-bounces (AT) lists (DOT) slimdevices.com] On Behalf Of kdf
>>> Sent: Sunday, May 16, 2004 4:50 PM
>>> To: Slim Devices Discussion
>>> Subject: [slim] crash when wiping cache
>>>
>>>
>>> Quoting Eric Gauthier <EGauthier (AT) comcast (DOT) net>:
>>>
>>>> Kdf,
>>>>
>>>> Thanks for the quick response. However, the client is connected.
>>>> Just to make sure, I powered the Squeezebox on via the web
>>> interface.
>>>> Then "wipe cache" and same crash.
>>>>
>>>> A Rescan does work without a problem. I have also tried
>to disable
>>>> caching, delete the cache file, and re-enable it, but no effect.
>>>>
>>>> I have now also noticed something else strange when trying
>to debug
>>>> this. I just added a slimp3 via a wireless bridge to my network
>>>> (other 2 players are squeezebox and softsqueeze). When I
>try and go
>>>> to the Player settings of the SliMP3 (settings for other
>>> players work
>>>> fine) I get a different crash with the following in the error log:
>>>>
>>>> Can't call method "HASH(0x9077d80)" on unblessed reference at
>>>> /usr/local/slimserver/Slim/Web/Setup.pm line 135.
>>>
>>> I see what is causing this one. My fault, I pasted badly :) I'm
>>> committing a fix in a few minutes. I don't yet see how
>this relates
>>> to your other crash but we'll see. If you arent' using the cvs
>>> update method, and don't want to wait for the next nightly, here is
>>> the fix:
>>>
>>> Slim/Web/Setup.pm lines 135, change to:
>>> $pageref->{'Prefs'}{'maxBitrate'}{'options'}{'0'} =
>>> string('SETUP_MP3BITRATE_DESC');
>>>
>>> instead of:
>>> $pageref->$pageref->{'Prefs'}{'maxBitrate'}{'options'}{'0'} =
>>> string('SETUP_MP3BITRATE_DESC');
>>>
>>> ignore the line breaks here because it should be all in one line.
>>>
>>> -kdf
>>>
>>>
>>>
>>>> I have "forgotten" this player via
>>> home.html?player=MAC&forget=MAC but
>>>> when it is rediscovered, the same crash.
>>>>
>>>> Any ideas?
>>>>
>>>> -Eric
>>>>
>>>>> -----Original Message-----
>>>>> From: discuss-bounces (AT) lists (DOT) slimdevices.com
>>>>> [mailto:discuss-bounces (AT) lists (DOT) slimdevices.com] On Behalf Of kdf
>>>>> Sent: Sunday, May 16, 2004 8:29 AM
>>>>> To: Slim Devices Discussion
>>>>> Subject: [slim] crash when wiping cache
>>>>>
>>>>>
>>>>> wipe cache calls the command to wipe the cache memory
>and start a
>>>>> rescan. execution of a command contains a client tag, so you must
>>>>> have a client connected in order for this to work. no client, no
>>>>> id...and boom.
>>>>>
>>>>> Give it time after startup for your client to be
>detected, then it
>>>>> should work fine. This is a known bug:
>>>>>
>>>>> http://bugs.slimdevices.com/show_bug.cgi?id=300
>>>>>
>>>>> kdf
>>>>>
>>>>> Quoting Eric Gauthier <EGauthier (AT) comcast (DOT) net>:
>>>>>
>>>>>> I upgraded from 5.1.5 to the nightlies on 14-May to get
>rid of the
>>>>>> memory leak issue on Linux. I don't know if this problem
>>> existed in
>>>>>> 5.1.5 or not.
>>>>>>
>>>>>> After starting the server, go to the web page Server
>>>>>> Settings->Advanced Server Settings->Performance and select "Wipe
>>>>>> Cache" and the server crashes.
>>>>>>
>>>>>>
>>>>>> Error in log file is:
>>>>>>
>>>>>> Can't call method "id" without a package or object reference at
>>>>>> /usr/local/slimserver/Slim/Utils/Prefs.pm line 460.
>>>>>>
>>>>>> I just upgraded to the latest nightly and it still happens.
>>>>>>
>>>>>> -Eric
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>

kdf
2004-05-17, 08:52
Quoting Eric Gauthier <EGauthier (AT) comcast (DOT) net>:

> Just to close this one out for the mailing list.
>
> I mailed Dean a backtrace offlist to see where things were failing, and it
> turns out to be in the AudioScrobbler plugin. In
> Scrobbler::commandCallback, it is trapping all commands to track what has
> been played, and it always expects a $client. The wipecache command does
> not provide a $client so there's the problem.
>
> Since Scrobble only cares about events with valid $clients (play, stop,
> pause, etc.) I have just stuck the following at the top of
> Scrobble::commandCallback
>
> if (!$client) return;
>
> Not the most elegant fix, but it works.

glad that's solved :)
I'm surprised you are able to use Scrobbler. I've not been able to get any play
from it since the protocol changed. It refuses to let the song info get sent
due to login problems. Oddly, its probably the only plugin I refuse to have
installed.

-kdf