views:

44

answers:

3

when i run the iphone application in simulator 3.0 Debug. It working fine.

but the same application not running in simulator 3.0 release. And showing the error

file located and reading login view

2010-03-03 18:55:49.176 FocusPay[4743:207] *** Terminating app due to uncaught
exception 'NSRangeException', reason: '*** -[NSCFArray objectAtIndex:]: index (0)
beyond bounds (0)'
2010-03-03 18:55:49.177 FocusPay[4743:207] Stack: (
    807902715,
    2472563977,

if anybody know the solution please post, Thanks in advance.

A: 

It could be a million things. You should just try to bisect your way down, disabling parts of your program until it does not crash. Then add things back, until you close in on the evil part.

Your problem is not an unusual one and occurs in all kinds of development environments. I recommend testing as often in release mode as in debug mode to avoid this. When it comes to iPhone or similar development, I also recommend try the application as much as possible on the actual hardware too, if you have it.

Amigable Clark Kant
A: 

It seems that you might be accessing an array with objectAtIndex message even though the array is empty.

Tuomas Pelkonen
A: 

How did you create the array? One common mistake with Obj-C arrays is forgetting to terminate them with nil.

When you run in Debug, do you have breakpoints set where the application stops? If so, then it it is also possible that you have a race condition that only happens in Debug.

paul_sns