sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

C++ exceptions have truncated message

Open sindresorhus opened this issue 1 year ago • 1 comments

Platform

macOS

Environment

Production

Installed

Swift Package Manager

Version

8.22.4

Did it work on previous versions?

No

Steps to Reproduce

I cannot reproduce locally.

Crash report: https://sindresorhus.sentry.io/share/issue/a66e1fa8c0f749c2b7f39795df12b0b2/


The exception message is:

pleteTaskWithClosurePN5swift12AsyncContextEPNS_10SwiftErrorE + 1

Which seems like part of a C++ stack trace (it's crashing in the Swift Concurrency runtime). But the first part is cut off. It should be completeTaskWithClosure. Since it is probably a stack trace, it would be great if the whole stack trace could be included, and even greater if it could be parsed as a normal crash, so the stack trace lines are demangled and presented as lines in the Sentry UI.

Expected Result

I expected the exception to include the full message and stack trace (if available).

Actual Result

It seems truncated.

Are you willing to submit a PR?

No response

sindresorhus avatar Apr 04 '24 04:04 sindresorhus

Thanks for reporting this. I took a glance and couldn't identify what causes this right now. I can confirm that the SDK is responsible for this, because the message is also truncated in the event JSON. Stacktraces with very long function names are working, though. CleanShot 2024-04-04 at 15 57 18@2x

philipphofmann avatar Apr 04 '24 13:04 philipphofmann