Rockbox Technical Forums

Support and General Use => Audio Playback, Database and Playlists => Topic started by: pabouk on June 26, 2006, 08:23:35 AM

Title: bug: Rockbox (randomly) freezes during playback
Post by: pabouk on June 26, 2006, 08:23:35 AM
During the last week I encountered a new bug. I upgrade the firmware to the latest CVS version almost regularly several times per week.

hardware: H120
Rockbox version: 060623-1316
Firstly I observed the problem with a version which was not older than 060615. I cannot find the exact version as the bug appears randomly.
the bug: The firmware freezes during playback. From the first occurrence till today it happened for three times but I cannot replicate the problem. It seems to occur randomly. Before the problem showed I just skipped forward and back several times and used fast forward. Then after several minutes of playback the firmware froze. The disk was not spinning so it is not related to the buffer fill probably.
the files: I encountered the problem on MP3 files. In the table below you can see position in a playlist, filename, length, codec, bitrate, samplerate, filesize and channels. Last time it froze in 11:05 of the 29. file.

19. 00401488.mp3    [43:35]   MP3    64kbps    22050Hz   mono   20927741
20. 00401491.mp3    [19:40]   MP3    48kbps    44100Hz   mono   7094909
21. 00401577.mp3    [2:29]      MP3    24kbps    22050Hz   mono   447478
22. 00401932.mp3    [53:12]   MP3    64kbps    44100Hz   mono   25416933
23. 00402526.mp3    [19:03]   MP3    48kbps    44100Hz   mono   6872558
24. 00402602.mp3    [7:02]      MP3    64kbps    32000Hz   mono   3377524
25. 00402603.mp3    [17:46]   MP3    64kbps    32000Hz   mono   8529268
26. 00402608.mp3    [5:04]      MP3    64kbps    32000Hz   mono   2433172
27. 00402610.mp3    [18:32]   MP3    64kbps    32000Hz   mono   8902804
28. 00403542.mp3    [7:05]      MP3    64kbps    32000Hz   mono   3403732
29. 00403543.mp3    [18:52]   MP3    64kbps    32000Hz   mono   9056884

Did anyone encountered similar problem or do you have ideas how to hunt the bug down to be able to replicate it on demand?

[attachment deleted by admin, too old]
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: fml2 on June 26, 2006, 08:38:55 AM
Quote
the bug: The firmware freezes during playback

This is a very sad fact that RockBox still has problems with playback which is the primary feature of a DAP. That's why I still use the build as old as Apr 04 2006. I cross my fingers and hope for a fix. Good luck and thanks to all the devs!
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: RowaN on June 27, 2006, 08:32:33 AM
I've had freezes lately too.. sometimes when skipping tracks. Best to keep a paperclip handy for reboot! I've not experienced any freezes with the latest CVS build though.... YET!
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: dunno on June 27, 2006, 09:46:02 AM
I get similar freezing only if I use "Follow Album" type playback, which is to let it play albums consecutively without interruption, "auto change directory" on. I dont get any freezing if I create playlists for playback.
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: fatoldpig on June 27, 2006, 06:40:01 PM
i've added a bug report here http://www.rockbox.org/tracker/task/5536
no resolution yet. I only get after it changes the directory
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: pabouk on June 28, 2006, 05:21:00 AM
I do not use "Auto change directory" and I do not usually create playlists manually the playlist showed above is an automatic one (i.e. content of a directory). You can see my settings in the included settings06.cfg.txt.

I tried to let Rockbox play the same playlist for about 8 hours through the last night but it did not froze. Maybe the bug appears only after skipping, seeking or resume functions. I will do further investigation.
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: fatoldpig on June 28, 2006, 01:02:01 PM
recently i've came across another freezing bug.

