getsentry / sentry-cocoa

The official Sentry SDK for iOS, tvOS, macOS, watchOS.
https://sentry.io/for/cocoa/
MIT License
803 stars 316 forks source link

C++ exceptions have truncated message #3822

Open sindresorhus opened 6 months ago

sindresorhus commented 6 months ago

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

philipphofmann commented 6 months ago

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