Bugzilla – Bug 2270
Live365 crashes when accessing its web page without internet connection
Last modified: 2008-09-15 14:36:01 UTC
When I open the Live365 plugin's web page it crashes when there's no connection to the internet. I think it's having problems recovering from a failed logon attempt. If you don't set account information for live365, it won't crash. 2005-10-07 19:01:49.1563 Logging in mh 2005-10-07 19:01:50.0039 Live365 login failure: PLUGIN_LIVE365_LOGIN_ERROR_HTTP Can't use string ("") as a subroutine ref while "strict refs" in use at D:/ eclipse/SlimSkin/Plugins/Live365/Web.pm line 774. 2005-10-07 19:01:50.3242 Shutting down plugins... The problem seems to be the missing $params->{httpClient} in the above procedure. I don't know how createAsyncWebPage() is called.
The subroutine ref seems to be $params->{callback}. easiest place to start could be: unless ($params->{callback}) { msg("Live365: missing callback"); Slim::Utils::Misc::bt(); } seems that the async_HTTP call isn't being set up with a callback on failure?
testing this myself, I'm also getting a crash, but at a different location: Can't use an undefined value as a symbol reference at D:/slim/server/Slim/Networking/AsyncHTTP.pm line 54, <DATA> line 1. This results from disconnecting the network cable from the server and clicking on the Live365 link from the home page.
I think there's yet another problem if no player is connected. It will crash in another place. But I still have not found the source of the first problem.
Michael/KDF: Are you guys on this? It looks like AsyncHTTP doesn't handle failure of the new() on line 51.
I only gave it a quick check since it isn't terribly convenient to keep cutting off the internet connection.
Start working in the train like me ;-). I was busy with another project the past few days. Dean, this is line 51 in what module?
Hmm... this is odd: it's important whether I interrupt the connection between the server and the gateway (router) or the gateway and the internet. When there's no gateway available, slimserver would crash. If there's a gateway, but nothing behind it, the live365 plugin would correctly report a connection problem. (BTW: found line 51 in AsyncHTTP.pm)
heh, my commute is 3 minutes on foot. Not much time to do any coding :) I dont get many solid blocks of time any more to get into any complex digging like this one. If I can't tackle it in chunks, it ends up left behind. sorry.
Created attachment 907 [details] Fix crasher when network connection is down Today's train ride was successful: I found a possible fix for the crasher. The error handler was trying to get request parameters using fetchAsyncRequest before calling storeAsyncRequest. This fix moves the latter before the call to the login routine. The error handler then gets the correct request parameters and runs fine. Please give it a try.
Checked in as change 4645