play a track and stop it in the middle and then shut down the player
start the player (auto-resume is on) and while it's resuming (but before it resumes) press stop. it freezes completely and need a reset
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: RowaN on June 29, 2006, 06:13:54 AM
I have a CVS build from about 3 days ago, and this morning I had a freeze. I skipped to the next track, and while crossfade was happening, I went into the file tree and chose another song. It went back to the WPS but then froze - no sound, and entire screen was static (no progress bar or elapsed/remain movement). Moving the joystick still enabled the backlight. I was unable to power off in the usual way (holding stop). I had no paperclip, but luckily, after 10mins it auto powered off, as it is set to do in my options. I was then able to reboot. Very handy on my 2 hour commute!
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: epithetless on June 30, 2006, 12:10:13 PM
I have a CVS build from about 3 days ago, and this morning I had a freeze. I skipped to the next track, and while crossfade was happening, I went into the file tree and chose another song. It went back to the WPS but then froze - no sound, and entire screen was static (no progress bar or elapsed/remain movement). Moving the joystick still enabled the backlight. I was unable to power off in the usual way (holding stop).

I had a very similar occurrence recently. The build was from sometime in the past 2 weeks (sorry I can't pinpoint, as I update fanatically). Crossfade enabled. As my playlist was changing from one directory to another (as a result of the "insert next" playlisting function, not the auto-changing directory function), I chose a different track from the file browser and the player froze. Backlight was the only thing to respond. Required a hard reset when I got home. Just to lend some plurality to the issue...
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: pabouk on July 04, 2006, 10:45:38 AM
Finally I managed to duplicate the bug after circa 30 hours of testing playback. I tried it on the same playlist of MP3 files with various bitrates and sample rates. In fact I have a suspicion that the bug has something to do with various sample rates.

Now I have a bookmark (approximately 2 minutes before end of a 40 minutes file) with which I can duplicate sometimes a freeze or on demand a similar bug. The steps how to invoke the error are below:

•   Resume playback from the bookmark.
•   Rewind before the time point of bookmark.
•   Wait till the playback continues on the next track (buffer refills).
•   In my case after 5 to 100 seconds appears one of these bugs:

a)   Different track starts to play (not from the beginning) while the WPS still shows information about the track, which was supposed to play till its end. In my case it started to play a track which is fourth in succession. The WPS stays out of sync (although it somehow shows next tracks sequentially) until I skip enough to refill the buffer. Forward and backward seeking does not work normally (probably related to the different sample rate being shown and played).

b)   The firmware freezes. If I resume playback after reset it starts to play the file from the beginning and it freezes at the same point. I have saved the configuration sector for further examination.

Unfortunately I will be on a small vacation till Monday. Then I will examine the bug with a most recent firmware version and I will fill a bug report in flyspray.
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: dunno on July 04, 2006, 07:15:45 PM
please do file a bug report, great work on narrowing it down.
Title: Re: bug - fixed: Rockbox (randomly) freezes during playback
Post by: pabouk on August 01, 2006, 03:08:06 AM
The bug seems to be fixed by Miika. I cannot replicate it anymore:
Quote
31 Jul 08:12   Miika Pekkarinen
apps/playback.c 1.333
apps/playback.h 1.32
Checked the rebuffering code. Might fix buffers desyncing and a system crash.
Now it also does not rebuffer without a reason.
Thank you :)
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: Rincewind on August 02, 2006, 11:59:12 AM
I don't know if this was caused by the fix, but I get dropouts in playback recently. The music is gone for maybe a second and then continues. I had the chance to see the disc spinning one time, but I have my player in my pocket so I can't say if this has something to do with it. It happening randomly, I can't reproduce it at will.

Also, I get "codec failure" sometimes when the player should skip to the next directory after the last track.

Sorry that I can't be more specific.

This happened with a build from about 3 days ago, but there haven't been changes to playback.c, so I suppose it is still there when I upgrade later today.
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: dunno on August 02, 2006, 12:54:32 PM
1). do you have the latest daily build installed.

