FS#12400 - Quickscreen freezes iAudio X5V on builds newer than rel 3.9.1

Attached to Project: Rockbox
Opened by Abel (username_already_taken) - Wednesday, 23 November 2011, 00:07 GMT
Last edited by Frank Gevaerts (fg) - Sunday, 27 November 2011, 15:37 GMT
Task Type Bugs
Category User Interface
Status Closed
Assigned To No-one
Operating System iAudio X5
Severity High
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Present in builds r31036, 40, 42 and 45, at least.

I initially thought it was somewhat reproducible in a simulator due to the absence of the top/bottom quickscreen defaults, but it seems those were intentionally removed, so the sim is performing correctly.
However, my X5V freezes every time I hold REC long enough to call the quickscreen. Sometimes the quickscreen is displayed but cannot be interacted with, others the display freezes immediately.

3.9.1 and earlier releases, that still show the top and bottom defaults, seem to have no issues. Assigning functions to the top and bottom slots before using the quickscreen does not appear to prevent the problem.
This task depends upon

Closed by  Frank Gevaerts (fg)
Sunday, 27 November 2011, 15:37 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in r31075
Comment by Stephen Carroll (StephenCarroll) - Thursday, 24 November 2011, 11:09 GMT
Can also reproduce this on r31045 - 111122
Seems like it's accessing the disk, as the disk icon appears then it crashes and needs the paperclip to reset.
Comment by Marianne Arnold (pixelma) - Thursday, 24 November 2011, 12:54 GMT
I couldn't reproduce this on my M5 running build r30933 yet, although I admit that my unit is a bit different. At first I thought it could be dircache related as I have it switched off usually (and because of Stephen's observation) but turning it on didn't help me trying to reproduce this.

But it made me think that it *could* be helpful to see your settings - so maybe one (or either) of you could post the config.cfg in the .rockbox folder?
Comment by Abel (username_already_taken) - Thursday, 24 November 2011, 13:34 GMT
The bug is present with Rockbox's default settings, but here's my typical config anyway.
Comment by Abel (username_already_taken) - Thursday, 24 November 2011, 13:59 GMT
Update: I deleted .rockbox, extracted r31045 to the HDD and started the X5V. I called the quickscreen as soon as it booted and it didn't freeze the first time. I turned it off, started playback and tried again and it froze.
I deleted .rockbox and installed r31045 one more time to repeat the experiment but this time it froze on my very first attempt.
I reinstalled r31045 once more, turned off dircache, rebooted and called the quickscreen: freeze once again. Hope any of this helps.
Comment by Frank Gevaerts (fg) - Thursday, 24 November 2011, 21:12 GMT
This also happens on the 3.10 branch
Comment by Frank Gevaerts (fg) - Sunday, 27 November 2011, 13:24 GMT
I bisected the lot, and the culprit seems to be r30814
Comment by Frank Gevaerts (fg) - Sunday, 27 November 2011, 15:37 GMT
The problem seems to be that font_lock() (introduced in r30814) accesses arrays out of bounds when called with FONT_UI, which apparently happens when initialising the remote display for the quickscreen.

The current font arguably shouldn't be set to FONT_UI at that point any more, so there might be a bug in the startup code somewhere, but guarding the font_*() functions against invalid ids makes things work.