ios - 弄清楚 iOS 模拟器崩溃报告

标签 ios ios-simulator exc-bad-access titanium-mobile appcelerator

我正在使用 Appcelerator 框架编写应用程序,但偶尔会发生崩溃。我正在尝试找出导致崩溃的原因,因此我决定查看 iOS 模拟器崩溃报告。当然,这对我来说都是希腊语,但我希望得到一些指导,了解其中哪一部分是坠机原因的线索?

我拉出了标记为“崩溃”的线程,但该线程内有多个条目 (0-9),如下所示。是否有任何线索可以找出哪些条目导致了问题?

Crashed Thread:        2  KrollContext<kroll$1>

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x00000000bbadbeef


Thread 2 Crashed:: KrollContext<kroll$1>
0   com.a       0x000000010082865e Ti_WTFCrash + 62
1   com.a       0x000000010069ffe9 TiObjectGetProperty + 361
2   com.a       0x00000001002c42e5 -[KrollObject objectForTiString:context:] + 101
3   com.a       0x00000001002bf6a5 KrollGetProperty + 165
4   com.a       0x0000000100656ef7 TI::JSCallbackObject<TI::JSDestructibleObject>::getOwnPropertySlot(TI::JSObject*, TI::ExecState*, TI::PropertyName, TI::PropertySlot&) + 487
5   com.a       0x00000001005e32aa TI::TiValue::get(TI::ExecState*, TI::PropertyName, TI::PropertySlot&) const + 362
6   com.a       0x00000001006f6ec0 llint_slow_path_get_by_id + 192
7   com.a       0x0000000100701711 llint_op_get_by_id + 98
8   com.a       0x0000000100703ae2 llint_op_call + 153
9   com.a       0x00000001006ffea5 callToJavaScript + 191

最佳答案

SIGSEGV 错误发生在您尝试使用已被垃圾回收的对象时。这相当于 Android 上的 NullPointer 错误。

看到它也有 callToJavaScript 意味着 native 事件或回调不再找到 JavaScript 对象。

我建议使用 Appcelerator Studio 调试器并单步执行代码直至崩溃。

关于ios - 弄清楚 iOS 模拟器崩溃报告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32104037/

相关文章:

ios - Xcode - 使用较旧的 iOS 版本运行模拟器

ios - 使用 xcodebuild 在模拟器上构建和运行应用程序

ios - 在 View 之间来回切换时 EXC_BAD_ACCESS 崩溃

ios - 启动特定的 viewController 以响应远程推送通知

ios - 如何使用 AudioKit 的新 AKSequencer 播放 MIDI

iphone - writeToFile 在模拟器上工作,但在设备上不工作

iphone - UIWebView 加载 html5-Video EXC_BAD_ACCESS 崩溃

iphone - 当我尝试读取 NSString 时得到 "EXC_BAD_ACCESS"

iOS swift : Rotate and Scale UIView without resizing

ios - 更改 TableViewController.swift 类