Debug sentry-kotlin-multiplatform issue 341 and sentry-cocoa #440
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📜 Description
Adds a detailed analysis document (
issue-341-analysis.md
) for issue #341, which describes the problem of incorrect stack traces being captured on iOS when usingcaptureException
.💡 Motivation and Context
This document provides a deep dive into the root cause of why
captureException
on iOS captures the current thread's stack trace instead of the originalNSException
's stack trace. It analyzes both the Sentry Kotlin Multiplatform and Sentry Cocoa SDKs, identifies the specific points of failure, and proposes a clear solution to ensure proper stack trace capture for Kotlin/Native exceptions on iOS.💚 How did you test it?
This PR introduces a documentation/analysis file. The analysis itself serves as the verification of the problem and the proposed solution, based on code examination and understanding of both SDKs. No new code tests were added as this is not a code change.
📝 Checklist
You have to check all boxes before merging:
sendDefaultPII
is enabled. (N/A - documentation)🔮 Next steps
The next step is to implement the proposed fix within the Sentry Cocoa SDK to ensure
NSException.callStackReturnAddresses
are correctly utilized when capturing exceptions on iOS.Learn more about Cursor Agents