Bug 3416 - Crash in SimpleAsyncHTTP with XML plugins
: Crash in SimpleAsyncHTTP with XML plugins
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: XML
: 6.5b1
: PC Windows XP
: P2 major (vote)
: ---
Assigned To: Chris Owens
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-12 13:04 UTC by Michael Herger
Modified: 2008-12-15 11:58 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Herger 2006-05-12 13:04:01 UTC
When accessing one of the XML based plugins (LMA, shoutcast, Picks, but _not_ RadioIO) slimserver crashes:

2006-05-12 21:59:21.8950 Formats::XML: async request: http://content.us.squeezenetwork.com:8080/lma/artists.opml
2006-05-12 21:59:21.8954 SimpleAsyncHTTP: GETing http://content.us.squeezenetwork.com:8080/lma/artists.opml
2006-05-12 21:59:21.9003 AsyncHTTP: Starting async DNS lookup for [content.us.squeezenetwork.com] [timeout 5]
2006-05-12 21:59:21.9102 AsyncHTTP: Resolved content.us.squeezenetwork.com to [64.71.155.211]
2006-05-12 21:59:21.9106 AsyncHTTP: Connecting to content.us.squeezenetwork.com:8080
2006-05-12 21:59:22.1036 AsyncHTTP: connected, ready to write request
Can't call method "header" on unblessed reference at D:/eclipse/svn/Slim/Networking/SimpleAsyncHTTP.pm line 188.
2006-05-12 21:59:22.1041 SimpleAsyncHTTP(http://content.us.squeezenetwork.com:8080/lma/artists.opml) destroy called.
2006-05-12 21:59:22.2562 Shutting down plugins...
2006-05-12 21:59:22.2786 CLI: Closing socket 9090

Couldn't find a recent related change :-/.
Comment 1 KDF 2006-05-12 13:58:43 UTC
I saw this similar crash message when using the album review plugin (can't use header..., line 235).  Leading up to it, there was a note about missing params from the request (program name missing).  I couldn't verify if this was a problem due to my firewall at work and I could not get it to fail from home with an open net connection.  

obviously with multiple locations, it is harder to isolate the root failure in order to harden the header handling.
Comment 2 Andy Grundman 2006-05-12 14:01:41 UTC
Wipe your FileCache, that should fix it.
Comment 3 Michael Herger 2006-05-12 14:11:16 UTC
Thanks. Isn't this something we should to care about? Is this due to some code changes? 
Comment 4 Andy Grundman 2006-05-12 14:13:07 UTC
It only affects people who ran a nightly build with the old header format, so it's not a big deal.
Comment 5 KDF 2006-05-12 14:21:14 UTC
doesn't seem to help the case I run into. but I don't have the latest of the plugin yet either.

log http_async:

POST http://www.allmusic.com:80/cg/amg.dll HTTP/1.1
Connection: close
Icy-Metadata: 1
User-Agent: iTunes/4.7.1 (Windows; N; Windows 2000; 586; CA; cp1252) SlimServer/6.5b1/6820
Accept: */*
Cache-Control: no-cache
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Host: www.allmusic.com
Content-Length: 50

SQL=PROMISE%20(CD%20SINGLE)&OPT1=2&submit=Go&P=amg

2006-05-12 14:19:11.6502 AsyncHTTP: State: headers-read
2006-05-12 14:19:11.9200 AsyncHTTP: Error reading headers: Bad response status line: '<HTML><BODY><h2>Error 5 No Program Name Found </h2><hr></BODY></HTML>' at
Net/HTTP/Methods.pm line 309.
        ...propagated at D:\slim\server\CPAN/Net/HTTP/NB.pm line 32.

2006-05-12 14:19:11.9208 AsyncHTTP: Error!! for fileno: 0
2006-05-12 14:19:11.9213 SimpleAsyncHTTP: status for http://www.allmusic.com/cg/amg.dll is  - fileno: 0
Can't call method "header" on an undefined value at D:/slim/server/Slim/Networking/SimpleAsyncHTTP.pm line 235.


ok, obviously a crappy page response...but a response beyond control of the plugin or slimserver.  if it is possible to have bogus headers, and have asyncHTTP even report that, maybe it should also safeguard against code following this event from causing a crash?
Comment 6 Andy Grundman 2006-05-12 14:24:00 UTC
OK, now that's a real bug. :)
Comment 7 Andy Grundman 2006-05-12 14:30:36 UTC
Fixed.
Comment 8 Chris Owens 2006-06-12 14:32:02 UTC
Verified fixed in SlimServer Version: 6.3.0 - 7895 - Windows XP - EN - cp1252
Comment 9 James Richardson 2008-12-15 11:58:04 UTC
This bug has been fixed in the latest release of SqueezeCenter!

Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.