Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bugs
  • Category Music playback
  • Assigned To
    nicolas_p
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by bsl84 - 2008-06-03
Last edited by Buschel - 2011-02-13

FS#9066 - Threads hanging if force track switching near buffer emptyness

Build 17661 (and earlier) on Gigabeat F20, iCatcher.
Playing directory containing FLAC files. Last file ends.
In file browser select and load another track/directory (File still plays).
Result - ‘Unknown track’, ‘Unknown album’, valid file name. Silence … Debug|Show buffering thread - all empty, except bottom one.
In this state select/play does not work, any next file would get the same ‘Unknown album’ and still silence.
Only reboot helps.
I suppose it happens when buffering thread filling (or just filled) buffers, forcing track switching must empty filled buffers and refill it. Empty is OK, but filling is no..
Switch to rockbox dated before 2007/08 - the error gone.

Closed by  Buschel
2011-02-13 20:10
Reason for closing:  Works For Me
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

I close this bug report as outdated and because I cannot reproduce such failure. We have other issues right now which are covered in several bug reports.

Does this still happen after r17875?

bsl84 commented on 2008-06-29 18:19

build 17876.
The problem persists.
The same sympthoms.
Problem with hanging when playing long files seems gone.

Could you report the exact values displayed on the buffering debug screen?
I’m especially interested in the number of handles, but the other values might be useful too.

bsl84 commented on 2008-07-04 04:02

Exact values on the buffering screen all zeros.
RAM usage, handles count, all zeros.
By the way, this error happens only in the end of directory.
My directory layout is:
music

Brahms
  Op025 ...
    1- Allegro.flac
    2- ...
    ...
    4- ...
  ...
  Op054 ...
    Song of destiny ... flac
  ...
 Spohr
   ...
     ...

e.t.c

There are many directories that contain only one track. I think, it is why this error hard to reproduce by others…

For example, playing Song of destiny.flac, the only track in directory, while it playing, I browse file system and when Song of destiny ends press play on selected track in Spohr directory, the buffering thread dies with beforementioned sympthoms. I can walk, delete - all I want except play ANY track - until reboot.

Is this still happening with a brand new build? Does enabling or disabling directory cache make any difference?

bsl84 commented on 2008-07-09 12:29

It happens also in build 17987.
I’ll try to disable directory cache (slo-o-o-ow)

bsl84 commented on 2008-07-09 16:09

Yet again. Now on iAudio X5. Last build. Disabled dircache. D2 WPS.

When I press PLAY on selected (in browser) track just about end of playing track, it is happens. Now playing screen points to first track on device.

Gigabeat F20/iCatcher/dircache
iAudio X5L/D2/no dircache

Here is my config.cfg on Gigabeat
# .cfg file created by rockbox r17671-080531 - http://www.rockbox.org

volume: -25
balance: 0
bass: 0
treble: 0
channels: stereo
stereo_width: 100
shuffle: off
repeat: off
contrast: 47
backlight timeout: 10
backlight timeout plugged: 60
flip display: off
selector type: bar (inverse)
statusbar: on
scrollbar: on
volume display: numeric
battery display: numeric
time format: 24hour
show icons: on
idle poweroff: 3
max files in playlist: 1000
max files in dir: 800
battery capacity: 2250
car adapter mode: off
backlight filters first keypress: off
caption backlight: off
brightness: 6
scroll speed: 10
scroll delay: 100
bidir limit: 0
Screen Scrolls Out Of View: off
scroll step: 7
screen scroll step: 16
scroll paginated: off
foreground color: 000000
background color: FFFFFF
line selector start color: FFEB9C
line selector end color: B58E00
line selector text color: 000000
play selected: on
party mode: off
volume fade: on
scan min step: 1
scan accel: 3
antiskip: 5s
disk spindown: 5
show files: supported
sort case: off
show filename exts: on
follow playlist: on
playlist viewer icons: on
playlist viewer indices: on
playlist viewer track display: track name
recursive directory insert: on
autocreate bookmarks: off
autoload bookmarks: off
use most-recent-bookmarks: off
peak meter clip hold: 60
peak meter hold: 500ms
peak meter release: 8
peak meter dbfs: on
peak meter min: 60
peak meter max: 0
talk menu: off
talk dir: off
talk dir clip: off
talk file: off
talk file clip: off
talk filetype: off
Announce Battery Level: off
sort files: alpha
sort dirs: alpha
folder navigation: on
gather runtime data: off
replaygain: off
replaygain type: album
replaygain noclip: off
replaygain preamp: 0
beep: off
crossfade: off
crossfade fade in delay: 0
crossfade fade out delay: 0
crossfade fade in duration: 3
crossfade fade out duration: 3
crossfade fade out mode: crossfade
crossfeed: off
crossfeed direct gain: -15
crossfeed cross gain: -30
crossfeed hf attenuation: 160
crossfeed hf cutoff: 700
eq enabled: off
eq precut: 50
eq band 0 cutoff: 60
eq band 1 cutoff: 200
eq band 2 cutoff: 800
eq band 3 cutoff: 4000
eq band 4 cutoff: 12000
eq band 0 q: 7
eq band 1 q: 10
eq band 2 q: 10
eq band 3 q: 10
eq band 4 q: 7
eq band 0 gain: 50
eq band 1 gain: 40
eq band 2 gain: -20
eq band 3 gain: 10
eq band 4 gain: 20
dithering enabled: on
dircache: on
tagcache_ram: on
tagcache_autoupdate: on
default codepage: cp1251
warn when erasing dynamic playlist: on
backlight on button hold: off
hold_lr_for_scroll_in_list: on
show path in browser: current directory
pause on headphone unplug: pause and resume
rewind duration on pause: 3
disable autoresume if phones not present: on
Last.fm Logging: off
font: /.rockbox/fonts/nimbus-19.fnt
wps: /.rockbox/wps/iCatcher.wps
lang: /.rockbox/langs/english.lng
backdrop:
kbd:
usb charging: on
cuesheet support: off
Study mode: off
Study hop step: 6
start in screen: wps
iconset:
viewers iconset:
filetype colours: /.rockbox/themes/-.colours
button light timeout: off
button light brightness: 1
list_accel_start_delay: 2
list_accel_wait: 3
keyclick: off
keyclick repeats: off
playlist catalog directory: /Playlists
touchpad sensitivity: normal