2). have you personalised the settings, if so try it with the default rockbox settings, i.e. do a reset by holding down the record button just after it has been switched on. then add your personal settings one at a time until you get the bug.

Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: Rincewind on August 02, 2006, 01:25:53 PM
It can take a while until I get dropouts the next time, it happens only when I use the player for about 1 hour, maybe more and not everytime I use the player.

The "codec failure" is more common, though, I try to find a way to reproduce this. I don't expect anyone to be able to do something just because of my post, it's just for information, that not everything is right for me.
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: Lear on August 03, 2006, 03:33:10 AM
If you have your player in a pocket while walking, the disk may have problems reading, which would cause the drop-out. Increasing the anti-skip buffer a little can help, if that's the case. (That's why Miika set the max value to 10 minutes, which I thought was excessively large... :) ).

Codec failure could be caused by a bad file, though it doesn't sound like it in this case...
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: petur on August 03, 2006, 03:49:13 AM
If you have your player in a pocket while walking, the disk may have problems reading, which would cause the drop-out. Increasing the anti-skip buffer a little can help, if that's the case. (That's why Miika set the max value to 10 minutes, which I thought was excessively large... :) ).

This I can't believe....

I use my h340 on my bike (it sits in my pocket) and have never ever experienced dropouts. anti-skip buffer is set default afaik.

If the player is bumping so much it starts skipping, prepare for some serious HD damage soon
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: pabouk on August 03, 2006, 11:36:42 AM
I have noticed a new bug invoked uder similar conditions as the old one. How to reproduce it:
1. Play an MP3 file (not the last one in a directory).
2. Seek near to the end of the file (i.e. 30 seconds before the end).
3. Stop the playback. (Resume point is stored.)
4. Resume the playback by pressing PLAY.
5. Seek before the time point of resume. (Rockbock will rebuffer.)
6. Wait till the beginning of the next track.
7. Sometimes the beggining of the file will be played twice. During the first playback the displayed time will show 0:00 or a nonsensical time.
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: dunno on August 03, 2006, 12:58:16 PM
does this occur with 'Auto Change Directory' enabled or disabled ?
is crossfade enabled or disabled ?.
have you tried the same thing with the DEFAULT rockbox settings ?
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: Rincewind on August 03, 2006, 02:16:11 PM
If you have your player in a pocket while walking, the disk may have problems reading, which would cause the drop-out. Increasing the anti-skip buffer a little can help, if that's the case. (That's why Miika set the max value to 10 minutes, which I thought was excessively large... :) ).

Codec failure could be caused by a bad file, though it doesn't sound like it in this case...

I don't jog with my player, so this isn't the case. And I don't have corrupt mp3s either, failing mp3s work when I select them directly.

I think the cvs updates of today should fix my problems, they started approximatly when I began using the runtimedb.
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: pabouk on August 04, 2006, 03:33:07 AM
does this occur with 'Auto Change Directory' enabled or disabled ?
is crossfade enabled or disabled ?.
have you tried the same thing with the DEFAULT rockbox settings ?
I would have mentioned any "fancy" settings. BTW 'Auto Change Directory' should not affect this bug. You can try it yourself, it is very easy to reproduce.
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: dunno on August 04, 2006, 05:51:32 AM
does this occur with 'Auto Change Directory' enabled or disabled ?
is crossfade enabled or disabled ?.
have you tried the same thing with the DEFAULT rockbox settings ?
I would have mentioned any "fancy" settings. BTW 'Auto Change Directory' should not affect this bug. You can try it yourself, it is very easy to reproduce.
Have you tried to reproduce this bug with rockbox DEFAULT settings, and
Have you done a CLEAN install of ALL files.


p.s. i can reproduce this bug, and I have informed the playback dev of this bug, so hang in there, a fix is in the pipeline.
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: dunno on August 04, 2006, 10:34:29 AM
nope that commit wasn't for this bug
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: Rincewind on August 11, 2006, 07:35:40 AM
ok, i found a way to reproduce my codec failure bug. It has something to do with automatic folder skip and the file browser.

