开发者

Xcode malloc error

I'm g开发者_如何学Goetting this error in the Xcode console, sometimes it causes the simulator to exit and sometimes it is ignored. It will usually be ignore if I wait a few seconds once the game is loaded:

malloc: *** error for object 0x55ac484: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug

1) How can I identify this object?

2) How can I access malloc to put a BP in, and what will this achieve?

Thank you!


The Instruments-Tool provides a way to find Zombies.

To find the Zombie which causes your app to crash, select Product > Profile in XCode 4. A new window will open where you have to choose "Zombies". Now click "Profile" in the bottom-right corner of the window. If you now send a message to a freed object, it will show you what type of object it is and which method sent the message.

To set a breakpoint you just have to click on the line number you want your app to pause. After your app paused you can run your application step by step, so you will be able to see, which part of your code causes the crash.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