Everytime I quit the app in the simulator. The console display this error message:
*** -[NSThread _nq:]: message sent to deallocated instance 0x6d770e0
Looks the app try to access an deallocated instance. But I cannot find it anyhow, even using the instrument.
I can't find开发者_如何学编程 the line of code that cause the problem.
p.s. I have already tried any ways that I know to debug this problem. but no success yet. I enabled NSZombie and use instrument to help me to find out the error. But the error report did not point to any of my own code. I have no idea why this happen.
Double click on your executable in the left pane in XCode, go to the arguments tab, add a new one named NSZombiesEnabled and set its value to YES. This will set all deallocated instance to an NSZombie and you'll be able to tell what type is being deallocated.
NOTE: THis must be turned off after or your app will never release memory!
Fixed, this problem is that I access interface objects not in the main thread. you can do so by [self performSelectorOnMainThread....]
.
精彩评论