fix: Android app crashing on hot-restart in debug mode#3358
Merged
Conversation
Contributor
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
Contributor
Android Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| d3fb366 | 391.49 ms | 385.85 ms | -5.64 ms |
| a10aff4 | 488.19 ms | 515.02 ms | 26.83 ms |
| 6bcdc99 | 440.23 ms | 435.77 ms | -4.46 ms |
| cdf371b | 367.64 ms | 377.02 ms | 9.38 ms |
| 93b7728 | 475.28 ms | 489.13 ms | 13.86 ms |
| 2d34233 | 470.54 ms | 558.90 ms | 88.36 ms |
| 7cfee3b | 498.78 ms | 516.98 ms | 18.20 ms |
| 0fb45d0 | 482.79 ms | 554.02 ms | 71.23 ms |
| 0fb3800 | 465.64 ms | 536.77 ms | 71.13 ms |
| bfabaf2 | 408.04 ms | 444.38 ms | 36.34 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| d3fb366 | 13.93 MiB | 15.06 MiB | 1.13 MiB |
| a10aff4 | 13.93 MiB | 15.06 MiB | 1.13 MiB |
| 6bcdc99 | 13.93 MiB | 15.00 MiB | 1.06 MiB |
| cdf371b | 13.93 MiB | 15.18 MiB | 1.25 MiB |
| 93b7728 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
| 2d34233 | 6.54 MiB | 7.55 MiB | 1.01 MiB |
| 7cfee3b | 6.54 MiB | 7.70 MiB | 1.17 MiB |
| 0fb45d0 | 6.54 MiB | 7.70 MiB | 1.17 MiB |
| 0fb3800 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
| bfabaf2 | 13.93 MiB | 15.06 MiB | 1.13 MiB |
Previous results on branch: fix/stale-callbacks-crash-on-restart
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 5c9c1da | 364.65 ms | 359.74 ms | -4.91 ms |
| df23ec7 | 423.21 ms | 435.02 ms | 11.81 ms |
| 1858cb4 | 479.06 ms | 479.72 ms | 0.66 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 5c9c1da | 13.93 MiB | 15.18 MiB | 1.25 MiB |
| df23ec7 | 13.93 MiB | 15.18 MiB | 1.25 MiB |
| 1858cb4 | 13.93 MiB | 15.18 MiB | 1.25 MiB |
denrase
approved these changes
Nov 20, 2025
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3358 +/- ##
==========================================
+ Coverage 88.47% 90.33% +1.86%
==========================================
Files 291 95 -196
Lines 9917 3198 -6719
==========================================
- Hits 8774 2889 -5885
+ Misses 1143 309 -834 ☔ View full report in Codecov by Sentry. |
Contributor
iOS Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3615e19 | 1225.02 ms | 1234.57 ms | 9.55 ms |
| 393f8ec | 1256.45 ms | 1259.60 ms | 3.16 ms |
| 0929dbf | 1275.89 ms | 1282.22 ms | 6.33 ms |
| e45c0e1 | 1269.08 ms | 1278.83 ms | 9.75 ms |
| 2b5e090 | 1257.04 ms | 1258.07 ms | 1.02 ms |
| 8541716 | 1270.18 ms | 1271.80 ms | 1.62 ms |
| 9b99523 | 1256.06 ms | 1270.33 ms | 14.27 ms |
| 396cb30 | 1265.06 ms | 1265.73 ms | 0.67 ms |
| c8596a6 | 1234.11 ms | 1241.19 ms | 7.08 ms |
| cdf371b | 1246.24 ms | 1251.10 ms | 4.86 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3615e19 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| 393f8ec | 5.53 MiB | 6.01 MiB | 488.10 KiB |
| 0929dbf | 7.86 MiB | 9.54 MiB | 1.69 MiB |
| e45c0e1 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| 2b5e090 | 5.53 MiB | 6.00 MiB | 485.10 KiB |
| 8541716 | 5.53 MiB | 6.00 MiB | 479.96 KiB |
| 9b99523 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| 396cb30 | 5.53 MiB | 6.01 MiB | 488.17 KiB |
| c8596a6 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| cdf371b | 5.53 MiB | 6.02 MiB | 501.23 KiB |
Previous results on branch: fix/stale-callbacks-crash-on-restart
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| df23ec7 | 1254.21 ms | 1249.83 ms | -4.37 ms |
| 5c9c1da | 1261.27 ms | 1263.67 ms | 2.40 ms |
| 1858cb4 | 1253.71 ms | 1250.65 ms | -3.06 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| df23ec7 | 5.53 MiB | 6.02 MiB | 502.14 KiB |
| 5c9c1da | 5.53 MiB | 6.02 MiB | 502.15 KiB |
| 1858cb4 | 5.53 MiB | 6.02 MiB | 502.14 KiB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
When the proxy invokes into JNI, libflutter.so dereferences invalid isolate state and crashes (SIGSEGV), often showing PortProxyBuilder.invoke in the stack.
Simple solution
💡 Motivation and Context
Fixes crashing on hot-restart on Android
💚 How did you test it?
Manual test
📝 Checklist
sendDefaultPiiis enabled🔮 Next steps