-1

Occasionally when my app launches, XCode gives me an EXC_BAD_ACCESS error, and with nothing in the console, takes me to this screen:

enter image description here

It also tells me which thread the crash occurred in, but I was wondering if there was a way to better pinpoint it. It happens sporadically, so while i've tried commenting out various areas of the code, it isn't an absolute way of figuring out which bit is crashing it.

Andrew
  • 15,935
  • 28
  • 121
  • 203

3 Answers3

1

One simple thing is Add exception break point. On Xcode select the exception navigator and click on bottom of corner + symbol then you can enable exception break point. It may give some idea where exactly crash was happen. And one more option is turn on NSZombie... If i am wrong correct me any one.

simbesi.com
  • 1,539
  • 3
  • 17
  • 27
0

Add breakpoint in - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions method and check line by line at which line your app is crashing.

Hope it helps you.

Nishant Tyagi
  • 9,893
  • 3
  • 40
  • 61
0

Few things to check at here.

1 - Are you getting error on fresh app installation. If YES, Thn What are you doing in didFinishLaunchingWithOptions. Is your app is completing this method.

2 - Your app works fine for first time, but when you run it again than it gives you the error. Than, Is here is anything suspicous, like db call or getting something from NSUserDeaults when app start. (May be you are saving some thing & loading it when your app starts.)

3 - Is this issue is realted to device only or simulator specific.

4 - Have you check you app on different OS.

I guess you can solve your problem by following step by step approach.

JiteshW
  • 2,195
  • 4
  • 32
  • 61