iOS崩溃没有错误或堆栈跟踪 [英] iOS Crash without Error or Stack Trace

查看:441
本文介绍了iOS崩溃没有错误或堆栈跟踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很难跟踪iPad应用程序中的崩溃。困难实际上来自于当应用程序失败时没有错误或堆栈跟踪的事实。它就像Keizer Soze那样,就这样,poof,他走了。

Having a hard time tracking down a crash in an iPad application. The difficulty really stems from the fact that there is no errors or stack trace present when the application fails. It simply goes away like Keiser Soze, "And like that, poof. He's gone.".

我在模拟器和设备上复制了崩溃。设备日志为零,控制台中没有任何内容。

I've replicated the crash on both the simulator and the device. There are zero device logs, nothing in the console, etc.

我知道在崩溃期间有些 CoreGraphics 正在发生在后台线程中。通常,三个或多个NSOperations正在踢一些图像混合。

I know that during the crash some CoreGraphics operations are occurring in a background thread. Typically, three or so NSOperations are kicking of some image blends.

混合包括CGContext *调用(DrawImage,SetBlendMode,SetAlpha等)。 NSOperation调用回主线程中的委托来处理图像并将其设置为 UIImage ,因此它不应该是UI主线程冲突,但我现在不打折任何东西。

The blending consists of CGContext* calls (DrawImage, SetBlendMode, SetAlpha, etc). The NSOperation calls back to a delegate in the main thread to handle the image and set it to UIImage, so it shouldn't be a UI main thread conflict, but I'm not discounting anything at this point.

有没有一些Xcode技巧我缺少跟踪究竟发生了什么?

Are there some Xcode tricks I'm missing to track down exactly what is happening? Or at least get a better hint of where the problem lies?

EDIT 我已经在追踪内存使用的乐器中运行应用程序,并看到它是漂亮的摇滚稳定在2MB左右。所以,不要认为这是一个内存问题。但考虑之后,这颗摇滚稳定的2MB似乎异常低。有没有机会仪器没有拿起CoreGraphics分配?

EDIT I have run the app in Instruments tracking memory usage and see that it is pretty rock steady around 2MB. So, don't think it's a memory issue. But after consideration, this rock steady 2MB seems abnormally low. Is there a chance Instruments is not picking up the CoreGraphics allocations?

推荐答案

因为缺乏一个更好的解决方案,很明显,你的应用程序与NSLogs到圈出现的地方,然后通过断点和/或额外的日志从那里钻得更深。

For lack of a better solution, and if it isn't obvious, pepper your app with NSLogs to circle where this occurs, then drill deeper from there via breakpoints and/or additional logs.

这篇关于iOS崩溃没有错误或堆栈跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