[swift-users] intercept fatalError() or other termination messages from swift?

David Baraff davidbaraff at gmail.com
Mon Jun 26 21:45:28 CDT 2017


Ok, the data is for sure not there, or possibly i’m looking at the wrong thing. Here is what I see:

Incident Identifier: 15D12BCE-975B-47B6-BD03-DD8512D40DAF
CrashReporter Key:   8af1402ae87b0184acff113b3f7312743d94d074
Hardware Model:      iPad6,7
Process:             hackyApp [4965]
Path:                /private/var/containers/Bundle/Application/29195F7D-7548-4917-93D8-2B027481EAFB/hackyApp.app/hackyApp
Identifier:          deb.hackyApp
Version:             1 (1.1)
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           deb.hackyApp [5747]


Date/Time:           2017-06-26 19:38:48.2905 -0700
Launch Time:         2017-06-26 19:38:48.1510 -0700
OS Version:          iPhone OS 10.3.2 (14F89)
Report Version:      104

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x000000010045f734
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [0]
Triggered by Thread:  0

Filtered syslog:
None found

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libswiftCore.dylib            	0x000000010045f734 0x100304000 + 1423156
1   libswiftCore.dylib            	0x000000010045f734 0x100304000 + 1423156
2   hackyApp                      	0x00000001000b0708 0x1000a8000 + 34568
3   hackyApp                      	0x00000001000b08c0 0x1000a8000 + 35008
4   UIKit                         	0x000000019822cec0 -[UIViewController loadViewIfRequired] + 1036


…

The stack trace continues for a while, then a list of binary images.  There is nothing that says "Application Specific Information”. Am I pulling the wrong data in xcode?  Is my app setup in a weird way that this is not reported?

This is doing the very simple “fatalError()” route in the main controller's viewDidLoad() routine.

Thanks for any insights.


> On Jun 26, 2017, at 1:22 PM, Joe Groff <jgroff at apple.com> wrote:
> 
> 
>> On Jun 26, 2017, at 12:22 PM, David Baraff <davidbaraff at gmail.com> wrote:
>> 
>> To be very clear, i’m concerned about iOS not mac os x.  I pulled up a crash report using xcode tools, and saw no mention of the string output by fatal error.  If there is someway after the fact of, on an iPhone or iOS interogating the asl_log when you restart your program to glean the error message, i’m all ears.
> 
> The fatal error message ought to appear under the "Application Specific Information:" heading in the crash report Xcode pulls from the device.
> 
> -Joe
> 



More information about the swift-users mailing list