views:

981

answers:

4

Debugger is telling me this, when I run my app on device:

Program received signal:  “EXC_BAD_ACCESS”.
mi_cmd_stack_list_frames: Not enough frames in stack.
mi_cmd_stack_list_frames: Not enough frames in stack.

I don't get information about where in code that happens. That's all I get. Any idea what that could mean?

The app crashes after that. When the device is not connected to the mac, it still crashes, so not a debugger problem.

A: 

EXC_BAD_ACCESS happens when a message is sent to an object that has already been released.

I've seen "mi_cmd_stack_list_frames: Not enough frames in stack" before when trying to release something that's already been released as well.

My suggestion is to set the NSZombieEnabled environment variable and see which released object you are trying to access.

This site has a great tutorial on it: http://www.codza.com/how-to-debug-exc%5Fbad%5Faccess-on-iphone

Chris
A: 

I've seen this caused by at least three different kinds of problems:

• As described in the other answer, overrelease errors can do it.

• I had it happen when I was upgrading an app to use iAd and IOS 4.0. I think the problem was that I tried to use the iAd framework in the 3.0 version of the app as well, which of course isn't possible because iAd is only around in 4.0 and above.

• I had it happen when I removed a bunch of stuff from an app and recompiled, but vestiges of the old stuff were still around on the simulator. Resetting the simulator cleared the problem. What I was removing was the Flurry API. I'm afraid I don't know what, specifically, in there stuck around and caused the problem.

William Jockusch
+2  A: 

Building on the 4.0 sdk onto a 3.1.3 phone caused this for me.

Fixed by weak linking UIKit in the target.

Jeremy
more complete explanation: http://stackoverflow.com/questions/2618889/universal-iphone-ipad-application-debug-compilation-error-for-iphone-testing/2622027#2622027
Tristan
A: 

I've got such a message when was trying to launch an app on iPhone under iOS 3.1.2 with a string like that

Class messageClass = (NSClassFromString(@"MFMessageComposeViewController"));

At the same time that works well when I use a device with iOS 4.
So I can assume that app could crash when start running on device if there are any references to iOS4-only classes.

NR4TR