7
votes

I've got a couple sigsegv crashes coming in from crittercism, but I'm not quite sure how to start going about debugging. The only line of code that's mine is the main call from the start of the crashed thread.

Copying the crashed thread's stack trace from crittercism:

Reason:

24-Sep-12 02:38:14 PM SIGSEGV main (main.m:11)

Stack:

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
In addition I have a lot of other strange crashes. Can it be because system closes application after low memory warning?Murlakatam

2 Answers

0
votes

First, you'll need to "symbolicate" the crash log. There are plenty of web pages out there to instruct you on that.

Since this stack ends at objc_msgSend, the most likely cause is a dangling pointer.

To debug those, I recommend using NSZombies. If you are testing on the simulator, you might try "Guard malloc".

0
votes

This crash is caused by invoking a method on a pointer to an object that was already deallocated. It is a very common ref count error somewhere in your code that holds on the UIKit elements. But, what you should do at a matter of practice is upload your .DSYM file to the crittercism. It can be done manually via the website or via a Web API call as part of your automatic build process.