Skip to content

[pull] main from getsentry:main - #402

Merged
pull[bot] merged 3 commits into
NOUIY:mainfrom
getsentry:main
Jul 23, 2026
Merged

[pull] main from getsentry:main#402
pull[bot] merged 3 commits into
NOUIY:mainfrom
getsentry:main

Conversation

@pull

@pull pull Bot commented Jul 23, 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 : )

runningcode and others added 3 commits July 23, 2026 16:00
* fix(replay): Release MediaMuxer when the encoder fails to start

The MediaMuxer is opened eagerly in SimpleVideoEncoder's constructor, but
its release() was only reachable on paths that assume start() succeeded.
Two cases leaked it:

- createVideoOf constructed the encoder and called start() in one
  expression, so when start() threw the encoder was never assigned and
  release() could never run.
- SimpleVideoEncoder.release() released the muxer as the last statement of
  the try block, after draining and stopping the codec. Draining a codec
  that never started throws, skipping the muxer release.

Release the encoder if start() throws, and always release the muxer from a
finally block so it is freed even when draining/stopping the codec fails.
This surfaced as a CloseGuard "resource was acquired but never released"
warning. Complements #5583.

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

* changelog

* fix(replay): Skip MediaMuxer stop when no samples were written

MediaMuxer.stop() throws IllegalStateException when the muxer was started
but no sample was ever written to its track. SimpleMp4FrameMuxer.release()
only guarded against the never-started case, so a started-but-empty muxer
made release() throw.

Because release() runs from SimpleVideoEncoder's finally block, that throw
propagates out to createVideoOf, which treats release() as safe cleanup;
the encoder is left dangling and the orphan video file is never deleted.

Only call stop() when at least one sample was written; muxer.release() on a
started-but-not-stopped muxer is safe.

* Format code

* fix(replay): Guard each native release so cleanup never propagates

The finally block in SimpleVideoEncoder.release() released the codec,
surface, and muxer without guards. release() is treated by callers such as
createVideoOf as safe cleanup, but MediaMuxer.stop() (reached via
frameMuxer.release()) can still throw IllegalStateException on a genuine
file-finalization failure even when samples were written. That would skip
the remaining releases and propagate out of release().

Guard each release independently so failing to free one resource neither
skips the others nor escapes to the caller.

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
…behind isEnabled (#5790)

* perf(android): Guard manifest metadata debug logs behind isEnabled (JAVA-614)

The read helpers in ManifestMetadataReader built the debug message
(key + " read: " + value) unconditionally at the call site, and
DiagnosticLogger only filtered on options.isDebug() afterward. With
debug=false (the default) that discarded ~100 StringBuilder/String
allocations per init.

Guard the six read helpers with logger.isEnabled(DEBUG) so the message
is only constructed when debug logging is actually on. Behavior is
unchanged; this is a pure allocation/GC-pressure reduction on the init
path.

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

* changelog

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Unit tests already target the release variant (testBuildType = release)
and CI disabled the debug variant. Disable the debug variant locally too
so local builds match CI and skip building the unused variant. The
sample app keeps both variants for manual runs and profiling.

Update the contributor docs and test skill to reference
testReleaseUnitTest instead of testDebugUnitTest.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators Jul 23, 2026
@pull pull Bot added the ⤵️ pull label Jul 23, 2026
@pull
pull Bot merged commit 02e6bc8 into NOUIY:main Jul 23, 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