Bugzilla – Bug 5673
Server crashes when Webproxy is specified but not available
Last modified: 2009-09-08 09:20:13 UTC
Using the latest nightly SqueezeCenter Version: 7.0 - 13563 - Windows XP - EN - cp1252 Server IP address: 163.33.84.62 Perl Version: 5.8.8 MSWin32-x86-multi-thread MySQL Version: 5.0.22-community-nt I specified a web proxy, so Squeezecentre could pull down the latest Jive firmware through the companies proxy server. The server failed to start up with the following error in the windows event log. The description for Event ID ( 0 ) in Source ( Application ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Can't call method "set" on an undefined value at /<C:\Program Files\SlimServer\server\squeezecenter.exe>Slim/Networking/Async.pm line 243. The proxy server specified is running Squid 2.6 stable 12. The proxy entry looked as follows webproxy.mycompany.com:911 The only way to get the server back up was to edit the server.prefs file.
Could you please run sc from the command line with --debug network.asynchttpd=debug?
Ah, I've discovered that i was putting in an incorrect proxy server. However, I think Squeezecentre should be able to ignore this incorrect setting as it makes it very hard for an average user to recover from, if the server will not tart and there is no way to access the Prefs UI. The debug setting does not give much more info, but you should be able to reproduce by supplying a bogus proxy server. C:\>"C:\Program Files\SlimServer\server\squeezecenter.exe" --debug network.async httpd=debug [13:51:57.8281] SqueezeCenter OSDetect init... [13:51:58.0247] SqueezeCenter settings init... main::init (266) SqueezeCenter OS Specific init... main::init (295) SqueezeCenter settings effective user and group if requested... main::init (305) SqueezeCenter strings init... Slim::Utils::Strings::loadStrings (108) Retrieving string data from string cache : C:\Program Files\SlimServer\server\Cache\strings.bin main::init (308) SqueezeCenter MySQL init... main::init (311) Firmware init... Slim::Utils::Misc::msg (1191) Warning: [13:52:00.5320] Can't call method "set" o n an undefined value at /<C:\Program Files\SlimServer\server\squeezecenter.exe>S lim/Networking/Async.pm line 243. Slim::bootstrap::theEND (338) Got to the END Slim::bootstrap::sigint (302) Got sigint Slim::Schema::forceCommit (1320) Warning: Trying to commit transactions before D B is initialized!
I'm increasing the severity level as this is not only an issue with typos in the proxy name, but with an accidentally set proxy, too. http://forums.slimdevices.com/showthread.php?t=40936
Patch, should be considered for 7.0: --- Slim/Networking/Async.pm (revision 29782) +++ Slim/Networking/Async.pm (local) @@ -118,6 +118,12 @@ my $socket = $self->new_socket( %{$args} ); + # Bug 5673, avoid a crash if socket is undef + if ( !defined $socket ) { + _connect_error( $socket, $self, $args ); + return; + } + $socket->set( passthrough => [ $self, $args ] ); Slim::Networking::Select::addError( $socket, \&_connect_error ); @@ -151,8 +157,10 @@ $log->error("Failed to connect: $!"); # close the socket - $socket->close; - undef $socket; + if ( defined $socket ) { + $socket->close; + undef $socket; + } my $ecb = $args->{onError}; if ( $ecb ) {
Fixed in change 17675.
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.