Skip to content

[pull] main from getsentry:main - #421

Merged
pull[bot] merged 1 commit into
NOUIY:mainfrom
getsentry:main
Aug 12, 2026
Merged

[pull] main from getsentry:main#421
pull[bot] merged 1 commit into
NOUIY:mainfrom
getsentry:main

Conversation

@pull

@pull pull Bot commented Aug 12, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

* fix(replay): Don't let a wedged video encoder freeze the app

Some hardware encoders never emit BUFFER_FLAG_END_OF_STREAM after
signalEndOfInputStream(), so SimpleVideoEncoder.drainCodec() spun forever
while holding encoderLock. ReplayCache.close() then blocked on that lock,
and since it runs inline under ReplayIntegration's lifecycleLock, the main
thread froze until the system killed the process.

Two bounds, both needed: the drain loop now gives up after 10 consecutive
no-progress iterations (~1s), and close() only waits 2s for the encoder
lock before skipping the release. The loop bound alone isn't enough --
a native dequeueOutputBuffer call can itself never return, since
ALooper::awaitResponse has no deadline of its own.

Adds AutoClosableReentrantLock.tryAcquire(timeout, unit) for the latter.

Fixes getsentry/sentry-dart#3556

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(replay): Log the encoder give-up at WARNING

It's an abnormal condition that drops frames, and it fires at most once
per segment, so it's worth surfacing without debug logging enabled.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(replay): Address review comments on encoder ANR fix

Move isClosed.set(true) into a finally block so it runs even on unchecked
exceptions. Add a released flag to ReplayShadowMediaCodec and assert that
close() releases the encoder when the lock is available, and skips it when
timed out.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(replay): Rename misleading test to match what it actually exercises

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators Aug 12, 2026
@pull pull Bot added the ⤵️ pull label Aug 12, 2026
@pull
pull Bot merged commit b79be83 into NOUIY:main Aug 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant