开发者

iphone/ipad troubleshooting device crashes due to memory

I have an app that often crashes on the device (iPad), but not on the simulator, so any simulator debug tactics (MallocStackLogging for example) are not an option. What I usually开发者_如何学C get in the console is this:

Received memory warning. Level=1
Received memory warning. Level=2
Program received signal:  “0”.
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Unknown error loading shared library "/Developer/usr/lib/libXcodeDebuggerSupport.dylib")

My question is, at this point, is there something I can do to find out exactly what is causing the crash? Obviously it's a memory issue, but I'm having a hard time finding the cause. Is it a leak? Too much allocation? Is there anything besides "Run with Performance Tool > Leaks" that I can do to track down the problem?


Another good tool is the Static Analyzer. Just click Build and Analyze in the Build menu and it will show you somewhere between many and most of your memory leaks.

Check out the Apple Developer Document for more explanation on how to read the results.


Use Instruments to see where all your memory is going.

I'd start with Run with Performance Tool -> Allocations.

Also, I find Leaks to be pretty conservative. I haven't seen a single false-positive from Leaks, but I've found plenty of leaks that Leaks didn't detect.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