warning: check_safe_call: could not restore current frame

转载自:http://stackoverflow.com/questions/2295295/warning-check-safe-call-could-not-restore-current-frame

What does the error warning: check_safe_call: could not restore current frame usually indicate? I've read in other places that it's a memory issue. Is it always a memory problem?

I'm getting this error on the device (not the simulator). NSZombieEnabled shows nothing. If I Build and Debug, my debugger window shows nothing. The peak memory isn't that high (3MB). It just crashes with the same error every time after scrolling around a map.

Any ideas how to debug this? Thanks.

Edit: I added the reason for my crash in an answer below (creating too many SQLite connections). If anyone else gets this error and finds their solution, please post it below. It seems like an error message with multiple causes.

link | improve this question

79% accept rate
 
What exactly are you doing? –  Brian Liang  Feb 19 '10 at 17:02
feedback

4 Answers

up vote 2 down vote accepted

I've seen this a few times, but never been able to actually pinpoint it to a problem outright. Although, the times I've seen it usually there has been some kind of infinite loop or recursion gone wrong and the debugger will catch it. I don't know if you've left it long enough, but after a while, the debugger should start to load the stack frames it does have and display them in the debugger window. There you should be able to see what is going wrong.

Like I said, usually when I've seen this its been due to infinite loops or recursion and the debugger will show upwards of 5000 calls to the same function, so finding the problem shouldn't be too difficult - but, saying that, it may not be the exact issue.

Just my two cents.

link | improve this answer
 
This was the exact issue I had that caused the error. –  Brian Liang  Feb 19 '10 at 17:06
feedback

This warning also may happens when to use stack based block out of the scope the block defined without copying it.

http://developer.apple.com/library/mac/documentation/cocoa/Conceptual/Blocks/Articles/bxUsing.html#//apple_ref/doc/uid/TP40007502-CH5-SW2

http://www.friday.com/bbum/2009/08/29/blocks-tips-tricks/

link | improve this answer
 
feedback

I found the error in my code. It turns out that the SQLite database I was using was causing the crash. I was forgetting to close my database connection, and each time the code hit a particular function, I'd open a new connection. Eventually there were too many, and the app crashed.

It's looking like a lot of these errors are to do with a kind of overload (as Jasarien says).

link | improve this answer
 
feedback

I came accross this problem too but I found that it was caused by an image that was at too high a resolution. It would work perfectly in the simulator but not on the device. I resized the image to 320x480 pixels at 180 pixels per inch and now it works perfectly.

Hope that helps

link | improve this answer
   

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值