Bug 2270 - Live365 crashes when accessing its web page without internet connection
: Live365 crashes when accessing its web page without internet connection
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Plugin
: 6.2.0
: PC Windows XP
: P2 normal (vote)
: ---
Assigned To: Blackketter Dean
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-07 10:09 UTC by Michael Herger
Modified: 2008-09-15 14:36 UTC (History)
0 users

See Also:
Category: ---


Attachments
Fix crasher when network connection is down (881 bytes, patch)
2005-10-15 05:17 UTC, Michael Herger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Herger 2005-10-07 10:09:31 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.
Comment 1 KDF 2005-10-07 12:28:35 UTC
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?



Comment 2 KDF 2005-10-07 14:01:08 UTC
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.
Comment 3 Michael Herger 2005-10-09 23:17:55 UTC
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.
Comment 4 Blackketter Dean 2005-10-13 12:30:41 UTC
Michael/KDF:  Are you guys on this?  

It looks like AsyncHTTP doesn't handle failure of the new() on line 51.

Comment 5 KDF 2005-10-13 12:52:02 UTC
I only gave it a quick check since it isn't terribly convenient to keep cutting
off the internet connection.
Comment 6 Michael Herger 2005-10-13 12:54:11 UTC
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?
Comment 7 Michael Herger 2005-10-13 13:18:00 UTC
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)
Comment 8 KDF 2005-10-13 13:33:35 UTC
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.
Comment 9 Michael Herger 2005-10-15 05:17:56 UTC
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.
Comment 10 Michael Herger 2005-10-16 00:34:21 UTC
Checked in as change 4645