Git Product home page Git Product logo

apple-crash-report-parser's Introduction

Apple Crash Report Parser

Build Status Crates.io

This is a Rust library that can parse apple crash report text files. These files are generated by the apple native crash reporter as well as PLCrashReporter and KSCrash.

Example file

Incident Identifier: 5C32DF84-31A0-43E7-87D0-239F7F594940
CrashReporter Key:   TODO
Hardware Model:      MacBookPro14,3
Process:         YetAnotherMac [49028]
Identifier:      com.YourCompany.YetAnotherMac
Version:         4.21.1
Code Type:       X86-64
Parent Process:  launchd [1]

Date/Time:       2019-01-09 17:44:22 +0000
OS Version:      Mac OS X 10.14.0 (18A391)
Report Version:  104

Exception Type:  SIGSEGV
Exception Codes: SEGV_MAPERR at 0x88
Crashed Thread:  5

Thread 0:
0   libsystem_kernel.dylib              0x00007fff61bc6c2a 0x7fff61bc6000 + 3114
1   CoreFoundation                      0x00007fff349f505e 0x7fff349b9000 + 245854
2   CoreFoundation                      0x00007fff349f45ad 0x7fff349b9000 + 243117
3   CoreFoundation                      0x00007fff349f3ce4 0x7fff349b9000 + 240868
4   HIToolbox                           0x00007fff33c8d895 0x7fff33c83000 + 43157
5   HIToolbox                           0x00007fff33c8d5cb 0x7fff33c83000 + 42443
6   HIToolbox                           0x00007fff33c8d348 0x7fff33c83000 + 41800
7   AppKit                              0x00007fff31f4a95b 0x7fff31f30000 + 108891
8   AppKit                              0x00007fff31f496fa 0x7fff31f30000 + 104186
9   AppKit                              0x00007fff31f4375d 0x7fff31f30000 + 79709
10  YetAnotherMac                       0x0000000108b7092b 0x10864e000 + 5384491
11  YetAnotherMac                       0x0000000108b702a6 0x10864e000 + 5382822
12  libdyld.dylib                       0x00007fff61a8e085 0x7fff61a77000 + 94341

...

Resources

apple-crash-report-parser's People

Contributors

aashima89 avatar ashwoods avatar bruno-garcia avatar getsentry-bot avatar jan-auer avatar kornelski avatar loewenheim avatar mitsuhiko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apple-crash-report-parser's Issues

Date/Time with milliseconds fails parsing

Relevant code:

https://github.com/getsentry/apple-crash-report-parser/blob/master/src/parser.rs#L316-L323

Example apple crash report:

Incident Identifier: 8B792768-FC37-4D84-A41E-35EDDFC67E45
CrashReporter Key:   5510d3062c682b32f9d459229c94639ef823346f
Hardware Model:      iPhone12,1
Process:         clashofstreamers [4135]
Path:            /private/var/containers/Bundle/Application/A7C0F910-1AC1-4386-9FBB-7D39CDA93B63/clashofstreamers.app/clashofstreamers
Identifier:      com.gamingforgood.clashofstreamers
Version:         587860 (1.0)
Code Type:       ARM-64
Parent Process:  ? [1]

Date/Time:       2020-05-02 16:38:09.075 +0200
OS Version:      iOS 13.4.1 (17E262)
Report Version:  104

Exception Type:  EXC_BREAKPOINT (5)
Exception Codes: 0x00000000 at 0x000000000379cd20
Crashed Thread:  0

Thread 0 Crashed:
0   clashofstreamers                0x000000010679dd20 0x104c25000 + 27741216
...

The problem is this line:
Date/Time: 2020-05-02 16:38:09.075 +0200
Replacing that line with:
Date/Time: 2020-05-02 16:38:09 +0200

And everything goes fine.

Add API for serializing back to Apple's crash report format?

Thanks for writing this crate, it's super useful! I'm using it to write a little commandline tool to take Apple crash reports from our customers and symbolicate the frames from our framework using our private dSYMs. Ideally I'd like to have it take a crash report file as input and spit out a crash report file, just with the newly-symbolicated frames filled in. Would it be feasible to provide an API to serialize back to Apple's format? If not, some half-measure like a way to map bits of the AppleCrashReport structure back to lines from the input file might be good enough for my purposes.

Currently I'm resorting to parsing the report using this crate so that I can easily find and use the UUID of our framework, then just iterating over the lines of the report and rewriting the frames I care about (which requires only a tiny bit of actual parsing). If I had some way to find all the frames I care about using this crate so I could fill in their symbol data and write it back out that would be wonderful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.