• Status Closed
  • Percent Complete
  • Task Type Bugs
  • Category LCD
  • Assigned To No-one
  • 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 Uchida - 2009-04-09
Last edited by Uchida - 2010-05-28

FS#10112 - Rockbox abort: search of title when the database is created by illegal codepage.

Default codepage is set to UTF-8.

The usagi.mp3 is copied onto your player, and the database creates or updates.

After restart Rockbox. you operate Database > Track.
Then Rockbox abort.
(If you use ARM CPU’s player, Rockbox outputs “XXXXX Divide by zero”.)

The cause of this bug is as follows.

usagi.mp3: title 0x82a4 0x82b3 0x82ac (codepage: SJIS In Japanese “うさぎ”)

Because the default codepage is UTF-8, Rockbox tries the output of “0x82a482b382ac”.

When each byte of the title is included 0×80 - 0xbf like the example above, this bug happens.
(Similarly Artist, Album have the possibility to be happened.)

For the function lcd_puts_style_offset() (in firmware/drivers/lcd-*.c),
utf8length() executes.

Then, because of utf8length(”0x82a482b382ac”) == 0,
the following processing abort

   xpos = x*w / utf8length((char *)str);

I think that correspondence is necessary because Rockbox aborts though it is the bug that occurs by a wrong operation.

This bug may happen following codepages.
- CP1251
- iso8859-11
- CP1256
- iso8859-2
- CP1250
- GB2312
- KSX1001
- BIG5

I send this bug’s patch.

Closed by  Uchida
2010-05-28 10:37
Reason for closing:  Fixed
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

this bug fixed

In the latest version (r26351), I confirmed that this problem did not occur.


Available keyboard shortcuts


Task Details

Task Editing