Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

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, 06:05 GMT+2
Last edited by Nils Wallménius (nls) - Sunday, 14 December 2008, 11:16 GMT+2
Task Type Bugs
Category User Interface
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
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, 11:16 GMT+2
Reason for closing:  Accepted
Additional comments about closing:  Patch committed, thanks!
Comment by Keith Perri (perrikwp) - Sunday, 14 December 2008, 06:11 GMT+2
Here is a screen dump showing the corruption:
Comment by Keith Perri (perrikwp) - Sunday, 14 December 2008, 08:11 GMT+2
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!
   font_load_fix.diff (0.5 KiB)
 apps/settings.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Loading...