Rockbox

Tasklist

FS#9637 - Changing to a theme that uses a non-existing font causes text corruption.

Attached to Project: Rockbox
Opened by Keith Perri (perrikwp) - Sunday, 14 December 2008, 05:05 GMT
Last edited by Nils Wallménius (nls) - Sunday, 14 December 2008, 10:16 GMT
Task Type Bugs
Category User Interface
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

Details

On r19432, when loading a new theme that contains a font that doesn't exist on the target player causes the player's text to become corrupt. Doing the same actions on a target simulator causes the sim to crash.
After a restart of the player the default font is then loaded. I far as I know, the default font should have been loaded in the first place, but for some unknown reason doesn't.

Tested on target Gigabeat F40, Gigabeat F sim, and iPod Video sim.

When I get a chance, I will be happy to upload a screenshot of the corruption and attempt to find which revision caused this bug.
This task depends upon

Closed by  Nils Wallménius (nls)
Sunday, 14 December 2008, 10:16 GMT
Reason for closing:  Accepted
Additional comments about closing:  Patch committed, thanks!
Comment by Keith Perri (perrikwp) - Sunday, 14 December 2008, 05:11 GMT
Here is a screen dump showing the corruption:
Comment by Keith Perri (perrikwp) - Sunday, 14 December 2008, 07:11 GMT
Here is a small patch to fix the bug. The reason this was happening was because the theme loading code wasn't checking if the font file existed or not. This patch inserts a check to see if the font_load function returns NULL (Font file doesn't exist), if it does return NULL, then it resets the font settings.

This patch was tested on my Gigabeat F and does indeed fix the bug. Thanks!

Loading...