On Dec 6, 2011, at 8:01 PM, Philip McIntosh wrote:
However when I load in on an armv6 iPod it works mostly perfectly except when I try to divide by zero (or try to operate on numbers that do not have legal decimal point formatting).
Try turning off thumb when deploying to armv6 (add -mno-thumb to your Other C Flags in project settings). There is a compiler bug where thumb generation where it may generate invalid code in places.
The exact same code in the iPad version, and also running it with the simulator, handles the exceptions (I'm using NSDecimalNumber) and displays an error message and gives a sound. But on the iPod, I get the sound and then it crashes with an uncaught NSRangeException with [NSArray objectAtIndex:]: index 1 beyond bounds [0 .. 0]'.
What OS versions are your devices running? This could be a difference (bug) between versions of iOS. Beyond that, you will probably want to spend time in the debugger figuring out what is going on here more than anything. The dev forums are probably the best place to take this part of the question.
My best clue is that it seems to be related to running it on an armv6 device.
Unfortunately saying that it breaks on armv6 brings up a lot of variables that you haven't mentioned here, such as iOS versions and compiler settings specific to armv6 vs armv7. It could end up being a lot of different things causing you problems, rather than just armv6 vs armv7.
I am leaning toward rewriting the app to not use ARC and try again. Is there a chance this might work, or are there any suggestions for how can I more effectively track down this uncaught exception? Thanks so much.