-
-
Notifications
You must be signed in to change notification settings - Fork 278
fix: debug images not loaded for split debug info only builds #3104
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: debug images not loaded for split debug info only builds #3104
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3104 +/- ##
=======================================
Coverage 87.88% 87.88%
=======================================
Files 287 287
Lines 9780 9785 +5
=======================================
+ Hits 8595 8600 +5
Misses 1185 1185 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| bool isSplitDebugInfoBuild() { | ||
| final str = StackTrace.current.toString(); | ||
| return buildIdRegex.hasMatch(str) || absRegex.hasMatch(str); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Split Debug Info Detection Fails
The isSplitDebugInfoBuild() method attempts to detect split debug info builds by checking StackTrace.current.toString() for "build_id" and "abs" patterns. However, these patterns are typically present only in crash/exception stack traces, not in regular execution stack traces. Consequently, the method will likely return false even in split debug info builds, rendering the detection unreliable and preventing intended debug image integration.
Locations (1)
Android Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 79f6b41 | 469.66 ms | 525.90 ms | 56.24 ms |
| 2d34233 | 470.54 ms | 558.90 ms | 88.36 ms |
| 6f47800 | 451.04 ms | 509.64 ms | 58.60 ms |
| dbd526b | 504.88 ms | 569.02 ms | 64.15 ms |
| 4481076 | 484.08 ms | 505.70 ms | 21.61 ms |
| 73a3c38 | 478.18 ms | 526.62 ms | 48.44 ms |
| 6ba4675 | 499.80 ms | 632.43 ms | 132.63 ms |
| aeb02f2 | 373.84 ms | 437.00 ms | 63.16 ms |
| 73dca78 | 476.53 ms | 522.21 ms | 45.68 ms |
| 640ad0c | 466.00 ms | 552.67 ms | 86.67 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 79f6b41 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
| 2d34233 | 6.54 MiB | 7.55 MiB | 1.01 MiB |
| 6f47800 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
| dbd526b | 6.54 MiB | 7.69 MiB | 1.15 MiB |
| 4481076 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
| 73a3c38 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
| 6ba4675 | 6.54 MiB | 7.53 MiB | 1015.26 KiB |
| aeb02f2 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
| 73dca78 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
| 640ad0c | 6.54 MiB | 7.69 MiB | 1.15 MiB |
denrase
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one question/suggestion, otherwise looking great 👍
|
|
||
| /// Check if the current build has been built with --split-debug-info | ||
| bool isSplitDebugInfoBuild() { | ||
| final str = StackTrace.current.toString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have to do this check every time this method is called? Nevermind if it's supposed to be only called once during integration call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can optimize and cache the value but it's only called once so it's fine for now
| @internal | ||
| StackTrace getCurrentStackTrace() => StackTrace.current; | ||
|
|
||
| /// Regex that matches an “abs …” stack-frame line emitted by split-debug-info builds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great comments 👍
💡 Motivation and Context
It's also possible that builds are not obfuscated but still built with
--split-debug-info, in those cases we do not include the debug image integration which is wrong and ends up in symbolication issues💚 How did you test it?
Manual testing, unit tests
📝 Checklist
sendDefaultPiiis enabled🔮 Next steps