Search code examples
iosiphonexcodehockeyapp

Hard-to-reproduce crash does not appear in HockeyApp or Device Logs


Two days ago, one of my iPhone game beta testers encountered a crash at a very specific point in gameplay. No crash reports showed up in HockeyApp (I have seen other reports from the same build).

Last night, I also experienced the crash. Unfortunately I was not connected to a debugger. When I got back to the computer, I plugged in my device but found no new crash logs. Note that my device is on iOS8 Beta, and I tried using both XCode5 and XCode6 to look for crash logs.

This crash is extremely hard to reproduce; in 30+ hours of combined gameplay it has only happened these 3 times. It is not a memory issue; the crash happens at a very specific point in gameplay, and restarting the app results in another very specific symptom... just not quite specific enough for me to debug ;)

I've read about the way HockeyApp etc. catch crash logs before, but I must admit a lack of expertise. What can cause the log to be missing like this? Did HockeyApp somehow "consume" it, or did it never get created at all?

More importantly, how can I trace the issue?


Solution

  • This is Andreas from HockeyApp.

    Let me start with some general remarks:

    1. If there is a crash or if iOS kills the app (which technically isn't a crash), then iOS will always write a crash report onto the device with one exception: If the device is denied from syncing the usage and crash data with Apple it will only store a limited amount of reports and will then instead print the report in the console only.

    2. 3rd party frameworks can never "consume" a crash so that iOS won't be able to generate a report. Multiple 3rd party frameworks in an app can detect unhandled exceptions, but only one framework can detect crashes triggered by signals.

    3. The HockeyApp SDK with the default settings can't detect crashes e.g. caused by stack overflows. This can be activated by enabling Mach Exceptions, see http://hockeyapp.net/help/sdk/ios/3.5.6/Classes/BITCrashManager.html#//api/name/enableMachExceptionHandler

    4. The HockeyApp SDK has experimental support for detecting some kind of kills of the app by iOS. This also needs to be activated individually, see https://github.com/bitstadium/HockeySDK-iOS/blob/develop/Classes/BITCrashManager.h#L224

    Without having the iOS crash report it can't be said why HockeyApp couldn't report a crash. My assumption for iOS not showing a crash report on the device is that there are too many crash reports already on the device and syncing is disabled.

    1. Connect the device to Xcode
    2. select the device and once again check the crash reports on the device.
    3. Simulate a new crash
    4. Check again if that will be stored on the device.
    5. Check the console log if there is something in there.
    6. Delete old crash reports from the device if the assumption is correct to make room for new reports.
    7. Once you have a report for that crash grab that and contact us via support, so we can help you analyzing it.