To get this bug (only tested on the Iriver H120) you have to do the following:

1. Enable automatic directory change
2. Play the last file in a directory
3. When the file plays, enter the browser by pressing Navi, but don't select a new file
4. When playing file ends, the disc spins up and tries to load the first song in the next folder but it is not starting, instead I get the splash "codec failure!" or "can't load codec". Then Rockbox tries to load a different file and fails again and so on. If you enter the wps when this is happening (by pressing PLAY) the WPS says "No file!"

My guess is, that directory change needs some data from the wps thread but doesn't get it because we are in file browser.

I was getting this error because I didn't use hold when putting my player in my pocket and NAVI got pressed accidentally.

If someone can confirm this, I post a bug report to Flyspray.
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: bascule on August 11, 2006, 09:11:06 AM
Confirmed exactly as described.

If you go back to the WPS it does eventually calm down and start working, but many folders later...

Tested on H120 with CVS060807
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: MoD on August 11, 2006, 09:22:25 AM
If someone can confirm this, I post a bug report to Flyspray.

With CVS build 060807-1823 for iHP120 I wasn't able to reproduce your freeze. 

I tried directory switches like ../ -> ./nextmusicfolder_in_row/*.mp3 and ../../ -> ./next_artist_folder_in_row/first_album_folder_in_row/*.mp3 . Both worked for me while being in the file browser.
I also tried to play directories where codecs switches occur (mp3 -> ogg, ogg -> mp3) from one directory to the other.  The only bug I found was the next song tag didn't appeared in the WPS while playing the last song of the first directory.
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: Rincewind on August 11, 2006, 09:32:54 AM
I submitted a bug report:

http://www.rockbox.org/tracker/task/5797

bascule and MoD, maybe we can compare our settings and see what is different with our configuration:

crossfade: off
crossfeed: on
eq: on
directory change: on
Tagcache is loaded in RAM (but view is set to "all files")
gather runtime data: on
File Types: only mp3
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: MoD on August 11, 2006, 10:07:13 AM

Your right, maybe it has something to do with the settings, here are mine:

crossfade: off
crossfeed: on
eq: on
directory change: on
Tagcache is not loaded in RAM (but view is set to "all files")
gather runtime data: off
File Types: mp3, ogg

Additional configs maybe also important concerning this issue:

Follow playlist on
Replaygain on
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: bascule on August 11, 2006, 10:22:35 AM
I set the necessary options ('cause I normally use tag cache), rebooted and can still reproduce this bug.

I guess it's one of two things:
Either loading the buffer is disrupted by the file browser being open/in use
Or the file browser itself cannot cope with needing to dynamically change directory view

The only problem I have with the first one is that *I would have thought* that the buffer refill code would check to see if Autochange Directory was set when choosing which songs to bring into the buffer, i.e., it could pre-fetch from the 'next' directory when refilling the buffer near the last song of a folder.

However, it doesn't appear, from my limited testing of playing folders with few songs in and checking the audio thread, that this happens, so when it reaches the end of the last song, it always has to access the disk to fill the buffer and the combination of the buffer fill with the file browser open causes the error.

I've added some of my other config choices that may be relevant...

crossfade: off
crossfeed: off
eq: off
shuffle: off
antiskip: 30s
follow playlist: on
all voicing/talk options: off
dircache: on
directory change: on (obviously :) )
Tagcache is loaded in RAM (but view is set to "all files")
gather runtime data: on
File Types: mostly .ogg
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: Rincewind on August 11, 2006, 04:08:00 PM
so far, only the tagcache in RAM thing is different for MoD

other options I forgot:

follow playlist: on
dircache: on
no voiceing
replaygain: on

tomorrow I do more tests with disabling options and maybe I have look in the code, too. But the whole playback engine is magic for me.
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: MoD on August 12, 2006, 04:07:11 AM
I tried it with your settings as well and it still worked for me (no freeze). This is really strange.

Maybe it has something to do with my version. I'll try to update to the latest CVS and test it again, when I have the time, but at the moment I have to care about some exams.

Good luck
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: Mmmm on August 12, 2006, 10:06:19 AM
Why don't you all try it with default settings? That way you can be sure you are all using the same settings. If the bug doesn't appear, change one setting at a time until you find the culprit.
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: Rincewind on August 12, 2006, 10:47:20 AM
I did more testing.

I cleared my settings at boot to have default settings. I only enabled auto change directory and disabled repeat (don't know why it is enabled in default). The Bug wasn't there.

Next I enabled directory cache, rebooted and now I get the bug!

Settings different from default:
Code: [Select]
auto change directory: on
repeat: off
dircache: on

This is the interesting part of the logfdump (read it from bottom up)
the complete log is in the attachment.
Code: [Select]
Codec failure                 
Codec load error:-1           
Codec load disk               
Codec: Unsupported           
Postbuffer:3/3               
End-of-playlist               
Open failed                   
Open failed                   
Open failed                   
Open failed                   
Open failed                   
Open failed                   
Open failed                   
Open failed                   
Open failed                   
Open failed                   
Buffering track:3/3           
Clearing tracks:3/3, 0       
Starting buffer fill         
Clearing tracks:3/3, 1       
Forcing rebuffer             
bind: 0//.rockbox/.playlist_c
Check new track buffer       
Request new track             
Codec failure                 
Codec load error:-1           
Codec load disk               
Codec: Unsupported           
Postbuffer:2/2               
End-of-playlist               
Open failed                   
Open failed                   
Open failed                   
Open failed                   
Open failed                   
Open failed                   
Open failed                   
Open failed                   
Open failed                   
Open failed                   
Buffering track:2/2           
Clearing tracks:2/2, 0       
Starting buffer fill         
runtimedb gathering not enabl
Clearing tracks:2/2, 1       
Forcing rebuffer             
bind: 0//.rockbox/.playlist_c
Check new track buffer       
Request new track             
Codec failure                 
Codec load error:-1           
Codec load disk               
Codec: Unsupported           
Codec finished               
New codec:0/3                 
Postbuffer:1/1               
End-of-playlist               
Open failed                   
Open failed                   
Open failed                   
Open failed                   
Open failed                   
Open failed                   
Open failed                   
Open failed                   
Open failed                   
Open failed                   
Buffering track:1/1           
Clearing tracks:1/1, 0       
Starting buffer fill         
runtimedb gathering not enabl
Clearing tracks:1/1, 1       
Forcing rebuffer             
bind: 0//.rockbox/.playlist_c
DMA No Data:0x0001                 <---------------- I think this is a clue
Check new track buffer       
Request new track

[attachment deleted by admin, too old]
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: Febs on August 12, 2006, 12:22:10 PM
I get a very similar bug when playing Jewels and listening to music at the same time.  To reproduce:

--Play music.
--Play Jewels.
--Exit Jewels and continue listening to music.

Music will play normally at first, but eventually I will get a codec failure or codec not found error.  I don't know if this is a related bug, but I'll try to do some testing to figure out exactly what triggers the failure (change directories, etc.)
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: pabouk on August 30, 2006, 11:50:48 AM
After returning from holidays I checked existence of this bug  (http://forums.rockbox.org/index.php?topic=5018.msg43466#msg43466) in the latest firmware. It is still there so I filled a bug report (http://www.rockbox.org/tracker/task/5906).

Could anyone send me a logf enabled build for H120 so I can check it more thoroughly? I am to lazy to install the build environment ;)
Title: Re: bug: Rockbox (randomly) freezes during playback
Post by: W00DY on August 31, 2006, 04:01:38 PM
Today I received a brandnew iPod photo and installed rockbox on it with the 31/08 build. It frooze a few times within minutes while playing MP3's.
The settings where unchanged... so very default

Then I took a build that is 10 days older and this one is stable
It played for hours without any trouble