Bugzilla – Bug 1822
Trying to use SHOUTCast now crashes SlimServer
Last modified: 2008-08-18 10:54:16 UTC
As of this evening, attempting to use SHOUTcast Internet Radio causes SlimServer to crash when it is pulling down the playlist. Specifically, clicking on SHOUTcast Internet Radio under Radio on the web UI causes an instant crash. Output of http://shoutcast.com/sbin/xmllister.phtml?service=SliMP3&limit=300 follows: x�MQMo�0��+�Ɖ�!�--چ�%Hm�4M��F�4����?Z�Ų����m1�+4�b�51D}h2�+�wW�]o��ɥ�c�C� �Iċ2�(_gS*D��N+��l�4�R�bv�'>-רc�|���LR��%d? "t�`A��H�m�//9��:r��a*�l��Z���+O� �R��������\}*?d��P�%τ$x�%�b ה=Q|;͕�,�g�22���6$�h*LV� �� TX�@+e�`?�IR�1�Ѓ���e�vĚ�) 9ECoH����Q������m~��/������t�K�� Log follows: 2005-07-14 22:12:10.7471 processURL Clients: 192.168.1.101:38250 2005-07-14 22:12:10.7475 Generating response for (htm, text/html) plugins/ShoutcastBrowser/ index.html 2005-07-14 22:12:10.7477 generating from include.html 2005-07-14 22:12:10.7499 Shoutcast: next update Fri Jul 15 22:12:10 2005 2005-07-14 22:12:10.7503 Shoutcast: async request 2005-07-14 22:12:10.7505 SimpleAsyncHTTP: getting http://shoutcast.com/sbin/xmllister.phtml? service=SliMP3&limit=300 2005-07-14 22:12:10.7507 cracked: http://shoutcast.com/sbin/xmllister.phtml? service=SliMP3&limit=300 with [shoutcast.com],[80],[/sbin/xmllister.phtml?service=SliMP3&limit=300] 2005-07-14 22:12:10.7509 AsyncHTTP: Connecting to shoutcast.com 2005-07-14 22:12:10.8114 AsyncHTTP: Sending request: GET /sbin/xmllister.phtml?service=SliMP3&limit=300 HTTP/1.1 Connection: close Host: shoutcast.com:80 Icy-Metadata: 1 User-Agent: iTunes/4.7.1 (Macintosh; N; Mac OS X 10.4.2 (8C46); ppc-darwin; EN; utf8) SlimServer/ 6.1b2/trunk Cache-Control: no-cache Accept: */* 2005-07-14 22:12:10.8116 writeNoBlock: writing a segment of length: 271 2005-07-14 22:12:10.8119 adding select error Slim::Networking::AsyncHTTP=GLOB(0x751348) CODE (0x1b22878) 2005-07-14 22:12:10.8122 adding select read Slim::Networking::AsyncHTTP=GLOB(0x751348) CODE (0x1b220f0) 2005-07-14 22:12:10.8128 End request: keepAlive: [1] - waiting for next request on connection = keep-alive 2005-07-14 22:12:10.8130 firing high timer 0.0237839221954346 late. 2005-07-14 22:12:10.8132 writeNoBlock: writing a segment of length: 1290 2005-07-14 22:12:10.8134 settimer High: CODE(0x1cb0434), now: 1121397130.81342, time: 1121397130.93919 2005-07-14 22:12:10.8137 select_time: 0.125495195388794 2005-07-14 22:12:10.9396 select returns (0.125495195388794): reads: of 9 writes: of 0 errors: of 5 2005-07-14 22:12:10.9398 firing high timer 0.000574827194213867 late. 2005-07-14 22:12:10.9400 writeNoBlock: writing a segment of length: 1290 2005-07-14 22:12:10.9402 settimer High: CODE(0x1cb0434), now: 1121397130.94023, time: 1121397131.08919 2005-07-14 22:12:10.9405 select_time: 0.148686408996582 2005-07-14 22:12:11.0895 select returns (0.148686408996582): reads: of 9 writes: of 0 errors: of 5 2005-07-14 22:12:11.0897 firing high timer 0.000491619110107422 late. 2005-07-14 22:12:11.0899 writeNoBlock: writing a segment of length: 1290 2005-07-14 22:12:11.0902 settimer High: CODE(0x1cb0434), now: 1121397131.09015, time: 1121397131.23919 2005-07-14 22:12:11.0904 Idle loop speed: 8 iterations per second 2005-07-14 22:12:11.0906 select_time: 0.148632287979126 2005-07-14 22:12:11.2395 select returns (0.148632287979126): reads: of 9 writes: of 0 errors: of 5 2005-07-14 22:12:11.2397 firing high timer 0.00047755241394043 late. 2005-07-14 22:12:11.2399 writeNoBlock: writing a segment of length: 1290 2005-07-14 22:12:11.2402 settimer High: CODE(0x1cb0434), now: 1121397131.24014, time: 1121397131.38919 2005-07-14 22:12:11.2404 select_time: 0.148771524429321 2005-07-14 22:12:11.3345 select returns (0.148771524429321): reads: 1 of 9 writes: 0 of 0 errors: 0 of 5 2005-07-14 22:12:11.3356 removing select error Slim::Networking::AsyncHTTP=GLOB(0x751348) 2005-07-14 22:12:11.3359 removing select write Slim::Networking::AsyncHTTP=GLOB(0x751348) 2005-07-14 22:12:11.3362 AsyncHTTP: Headers read. status=OK 2005-07-14 22:12:11.3364 SimpleAsyncHTTP: status for http://shoutcast.com/sbin/xmllister.phtml? service=SliMP3&limit=300 is OK 2005-07-14 22:12:11.3366 adding select error Slim::Networking::AsyncHTTP=GLOB(0x751348) CODE (0x1b22878) 2005-07-14 22:12:11.3368 adding select read Slim::Networking::AsyncHTTP=GLOB(0x751348) CODE (0x1b222a0) 2005-07-14 22:12:11.3373 select_time: 0.0519404411315918 2005-07-14 22:12:11.3376 select returns (0.0519404411315918): reads: 1 of 9 writes: 0 of 0 errors: 0 of 5 2005-07-14 22:12:11.3382 select_time: 0.0509743690490723 2005-07-14 22:12:11.3385 select returns (0.0509743690490723): reads: 1 of 9 writes: 0 of 0 errors: 0 of 5 2005-07-14 22:12:11.3389 removing select error Slim::Networking::AsyncHTTP=GLOB(0x751348) 2005-07-14 22:12:11.3392 removing select write Slim::Networking::AsyncHTTP=GLOB(0x751348) 2005-07-14 22:12:11.3395 AsyncHTTP: Body read 2005-07-14 22:12:11.3397 Shoutcast: get XML content 2005-07-14 22:12:11.3398 Shoutcast: parse XML 2005-07-14 22:12:11.3424 Shoutcast: custom genres 2005-07-14 22:12:11.3426 Shoutcast: extract streams Not an ARRAY reference at /Users/smkelly/Library/PreferencePanes/SlimServer.prefPane/Contents/ server/Plugins/ShoutcastBrowser/Plugin.pm line 380. 2005-07-14 22:12:11.3429 Got to the END. 2005-07-14 22:12:11.3430 Got sigint. 2005-07-14 22:12:11.3431 SlimServer cleaning up. 2005-07-14 22:12:11.3454 forceCommit: syncing to the database. 2005-07-14 22:12:11.5847 mDNS: stopAdvertising() 2005-07-14 22:12:11.5851 mDNS: Killed PID: 12642 2005-07-14 22:12:11.5934 SimpleAsyncHTTP(http://shoutcast.com/sbin/xmllister.phtml? service=SliMP3&limit=300) destroy called. 2005-07-14 22:12:11.5938 removing select error Slim::Networking::AsyncHTTP=GLOB(0x751348) 2005-07-14 22:12:11.5942 removing select write Slim::Networking::AsyncHTTP=GLOB(0x751348) 2005-07-14 22:12:11.5945 before: 0/0 2005-07-14 22:12:11.5946 removing select write Slim::Networking::AsyncHTTP=GLOB(0x751348) 2005-07-14 22:12:11.5947 now: 0/0
To clarify, this is from the 7/14/2005 nightly of 6.1.
Created attachment 638 [details] deal with a non-array reponse seems to be one of those rare times when shoutcast has but ONE item to respond with. This crash is caused because the plugin is expecting a list of entries as an array. Without this, perl doesn't respond well. this patch does a quick test and performs one of two operations to create a safe array to parse.
This is odd. It's not a rare case but seems to be standard now. I can't get any more than that single stream. I'll visit shoutcast.com... The patch is fine for me, thanks.
http://www.shoutcast.com/ does only list that single stream as well - no problem on our side.
the only question is, that the patch still works with a proer shoutcast listing. of course, with AOL in control I have little faith in anything returning to what we would call normal any time soon. perhaps we should send some of our users there way to nag then to death ;)
Created attachment 642 [details] verify streams list where we get it I'd prefer to check the existence of that array where we actually extract the data. Plus get rid of an error message if there are less streams than set in plugin_shoutcastbrowser_max_popular.
Created attachment 643 [details] Have XML::Simple always return an array... Why not rtfm and leave the job to the pros :-)? XML::Simple has the parameter we need: ForceArray.
Tested successfully after Shoutcast is back. Checked in as change 3707. (I'm sorry, I can't close the bug...)
vidur mentioned merging back from squeezeNetwork version. re-assigning so he can merge and close.
Backported SqueezeNetwork change with change 3710.
This bug was marked resolved in Slimserver 6.1, which is several versions ago. If you're still seeing this bug, please re-open it. Thanks!