1

I have implemented an application which uses PLCrashReporter as Crash handling method. and it retrieves a report which can be switched to human readable format.

Incident Identifier: E125648C-6BCF-4F69-9950-C8CDFB0535D3
CrashReporter Key:   e681450ca18f97638adb5f7295a4af24103b92ae
Hardware Model:      iPad5,4
Process:             CrashReport [6918]
Path:                /private/var/mobile/Containers/Bundle/Application/FA6CA909-C229-457F-9EF0-35B889481B63/CrashReport.app/CrashReport
Identifier:          net.example.CrashReport
Version:             1 (1.0)
Code Type:           ARM-64 (Native)
Parent Process:      launchd [1]

Date/Time:           2016-05-15 16:40:51.199 +0430
Launch Time:         2016-05-15 16:40:44.122 +0430
OS Version:          iOS 8.4.1 (12H321)
Report Version:      105

Exception Type:  EXC_CRASH (SIGTRAP)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread:  1

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0:
0   CrashReport                     0x00000001000663a4 0x100060000 + 25508
1   CrashReport                     0x00000001000662ac 0x100060000 + 25260
2   CrashReport                     0x0000000100066304 0x100060000 + 25348
3   UIKit                           0x0000000187b411e8 0x187afc000 + 283112

with all details about the application and Hardware model , but No Line or class name!

I have searched a lot and find out the i have to use symbolication process.

  • some told to use .dSYM , but the application is not yet on the apple store
  • some other solution was to work with report.crash and something like that but I couldn't find this file in my application
  • I want the lines of code to be sent from the application , not to handle it from XCode or some other tools

in final: I need some codes to extract line number and functions from PLCrashReport , please use Swift. I am not very good at Objective C.

Thanks

1 Answers1

2
  1. You need to symbolicate the crash report, e.g. by using the same tool that Xcode uses which is symbolicatecrash.pl. There are a lot of discussions here that are referencing this, the following link provides one of the many answers that cover this: How to Manually Symbolicate iOS Crash to View Crash Logs

  2. Also you need the exact dSYM that was created with the build that caused the crash, without the dSYM the above mentioned tool can not provide any useful data and especially can not provide you class names, method names, file names or line numbers. The dSYM is generated every time you build the app in Xcode. It has nothing to do with the App Store. Check the build folder where you find the app package. If you don't see it, then you changed the build settings. The following page shows the build setting you need to have enabled: https://support.hockeyapp.net/kb/client-integration-ios-mac-os-x-tvos/how-to-solve-symbolication-problems#build-settings-for-getting-proper-symbol-data

  3. It is not possible to get line numbers directly from your application, as the binary doesn't provide the necessary information at any time. You need to symbolicate the crash report with the above mentioned tool and the above mentioned dSYM to get line numbers.

  4. As it is not possible to get line numbers only using your apps binary, it is also not possible to get them at runtime. Hence it doesn't matter if you code something in Swift or Objective-C, it doesn't matter.

Community
  • 1
  • 1
Kerni
  • 15,241
  • 5
  • 36
  • 57
  • Thank you it helped to get more clear about symbolication. and one more question. should i use the binary file or i should change it human readable format and save it as a text file? which one is needed for symbolicate tools? – Ehsan Razm khah May 17 '16 at 13:47
  • the symbolication script I mentioned only understands the text format, not the binary format – Kerni May 17 '16 at 14:35