Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tryppy

macrumors member
Original poster
Nov 26, 2007
90
0
( no.. not another rate my battery thread. :eek: )

Has anyone seen this happen? I know it would be fixed with a simple restore and I have no objection to that but I found this comical.

Nothing else seems to be affected on the phone. When I noticed the error I plugged my phone in right away to reach 21% and watched it go down again. Different percentage this time but still messed :D

6f0eon.jpg


I think it's safe to say I have the best battery life of any iPhone user. ( just don't look up at the 20% battery on the status bar :rolleyes: )
 
Did you change your font at all normally that is what causes it

I haven't changed it myself. May have been done within LockInfo perhaps. I don't recall this every happening before it was installed. I did mess around with it quite a bit to get my lock screen the way it is now but I myself haven't touched any fonts and they all look stock
 
I have read one other thread about this happening. On that thread, no one could figure out the cause.
 
I have read one other thread about this happening. On that thread, no one could figure out the cause.

This started happening to me as well recently, and although I found many instances of people reporting the same issue, no one had any concrete answers.

After futzing around a bit this evening, I think I have a possible solution.

It appears that this problem is theme-based (not an issue with fonts, as others have theorized). In particular, at some point in recent software revisions (could have been 3.0, perhaps 3.1 -- all I have are 2 phones on 3.1.2 so I can't verify when), there was a change made to how the "Low Battery" message is constructed.

In particular, if you look at the SpringBoard.strings plist on a 3.1.2 phone (as located in /System/Library/CoreServices/SpringBoard.app/English.lproj/), you'll see the following:

Code:
[COLOR="Gray"][I](Correct for 3.1.2)[/I][/COLOR]

<key>LOW_BATT_MSG_LEVEL</key>
<string>[COLOR="Red"]%@[/COLOR] of battery remaining</string>

However, in a theme that I had applied, the theme author had duplicated the entire SpringBoard.strings file & then applied modifications -- rather than just including the mods. In the theme's file, that same element appears as:

Code:
[COLOR="Gray"][I](Old format; incorrect for 3.1.2)[/I][/COLOR]

<key>LOW_BATT_MSG_LEVEL</key>
<string>[COLOR="Red"]%d%%[/COLOR] of battery remaining</string>

Based on those two snippets, it looks like at some point the message changed from just taking a numeric value (%d) to using a string value (%@). Thus, when 3.1.2 passes in a character string, the old message string in the theme is trying to interpret those bytes as a number. And wackiness ensues.

The fix:

Assuming that you're on 3.1.2 (perhaps someone else can verify for earlier versions), check your themes for SpringBoard.strings files (under <ThemeName>/Bundles/com.apple.springboard/en.lproj/), and if present look for the LOW_BATT_MSG_LEVEL key. If it's the "bad" version (%%d%...), copy the "good" version of the string into its place, and respring. I'd suggest looking in any lockscreen/slider themes first, as they nearly always include SpringBoard.strings to alter/remove the 'slide to unlock' text.

After I did that, and allowed my phone to hit the next battery warning, the text was correct -- the first time in several weeks.

I'd also recommend that you let the theme's author know of the issue, so that in future releases they can pare down the SpringBoard.strings file to just what the theme needs to modify (and thus to minimize side-effects like these in the future).

- Karl
 
I had this problem yesterday when I switched to a older theme that I think was not updated since 3.0 since some of the themed icons did not include some of the factory default icons. I switched to another theme and have not seen the problem since.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.