Bug 1741 - Slimserver crashes loading podcast for Make blog
: Slimserver crashes loading podcast for Make blog
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Plugins
: 6.1.0
: PC Debian Linux
: P2 normal (vote)
: ---
Assigned To: Dave Cohen
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-01 05:39 UTC by Chris Niekel
Modified: 2008-08-18 10:54 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
avoid crash when playing (446 bytes, patch)
2005-07-08 02:08 UTC, KDF
Details | Diff
fix browser (1.57 KB, patch)
2005-07-08 02:29 UTC, KDF
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Niekel 2005-07-01 05:39:14 UTC
Adding the make podcast to the slimserver works fine. The URL is http://
makezine.com/blog/archive/make_podcast/index.xml

But when selecting the podcast, the slimserver crashes:
2005-07-01 14:27:51.0588 Podcast: got http://makezine.com/blog/archive/make_podc
ast/index.xml
2005-07-01 14:27:51.0590 Podcast: content type is text/xml
Pseudo-hashes are deprecated at /home/chris/proj/slimserver/myversion/trunk/serv
er/Slim/Buttons/PodcastBrowser.pm line 642.
Argument "\x{68}\x{74}..." isn't numeric in hash element at /home/chris/proj/sli
mserver/myversion/trunk/server/Slim/Buttons/PodcastBrowser.pm line 642.
Bad index while coercing array into hash at /home/chris/proj/slimserver/myversio
n/trunk/server/Slim/Buttons/PodcastBrowser.pm line 642.
Comment 1 Dan Sully 2005-07-01 11:09:24 UTC
Dave - thoughts?
Comment 2 KDF 2005-07-08 01:54:34 UTC
looks like some of the enclosures are arrays:

$VAR1 = {
          'length' => '14231445',
          'url' => 'http://downloads.oreilly.com/make/MAKE_2005-07-01.mp3',
          'type' => 'audio/mpeg'
        };
$VAR1 = {
          'length' => '7415606',
          'url' => 'http://downloads.oreilly.com/make/MAKE_2005-06-27.mp3',
          'type' => 'audio/mpeg'
        };
$VAR1 = {
          'length' => '17536835',
          'url' => 'http://downloads.oreilly.com/make/MAKE_2005-06-17.mp3',
          'type' => 'audio/mpeg'
        };
$VAR1 = [
          {
            'length' => '7124191',
            'url' => 'http://downloads.oreilly.com/make/Make_2005-06-06.mp3',
            'type' => 'audio/mpeg'
          },
          {
            'length' => '5357527',
            'url' => 'http://downloads.oreilly.com/make/podcastingwwdc.mp3',
            'type' => 'audio/mpeg'
          }
        ];

I guess its barfing when it gets to the last one, an array of 2. just leaving a
note in case I'm too clueless to get much farther :)
Comment 3 KDF 2005-07-08 02:08:31 UTC
Created attachment 612 [details]
avoid crash when playing

if the podcast has an enclosure with an array of elements, the server would
crash becuase the enclosure is treated as a simple hash.  avoid the crash by
taking the first element only.	brute force style!

still crashes if navigating right into the podcast details, but thats another
problem.  Will try something similar and hopefully have a patch shortly.
Comment 4 KDF 2005-07-08 02:29:17 UTC
Created attachment 613 [details]
fix browser

Same problem when browsing.  I've just assumed that the arrays are because of
some sort of mirroring, so it should be ok just taking the first one in both
cases.	There is still some untie warnings coming up, but the example podcast
works without a crash.	I tried the default ones too, to make sure they were
still safe.  

Since this is Dave's baby, I didn't want to just commit it, but hopefully this
is good enough to be put in for the beta2 even if, perhaps, there is a better
solution that still keeps the other array data.
Comment 5 KDF 2005-07-08 09:17:51 UTC
committed to trunk at change 3654
Comment 6 KDF 2005-07-12 18:24:37 UTC
second part (somehow ommitted) in at change 3678
Comment 7 Chris Owens 2008-03-11 11:28:25 UTC
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!