Disable Earl Grey Crash Handlers?
- Dominant language
- Objective-C
- Stars
- 5.7k
- Forks
- 737
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 5
Description
I wonder, why does EarlGrey contain a crash handler? It breaks the crash reporting that is default in the iOS Simulator. Our reports end in EarlGrey's crash handler stack traces instead of the actual crash:
```
Exception Type: EXC_CRASH (SIGSEGV)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: PSPDFTestHost [75062]
Application Specific Information:
CoreSimulator 494.22.3 - Device: iPhone 5 - Runtime: iOS 9.3 (13E233) - DeviceType: iPhone 5
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x06e89cf2 __write_nocancel + 10
1 libsystem_c.dylib 0x06bd9906 __swrite + 35
2 libsystem_c.dylib 0x06bd9a48 _swrite + 105
3 libsystem_c.dylib 0x06bd4e73 __sfvwrite + 478
4 libsystem_c.dylib 0x06bd516d fwrite + 112
5 com.pspdfkit.sdk 0x10669fee fileWriter + 46 (InstrProfilingFile.c:103)
6 com.pspdfkit.sdk 0x1066b630 lprofWriteDataImpl + 368 (InstrProfilingWriter.c:276)
7 com.pspdfkit.sdk 0x1066b4ae lprofWriteData + 78 (InstrProfilingWriter.c:238)
8 com.pspdfkit.sdk 0x1066a8ed __llvm_profile_write_file + 525 (InstrProfilingFile.c:233)
9 libsystem_c.dylib 0x06bf337c __cxa_finalize_ranges + 297
10 libsystem_c.dylib 0x06bf3419 __cxa_finalize + 59
11 libsystem_c.dylib 0x06bf3734 exit + 57
12 com.google.earlgrey.EarlGrey 0x0cfc828c grey_uncaughtExceptionHandler + 380 (GREYAutomationSetup.m:331)
13 com.apple.CoreFoundation 0x027fb8ce __handleUncaughtException + 830
14 libobjc.A.dylib 0x022180ae _objc_terminate() + 100
15 libc++abi.dylib 0x02b88d0d std::__terminate(void (*)()) + 14
16 libc++abi.dylib 0x02b88d91 std::terminate() + 65
17 libdispatch.dylib 0x06b26700 _dispatch_client_callout + 33
18 libdispatch.dylib 0x06b18ab6 _dispatch_source_latch_and_call + 804
19 libdispatch.dylib 0x06b14688 _dispatch_source_invoke + 935
20 libdispatch.dylib 0x06b0f171 _dispatch_main_queue_callback_4CF + 412
21 com.apple.CoreFoundation 0x027451be __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
22 com.apple.CoreFoundation 0x02703434 __CFRunLoopRun + 2356
23 com.apple.CoreFoundation 0x02702846 CFRunLoopRunSpecific + 470
24 com.apple.CoreFoundation 0x0270265b CFRunLoopRunInMode + 123
25 com.google.earlgrey.EarlGrey 0x0cfe9a9a -[GREYRunLoopSpinner grey_drainRunLoopInActiveModeAndCheckCondition:forTime:] + 666 (GREYRunLoopSpinner.m:175)
(...)
```
We modified our fork so that `grey_setupCrashHandlers` is no longer called, but I would like to understand the reason and supposed benefits of this.
The actual crash here was a NaN frame in setFrame:, but no way to guess from that stack trace, I had to let it run manually because our CI crash report was useless because if this handler.
Contributor guide
Assessment
This issue has not been assessed yet.