plcrashreporter icon indicating copy to clipboard operation
plcrashreporter copied to clipboard

[Fix] Add checks to ensure PLCrashReportExceptionInfo has non-nil name and reason

Open ForeverQ opened this issue 2 years ago • 1 comments

Description

We encountered a system exception crash here on Outlook iOS when copying PLCrashReport.exceptionInfo.exceptionReason but it was nil.

By going through the code, this can only happen when [NSString stringWithUTF8String:] returns nil here. Since the name and reason are desgined to be non-nil, this PR fixes this edge case by verifying them to be non-nil as expected.

ForeverQ avatar Feb 07 '24 08:02 ForeverQ

Hello and thank you for contribution! I researched this trying to find out why stringWithUTF8String may return nil in cases when the argument is not NULL (as we already have such checks), and came across this thread, which indicates that it may happen indeed if the argument data is not formatted correctly. Do you think it is the case? Understanding actual cases where you've encountered this issue would be helpful for us.

MikhailSuendukov avatar Feb 23 '24 17:02 MikhailSuendukov

Closing. Please reopen if you are still interested.

DmitriyKirakosyan avatar May 15 '24 08:05 DmitriyKirakosyan