Commit ade58cc
fix(replay): Post checkCanRecord to main thread to prevent deadlock
onScreenshotRecorded can run on the replay executor thread (PixelCopy
masked-capture and emit paths). checkCanRecord -> pauseInternal acquires
lifecycleLock — if another thread holds that lock and submits to the
same single-threaded executor, we deadlock.
Post checkCanRecord to the main looper so it never runs on the executor.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 6335e35 commit ade58cc
2 files changed
Lines changed: 9 additions & 2 deletions
File tree
- sentry-android-replay/src
- main/java/io/sentry/android/replay
- test/java/io/sentry/android/replay
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
356 | 360 | | |
357 | 361 | | |
358 | 362 | | |
| |||
375 | 379 | | |
376 | 380 | | |
377 | 381 | | |
378 | | - | |
| 382 | + | |
379 | 383 | | |
380 | 384 | | |
381 | 385 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| |||
647 | 649 | | |
648 | 650 | | |
649 | 651 | | |
| 652 | + | |
650 | 653 | | |
651 | 654 | | |
652 | 655 | | |
| |||
0 commit comments