Bug 8720 - Pausing Rhapsody MP3 track for too long causes problems
: Pausing Rhapsody MP3 track for too long causes problems
Status: CLOSED FIXED
Product: SB 2/3
Classification: Unclassified
Component: Rhapsody
: 100
: PC Other
: P1 normal (vote)
: ---
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-13 10:09 UTC by Andy Grundman
Modified: 2008-12-18 11:42 UTC (History)
3 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Grundman 2008-07-13 10:09:27 UTC
If you pause a Rhapsody track for too long, after resume the decoder doesn't seem to work properly anymore.  It reports it has reached the end of the file when it really hasn't.  Advancing to the next track works fine.
Comment 1 Andy Grundman 2008-07-14 10:51:52 UTC
Ran into another problem here, sometimes the player will crash due to the mp3 decoder getting MAD_ERROR_BUFPTR.
Comment 2 Andy Grundman 2008-07-14 14:21:13 UTC
OK I think I figured this bug out.  After pausing for a while the SSL session is invalidated, so upon resume it needs to use the decoder memory to do the first getEA request.

This bit of code had the bug:

#ifdef DECODE_THREAD_DEBUG
                                now = timer_get_ticks();
                                decoded = decode_func_callback();
                                if (decoded) {
                                        time_t decoder_time = timer_get_ticks() - now;
                                        decoder_total_time += decoder_time;
                                        if (decoder_time > decoder_max_time) {
                                                decoder_max_time = decoder_time;
                                        }
                                        decoder_frames++;
                                }
#else

                                decode_mem_lock();
                                decoded = decode_func_callback();
                                decode_mem_unlock();

#endif

Since we have DECODE_THREAD_DEBUG defined, the decoder callback was not being wrapped in mem_lock/mem_unlock, causing the SSL memory use to stomp all over the decoder memory, causing crashes or just failures.

For some reason, even setting DECODE_THREAD_DEBUG to 0 still executes all the debug code, so I have added mem_lock/mem_unlock within the debug section.

7.1 r4507.
Comment 3 James Richardson 2008-07-16 15:55:37 UTC
This appears to be addressed in

SqueezeCenter 7.1-21796
Controller 7.1 r2699
Receiver r36
SB2/3 r101
Transporter r49

Pausing each of the players for 1+hour I was unable to generate any errors, or od behavior.
Comment 4 Chris Owens 2008-07-30 15:27:55 UTC
This bug has now been fixed in the 7.1 release version of SqueezeCenter!  Please download the new version from http://www.slimdevices.com 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.
Comment 5 James Richardson 2008-12-15 12:31:46 UTC
This bug has been fixed in the 7.3.0 release version 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.