Skip to content

fix(replay): Change bitmap config to ARGB_8888 for screenshots #4282

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

Merged
merged 3 commits into from
Mar 24, 2025

Conversation

romtsn
Copy link
Member

@romtsn romtsn commented Mar 24, 2025

📜 Description

An attempt to fix SIGSEGV which seems to be happening when we stop the replay after 30s the app has been backgrounded. I traced it down to this call which is where the exception (SkColorInfo::operator=(SkColorInfo const&)+32) is happening. This mInfo is set from the Bitmap.Config value that we pass upon constructing a bitmap. My theory is that it doesn't work well with the RGB_565 config, especially when we're reusing the same bitmap to capture screenshots.

Also it could be a combination of RN and some device vendors having tweaks to the AOSP code, not sure.

💡 Motivation and Context

Fixes #4228

💚 How did you test it?

no way to test this sadly as I couldn't reproduce on my devices

📝 Checklist

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Copy link
Contributor

github-actions bot commented Mar 24, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 414.52 ms 443.34 ms 28.82 ms
Size 1.58 MiB 2.22 MiB 652.84 KiB

Previous results on branch: rz/fix/session-replay-sigsegv-on-close

Startup times

Revision Plain With Sentry Diff
6e36d75 396.28 ms 406.11 ms 9.83 ms

App size

Revision Plain With Sentry Diff
6e36d75 1.58 MiB 2.22 MiB 652.83 KiB

@romtsn romtsn enabled auto-merge (squash) March 24, 2025 13:47
@romtsn romtsn merged commit 2521792 into main Mar 24, 2025
33 checks passed
@romtsn romtsn deleted the rz/fix/session-replay-sigsegv-on-close branch March 24, 2025 13:52
romtsn added a commit that referenced this pull request Mar 24, 2025
* fix(replay): Change bitmap config to ARGB_8888 for screenshots

* Changelog
romtsn added a commit that referenced this pull request Mar 24, 2025
…) (#4283)

* fix(replay): Change bitmap config to ARGB_8888 for screenshots

* Changelog
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.

[SR] io.sentry.android.replay.screenshotrecorder.close android SIGSEGV crash
2 participants