microsoft / plcrashreporter

Reliable, open-source crash reporting for iOS, macOS and tvOS
Other
2.84k stars 532 forks source link

fails to symbolize locally #269

Closed tamwei closed 3 months ago

tamwei commented 1 year ago

Description

I initialize PLCrashReporter using the PLCrashReporterSymbolicationStrategyAll strategy, And set Deployment Postprocessing = YES, Strip Linked Product = YES

In this case, our app always fails to symbolize locally,I've always thought it was right too. But this time, I found that in this case, our app can correctly symbolize locally. Then I started to look for the reason, I think it may be these two reasons: 1, PLCrashReporter additionally used two sections __TEXT, __objc_methlist and __DATA, __objc_selrefs in 1.11.0 2, Our app uses category in the new version.


For reason 2: When our app uses 'category', the '__objc_catlist' section will be included in the binary file, and the PLCrashReporterSymbolicationStrategyObjC strategy of plcrashreporter will work well.

The following code is plcrashreporter to get the category list. Maybe when getting category list section fails, it should not return . https://github.com/microsoft/plcrashreporter/blob/10d3dcdb0ffe504c44c99f57be5a304e339427dc/Source/PLCrashAsyncObjCSection.mm#L505-L511

The following is the previous version of our app, which does not contain __objc_catlist. 1668738773

Details

  1. Which SDK version are you using? 1.11.0
  2. Which OS version did you experience the issue on? macOS
  3. What language are you using?
    • [x] Objective C
    • [ ] Swift
aleksandr-dorofeev commented 1 year ago

Hello @tamwei Thanks for getting in touch! Could you please provide reproduction sample?

tamwei commented 1 year ago

hello, @aleksandr-dorofeev

MacSample.zip

Here is my test screenshot. 1669000865

1669000781

AnatolyPristensky commented 1 year ago

@tamwei, we've created a bug on our internal dashboard. Will update this thread once bug is fixed.

tamwei commented 1 year ago

@AnatolyPristensky Thank you, and I have another question. When using the PLCrashReporterSymbolicationStrategyAll strategy, sometimes the PLCrashReporterSymbolicationStrategyObjC strategy will return a wrong symbol when symbolizing the address of the c++ or c method.

I want to know whether it is possible to judge whether the symbolization result of the PLCrashReporterSymbolicationStrategyObjC strategy is accurate, and if it is not accurate, the returned result will not be used.

Thank you for your continued support of client symbolization.

DmitriyKirakosyan commented 1 year ago

Hi @tamwei , sorry for late reply.

There is no built-in tool in PLCrashReporter for checking if the crash report is valid. You can try to parse the call stack yourself and determine if it is correct.

tamwei commented 1 year ago

Thanks for your suggestion.

DmitriyKirakosyan commented 3 months ago

As we do not have plans to fix this bug in the next year, I'm closing the issue.