Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing line numbers in CaptureMessage stacktraces in IL2CPP builds #1567

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

tustanivsky
Copy link
Collaborator

Closes #1509

Copy link
Contributor

Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- Fix missing line numbers in `CaptureMessage` stacktraces in IL2CPP builds ([#1567](https://github.com/getsentry/sentry-unity/pull/1567))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by 🚫 dangerJS against 4a27123

@munkiki7
Copy link
Collaborator

munkiki7 commented May 8, 2024

Latest findings:

  • if you use the il2cpp API functions to get the current thread stacktrace frames (il2cpp_current_thread_get_stack_depth and iterate using il2cpp_current_thread_get_frame_at)
image

the call is successful only for the lowest frame (less meaningful);

  • the method name and function address look valid using the c++ to c# struct mapping for the valid frame;
image
  • the actual frames are only captured for the messages sent on Unity UI interactions (by other event processors);
image
  • even for the only valid frame we still could not extract the info like on the image above (module and package).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CaptureMessage stacktraces in IL2CPP builds are missing line numbers
3 participants