Question

Here's the CrashReporter information:

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0:
0   libsystem_kernel.dylib          0x347c2848 __kill + 8
1   [My Application]                0x0002ec44 fatal_signal_handler (PLCrashSignalHandler.m:98)
2   libsystem_c.dylib               0x37518522 _sigtramp + 42
3   [My Application]                0x0003040a uncaught_exception_handler (PLCrashReporter.m:136)
4   CoreFoundation                  0x37663984 __handleUncaughtException + 68
5   libobjc.A.dylib                 0x334082ca _objc_terminate + 122
6   libc++abi.dylib                 0x37f473be safe_handler_caller(void (*)()) + 70
7   libc++abi.dylib                 0x37f4744a std::terminate() + 14
8   libc++abi.dylib                 0x37f4881e __cxa_rethrow + 82
9   libobjc.A.dylib                 0x3340822e objc_exception_rethrow + 6
10  CoreFoundation                  0x375b9556 CFRunLoopRunSpecific + 398
11  CoreFoundation                  0x375b93b6 CFRunLoopRunInMode + 98
12  UIKit                           0x3354dda4 -[UIApplication _run] + 544
13  UIKit                           0x3354b05a UIApplicationMain + 1074
14  [My Application]                0x00002a9a main (main.m:54)
15  [My Application]                0x00002a58 0x1000 + 6744

If I delete the app and then download the updated version from scratch it works fine...

Was it helpful?

Solution

This is caused by an Objective-C exception being thrown, caught by the runloop, and re-thrown, resulting in the backtrace being lost.

To debug this without changes in PLCrashReporter/HockeyApp, you could register your own exception handler via NSSetUncaughtExceptionHandler(), and log the provided stack trace via (see [-NSException callStackReturnAddresses]). You'll need to symbolicate the results manually.

As a more general solution for this class of bug, you may be able to get the original exception backtrace by using PLCrashReporter trunk, which will record the exceptions' original backtrace separately in the crash report.

However, the HockeyApp client would need to be minimally modified to support recording the extra stack trace. The text formatter included with PLCrashReporter can be used as an example -- it will format this additional stack trace as an additional named pseudo-thread.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top