开发者

Getting "Program received signal:  “SIGABRT”" in iphone sdk

开发者 https://www.devze.com 2023-01-05 19:49 出处:网络
I am getting this exception: malloc: *** error for object 0x754cab0: double free *** set a breakpoint in malloc_error_break to debug

I am getting this exception:

  malloc: *** error for object 0x754cab0: double free
 *** set a breakpoint in malloc_error_break to debug
 Program received signal:  “SIGABRT”.

I don't know why it was generated only in Iphone sdk 4.0 (device and simulator), but it was not generated in Iphone sdk 3.0 v开发者_JAVA百科ersions (device and simulator).

Can anyone tell me what is going wrong so that I can update my app?


It tells you what the problem is: You are free'ing memory when it has already been done, probably by sending too many release messages to an object.

Run in debug mode and it will probably stop right away at the correct line of code. Then, trace back what you do that object.


The allocations tool (Run > Run with Performance Tool > Object Allocations) should be pretty helpful here--it will show you all backtraces that allocated, retained, or released an object. Finding the place where you forgot to retain should be pretty easy given those backtraces.

0

精彩评论

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

关注公众号