Help debugging iPhone app - EXC_BAD_ACCESS

前端 未结 2 595
情书的邮戳
情书的邮戳 2020-12-20 02:12

I\'ve developed my application using my 3G device to test with. Upon giving this to a friend to test, he\'s noticed that it crashes..I\'ve had a look at the crash log, but i

相关标签:
2条回答
  • 2020-12-20 02:54

    You may be over-releasing something. If you're running Snow Leopard, run the Static Analyzer (Cmd-Shift-A) and look for memory errors.

    The fact that it crashes after a memory error suggests that a UIViewController has released its view. Do you have any UIViewControllers that observe NSNotifications, or otherwise might change their IBOutlets while they are off-screen? This is a common cause of this kind of crash. Make sure you're correctly memory managing your IBOutlets. UIViewControllers should never mess with their IBOutlets (or their UI components at all) when they are off screen. Even if you don't make this mistake, if you're not implementing things as noted in the above link, you can still crash after memory warnings.

    MemoryWarning was a pretty good idea, and things have improved, but Apple still hasn't quite cooked all the issues around how it plays with UIViewController. The developer still needs to be very careful.

    0 讨论(0)
  • 2020-12-20 02:56

    You should have your friend come to your computer and run it with NSZombieEnabled. That's the best way to debug these issues.

    0 讨论(0)
提交回复
热议问题