dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Possible bug in fat.c
From: c s (
Date: 2003-06-19

At line 406 of fat.c, inside of function fat_mount()
is this bit of code :

/* calculate freecount if unset */
if ( fat_bpb.fsinfo.freecount == 0xffffffff )

There seems to be something wrong with calling
fat_recalc_free() from this point. When I deleted the
if statement so that fat_recalc_free() was always
called, something is amiss.

When fat_recalc_free() gets called during the disk
mount at bootup, the lcd backlight goes off while the
fat recalc is taking place and then comes back on. I
have a long backlight timeout so it's not the normal
backlight timeout.

When fat_recalc_free() is called during the disk mount
at the end of a USB session it's even worse. Rockbox
crashes with the following display:

at 0002FDA0

Even in the case when it doesn't crash, the fact that
the lcd backlight goes off and on indicates that
something isn't right with either execution of this

I know that fat_recalc_free() works when called from
other places because it works OK when it is called
from the debug menu and I also added a call to it from
elsewhere in the code that works OK.

I'm guessing that either this piece of code has never
been exercised and that for some reason there is a
problem with calling fat_recalc_free() from inside
fat_mount() (stack overflow maybe?), or possibly that
I have some strange timing issue with my hardware that
causes the buggy behavior only when called from this
one place in the code.

Can someone else try this on their unit to check if
they get similar behavior?


Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

Page was last modified "Jan 10 2012" The Rockbox Crew