FS#9039 - *PANIC* event line full (reproduceable)

Attached to Project: Rockbox
Opened by PaulJam (PaulJam) - Sunday, 25 May 2008, 18:32 GMT
Last edited by Bertrik Sikken (bertrik) - Monday, 26 May 2008, 07:11 GMT
Task Type Bugs
Category Music playback
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


When you start playing a file it sometimes happens that the message "*PANIC* event line full" is displayed over the WPS backdrop.

The following settings are needed for reproduction, the other settings should propably be at the default value:
Gather runtime data: on (i guess the Database has to be initialized too)
Directorycache: on
Last-FM logging: on
Repeat: off
Shuffle: on
Start the player with those settings and then start playing a playlist or a directory.
Go to the filebrowser and select from the context menu of a musicfile "Playlist => Play Next". Enter the WPS and in order to speed up the process skip to the next track and then fast forward near the end of the track. When playback has finished enter the quickmenu and disable shuffle, then select a musicfile and press SELECT/NAVI. now it should show a "loading" splash and then crash immediately with the above error message.

If you know an easier way to reproduce this please post it here.

H300 with r17628 (doesn't seem to be reproduceable in the uisim)
This task depends upon

Closed by  Bertrik Sikken (bertrik)
Monday, 26 May 2008, 07:11 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 17632
Comment by Bertrik Sikken (bertrik) - Sunday, 25 May 2008, 20:59 GMT
I can confirm that this recipe also reproduces the problem for e200 (svn 17628).
Comment by Bertrik Sikken (bertrik) - Sunday, 25 May 2008, 21:47 GMT
Slightly simpler reproduction recipe (tested on e200), settings:
* gather runtime data: ON
* dircache: off (not important)
* logging: ON
* repeat: off (not important)
* shuffle: OFF
Now to reproduce:
* start playing a directory
* using the quickscreen, turn shuffle ON
* start playing another directory, panic occurs within 30 seconds or so
The crucial part seems to be to switch on shuffle while a playlist is already playing.
I noticed that just before the panic, the buffering screen showed that the cpu stayed boosted despite all buffers being filled.

Looking a bit closer at the code, it seems that it is theoretically possible for 11 events to be registered (10 slots are available):
* 1 event (PLAYBACK_EVENT_TRACK_CHANGE) in scrobbler.c
* 5 events (DISK_EVENT_SPINUP through register_ata_idle_func): 1x in playback.c, 1x scrobbler.c, 2x in settings.c, 1x in tagcache.c
Maybe the events array just needs to be a little bit bigger?
Comment by Nicolas Pennequin (nicolas_p) - Sunday, 25 May 2008, 21:55 GMT
Wow, it seems you're spot on. Last time I checked, I failed to notice what was going on with register_ata_idle_func. I think we just need to slightly increase the array size, as you mentioned. Please feel free to commit the fix :)