FS#12065 - Database RAM cache doesn't work with Chinese-simp

Attached to Project: Rockbox
Opened by William Xie (sinless) - Friday, 15 April 2011, 14:25 GMT
Last edited by Nils Wallménius (nls) - Thursday, 02 June 2011, 14:26 GMT
Task Type Bugs
Category Database
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Release 3.8.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


when using simp-chinese and open database RAM cache, enter database choose one of the sections,rockbox then freeze.only happens with simp-chinese.have already tested on 7 ipods.gen1~5 have the same problem,ipod classic will show a data abort.

This task depends upon

Closed by  Nils Wallménius (nls)
Thursday, 02 June 2011, 14:26 GMT
Reason for closing:  Fixed
Additional comments about closing:  Better to reopen if needed
Comment by William Xie (sinless) - Friday, 15 April 2011, 14:33 GMT
The data abort show on ipod classic is:
Data abort
at 00000528
(domain 15,fault 7)
address 0xb6ac02c8
Comment by Nils Wallménius (nls) - Monday, 02 May 2011, 08:48 GMT
This is reproducible on a sim, The crash happnes in strlen called from tagcache:get_next (line1487 in todays svn) because a pointer passed to strlen is corrupted i haven't found why though
Comment by Li Jie (jaylee) - Saturday, 21 May 2011, 15:22 GMT
I also found this on SA9200.
Comment by sideral (sideral) - Saturday, 28 May 2011, 22:28 GMT
There's a good chance that this regression was introduced with r26192 ( FS#10976  - make the <Untagged> string translatable). I found a problem with this change when I was working on  FS#12132 :

* The translation was done too early: before the tagnavi format clauses were checked. This prevented comparisons against "<Untagged>" when a non-English translation was active.
* The code overwrote the buffer containing the constant string "<Untagged>" with the translation. This is neither safe nor necessary: The result pointer simply can be swapped with a pointer to the translation.

Could you please check whether either backing out r26192 or applying the attached patch fixes the problem?
Comment by Nils Wallménius (nls) - Sunday, 29 May 2011, 17:43 GMT
Good catch, that patch does indeed fix the crash
Comment by sideral (sideral) - Wednesday, 01 June 2011, 08:27 GMT
  • Field changed: Status (Unconfirmed → Requires testing)
Fix committed as r29941.

I'll close this task in a couple of weeks unless someone reports that the problem remains or any regressions pop up.
Comment by William Xie (sinless) - Wednesday, 01 June 2011, 16:08 GMT
It works now,thanks~