sigsegv在iphone上从暴击中崩溃

时间:2012-09-24 22:15:27

标签: iphone crash sigsegv

我有一些sigsegv崩溃来自于批评,但我不太确定如何开始调试。我唯一的代码行是从崩溃线程开始的主要调用。

从崩溃中复制崩溃线程的堆栈跟踪:

原因:

24九月12 下午02:38:14 SIGSEGV main(main.m:11)

堆栈:

0   
0 libobjc.A.dylib 0x356265b0 objc_msgSend + 15
1   
1 UIKit 0x3861c313  + 1310
2   
2 UIKit 0x386337cf  + 206
3   
3 UIKit 0x385ef80b  + 258
4   
4 QuartzCore 0x34f56d63  + 214
5   
5 QuartzCore 0x34f56901  + 460
6   
6 QuartzCore 0x34f57835  + 16
7   
7 QuartzCore 0x34f5721b  + 238
8   
8 QuartzCore 0x34f57029  + 316
9   
9 UIKit 0x386786e5  + 572
10  
10 UIKit 0x386784a3  + 66
11  
11 UIKit 0x38677391  + 1464
12  
12 UIKit 0x385ed1ef  + 2458
13  
13 UIKit 0x385ec6d5  + 72
14  
14 UIKit 0x385ec123  + 6154
15  
15 GraphicsServices 0x3779f5a3  + 590
16  
16 CoreFoundation 0x372f0683  + 14
17  
17 CoreFoundation 0x372efee9  + 212
18  
18 CoreFoundation 0x372eecb7  + 646
19  
19 CoreFoundation 0x37261ebd CFRunLoopRunSpecific + 356
20  
20 CoreFoundation 0x37261d49 CFRunLoopRunInMode + 104
21  
21 GraphicsServices 0x3779e2eb GSEventRunModal + 74
22  
22 UIKit 0x38640301 UIApplicationMain + 1120
23  
23 MyApp 0x35bf main (main.m:11)

2 个答案:

答案 0 :(得分:0)

首先,您需要“表示”崩溃日志。有很多网页可以指导你。

由于此堆栈以objc_msgSend结束,最可能的原因是悬空指针。

要调试这些,我建议使用NSZombies。如果您在模拟器上进行测试,可以尝试“Guard malloc”。

答案 1 :(得分:0)

此崩溃是由对指向已解除分配的对象的指针调用方法引起的。这是代码中某处存在于UIKit元素上的一个非常常见的引用计数错误。但是,在练习时你应该做的就是将你的.DSYM文件上传给批评者。它可以通过网站手动完成,也可以通过Web API call手动完成,作为自动构建过程的一部分。