bsl84 commented on 2008-07-30 18:39

Build 18148.
It happens again and again…

bsl84 commented on 2008-10-29 18:30

Situation the same.
Very anoying with my method of listening (browse files near the end of directory for to decide what to listen next.
Where can I get version before this !@#$%^ change (near april 2007, there was very good and stable version)? I need it at least for Gigabeat F20.

Does this only happen with FLAC? I couldn’t repro it (with your settings), but I was using only MP3s.

bsl84 commented on 2008-10-29 21:27

Any format (testing mp3, flac, ogg, aac, mpc).
If you try to browse files at the end of directory (directories I have contain 1-5 files usually), the buffering thread hanged.
There are ‘Unknown artist’ and ‘Unknown album’ on the screen. Only shutdown helps.
ANY new build, 18789 at least.
On X5L and on F20.
I wonder, is there anybody to observe this error, or all using random or album-oriented style.

I think I’ve just reproduced *something* in the simulator (H300) with MP3s.

Basically I select a file from the file browser in the last 4 seconds of the last track in a playlist. This initial selection then fails to play (I return straight back to the browser), and if I then select the same track again it plays ok but the track index is out by 1 for subsequent tracks (i.e. it displays 1,1,2,3 rather than 1,2,3,4 - and the playlist viewer is similarly confused).

Pressing STOP and restarting sorts it out in this case though, so not as bad as you’re suffering.

bsl84 commented on 2008-12-10 12:19

build r19377 get the situation much worse… Now, F20 and X5L deadly hanged, I have to switching the battery off on F20 or reset on X5L… I hope, you are on right direction…

bsl84 commented on 2008-12-10 12:20

I think, I have to switch to versions before, but, unfortunatelly haven’t ones. Where can I get it? For F20 at least…

Sounds like something didn’t upgrade properly - maybe try renaming your .rockbox directory and re-installing?

bsl84 commented on 2008-12-19 06:05

It looks like that 19377 had solved the problem at least.

I’m confused, you said before that this problem was still happening in r19377 (”much worse”). Is this not the case?

bsl84 commented on 2008-12-19 07:38

I had removed old .rockbox and installed all new at scratch - include configuring. Did this just after your recipe. No problem since (I hope).

bsl84 commented on 2008-12-25 10:10

I’m sorry, but the problem yet exists….
Yes, it happens much less frequently, but if it is happens - dead hang. The message ‘Loading’ is on the screen. Keys do not work except when the screen luminance goes off - then the luminance goes on.
I waited for 5 minutes then had to reset…

bsl84 commented on 2009-02-22 14:38

Well.
There is a really serious bug in all new builds (I mention only FX).
Hangs now appear in just playing - suddenly the music stops and the player does not respond to keys. Always HDD is spinning this time. I have to switch battery off then on.
Being tired of all this, I downloaded all SDK‘s, SVN and got build 15305.
A week came without a flaw… So, developers, get some attention to synchronization issues in code (race conditions/deadlocks/resource locks e.t.c)

@bsl84: If you actually want to help us fix the bugs, at least giving an estimation of when the new issue started happening would be a good start.

bsl84 commented on 2009-02-24 22:21

@nicolas_p
You probably misunderstand me. I download all the stuff ONLY to compile the version I know to work for me.
As I see, there are many developers here and no one (mee too) want make really stable and robust RockBox operating system…
I will not participate to develop, too many efforts to get through this C language code with endless #ifdef and #define, global and static variables and cooperative multitasking… Thanks for great product (it much more stable than production COWON firmware), but it is not for me.

MikeS commented on 2009-02-25 01:33

Sergey, you have my vote for preemptive multitasking! I’ll jump on that and implement it in a hearbeat. As far as it being as formally divided between user and supervisor modes, I can’t say I would go for that. It’s not really a general-purpose operating system and there are advantages to not turning it into something like Linux or Windows or whatever. That’s a bit excessive. The threading change has distinct advantages and if code is properly written for that, it really is not much more complex (in most cases not at all).

We’ll never fully remove #ifdef and also support so many devices and we’re not going to duplicate tons of code to do it. You can global and static variables and still have good abstraction. It just requires planning and planning ahead rather than evolution and just getting the immediate task at hand to work. What’s the difference if they’re part of some global object or global as a variable? Effectively none. Too much focus on form of the code rather than quality of the code can just give you bloated code that isn’t really any better than the C.

Remaining lightweight is a worthy goal for this particular application.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing