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

Fix missing line numbers in `CaptureMessage` stacktraces in IL2CPP builds

Open tustanivsky opened this issue 1 year ago • 2 comments
trafficstars

Closes #1509

tustanivsky avatar Feb 20 '24 08:02 tustanivsky

Fails
:no_entry_sign: 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 :no_entry_sign: dangerJS against 4a27123e4d5d6e280bd1ea3a3cd8a96bda876262

github-actions[bot] avatar Feb 20 '24 08:02 github-actions[bot]

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).

munkiki7 avatar May 08 '24 11:05 munkiki7

Closing as wildly out-of-date and stale.

bitsandfoxes avatar Sep 08 '25 14:09 bitsandfoxes