How to debug a crash that occurs randomly in an iOS application?

220 Views Asked by At

Currently, I am using Crittercism for crash reporting and making sure that I add dSYMs to get symbolicated crash reports.

But it is not helping with some of my crashes which are segmentation faults (SIGSEGV and SIGBUS). They occur randomly and I haven't been able to reproduce them on device and on simulator. I have tried to find a pattern by trying my app on different ios devices with different network connections (3G, Wifi, Edge) but with no success.

What can be my next step?

1

There are 1 best solutions below

0
On

Not much to go on, but here are a few places to look:

  1. If you have multiple threads, check to make sure they are behaving properly. Make sure you synchronize properly if multiple threads could be accessing the same objects.

  2. Check your NSNotifications - could one be posted when you are not expecting it?

I have found that the hardest bugs to find are those that are caused by asynchronous events - either in other threads or due to external events that you might be monitoring.

Not being able to reproduce the bug in your development environment will make it very hard to find.