Bugzilla – Bug 1523
server crashes whenever web interface is loaded
Last modified: 2008-09-15 14:37:04 UTC
reproduced with 6.1 nightly from today (5/11?) 2005-05-11 10:39:24.8842 SlimServer done start... 2005-05-11 10:39:26.9532 Backtrace: frame 0: Slim::Utils::Misc::assert (/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Player/Sync.pm line 389) frame 1: Slim::Player::Sync::masterOrSelf (/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Player/Source.pm line 951) frame 2: Slim::Player::Source::playingSong (/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Player/Source.pm line 944) frame 3: Slim::Player::Source::playingSongIndex (/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Web/Pages.pm line 1230) frame 4: Slim::Web::Pages::playlist (/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Web/HTTP.pm line 747) frame 5: Slim::Web::HTTP::generateHTTPResponse (/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Web/HTTP.pm line 668) frame 6: Slim::Web::HTTP::processURL (/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Web/HTTP.pm line 532) frame 7: Slim::Web::HTTP::processHTTP (/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Networking/Select.pm line 115) frame 8: Slim::Networking::Select::select (./slimserver.pl line 624) frame 9: main::idle (./slimserver.pl line 567) frame 10: main::main (./slimserver.pl line 1147) Here's the problem. /Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Player/Sync.pm, line 389: 379 # returns the master if it's a slave, otherwise returns undef 380 sub isSlave { 381 my $client = shift; 382 return undef unless $client; 383 return $client->master; 384 } 385 386 sub masterOrSelf { 387 my $client = shift; 388 389 assert($client); 390 391 return $client->master || $client; 392 } 393 394 sub isSynced { 395 my $client = shift; 396 return (scalar(@{$client->slaves}) || $client->master); 397 } 398 399 1; Can't call method "master" on an undefined value at /Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Player/Sync.pm line 391, <SRC> line 405. 2005-05-11 10:39:27.1720 Got to the END. 2005-05-11 10:39:27.1731 Got sigint. 2005-05-11 10:39:27.1740 SlimServer cleaning up.
Created attachment 514 [details] fix when no client present this fixes the problem. only occurs when no client is present.
proabably should track down why the page wants to load playlists when there is no client, however. dan/michael, can you test and commit, since I cannot.
committed to trunk at change 3157 committed to branch at change 3156 note to self: always try unplugging all clients for a test, just in case.
I've had a better idea for this, but it needs more review (vs the quick fix to get thigns working again) Instead of leaving this trap around for others to fall into (and I know I've done it now more than once, and I'm not the only one), lets follow what is done in status() and return out immediately with minimal info when there is no client. This way, we dont have to keep checking for $client throughout playlist() patch shortly..
Created attachment 515 [details] set playercount = 0 and leave if no client in Pages::playlist()
I don't have much to say - it's working for me (latest trunk). But I had to do the changes, the patch somehow didn't want to apply to the trunk.
committed to trunk only at change 3168
There are 536 bugs in the database with targets of '---' that were fixed prior to new year 2006. I am setting them to targets of 6.2.1 to keep them from showing up in my queries.