• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSRangeException on iPod but not on iPad or iPhone Simulator
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSRangeException on iPod but not on iPad or iPhone Simulator


  • Subject: Re: NSRangeException on iPod but not on iPad or iPhone Simulator
  • From: David Duncan <email@hidden>
  • Date: Wed, 7 Dec 2011 09:40:32 -0800

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.

I would doubt that removing ARC would fix the issue.
--
David Duncan

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >NSRangeException on iPod but not on iPad or iPhone Simulator (From: Philip McIntosh <email@hidden>)

  • Prev by Date: Re: Errant SVN Warning
  • Next by Date: Re: Still no way to double-click a symbol to get docs?
  • Previous by thread: NSRangeException on iPod but not on iPad or iPhone Simulator
  • Next by thread: Why can't I just add a framework to xc4?
  • Index(es):
    • Date
    • Thread