Repository navigation
media: Run init_cb on init error without render mode - #13066
Merged
yell0wd0g merged 3 commits intoOct 5, 2026
Merged
Conversation
Contributor
|
Contributor
🤖 Gemini Suggested Commit Message💡 Pro Tips for a Better Commit Message:
|
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates StarboardRendererClient to handle initialization errors immediately without waiting for a rendering mode, and adds comprehensive unit tests for these scenarios. Feedback on the changes highlights a potential dangling pointer issue in StarboardRendererTest.InitializeWithInvalidSbPlayer where a local callback is registered to a member-owned renderer_ that outlives the test method, suggesting a scoped helper to reset the callbacks upon test exit.
borongc
reviewed
Oct 2, 2026
StarboardRendererClient completed initialization only after both the Mojo Initialize() reply and the rendering mode arrived. The GPU side sends a rendering mode only after it creates a valid SbPlayerBridge, so an init error before that (SbPlayerCreate() failure, an invalid output mode, a bypass-bridge init failure, Android overlay failures) sent no mode. init_cb never ran and pipeline start hung on every Starboard platform. Run init_cb immediately on an error status. A successful reply still waits for the rendering mode. Add tests for an error with no rendering mode, a late rendering mode after a failed init, and success-then-mode ordering. Stop injecting a rendering mode in the existing bypass-bridge failure test, which masked the hang. Also assert that no rendering mode is sent when SbPlayerBridge creation fails. Bug: 568602448
The condition is self-explanatory, per review feedback. Bug: 568602448
Address review comments. Bug: 568602448
abhijeetk
force-pushed
the
init-error-before-rendering-mode
branch
from
October 5, 2026 07:08
efd897c to
53ae2fc
Compare
Collaborator
Author
borongc
approved these changes
Oct 5, 2026
yell0wd0g
approved these changes
Oct 5, 2026
yell0wd0g
left a comment
Contributor
There was a problem hiding this comment.
LGTM! Thanks @abhijeetk !
briantting
pushed a commit
that referenced
this pull request
Oct 6, 2026
…r mode Refer to original PR: #13066 StarboardRendererClient completed initialization only after both the Mojo Initialize() reply and the rendering mode arrived. The GPU side sends a rendering mode only after it creates a valid SbPlayerBridge, so an init error before that (SbPlayerCreate() failure, an invalid output mode, a bypass-bridge init failure, Android overlay failures) sent no mode. init_cb never ran and pipeline start hung on every Starboard platform. Run init_cb immediately on an error status. A successful reply still waits for the rendering mode. Add tests for an error with no rendering mode, a late rendering mode after a failed init, and success-then-mode ordering. Stop injecting a rendering mode in the existing bypass-bridge failure test, which masked the hang. Also assert that no rendering mode is sent when SbPlayerBridge creation fails. Bug: 568602448 (cherry picked from commit fd27ee6)
briantting
pushed a commit
that referenced
this pull request
Oct 16, 2026
…r mode Refer to original PR: #13066 StarboardRendererClient completed initialization only after both the Mojo Initialize() reply and the rendering mode arrived. The GPU side sends a rendering mode only after it creates a valid SbPlayerBridge, so an init error before that (SbPlayerCreate() failure, an invalid output mode, a bypass-bridge init failure, Android overlay failures) sent no mode. init_cb never ran and pipeline start hung on every Starboard platform. Run init_cb immediately on an error status. A successful reply still waits for the rendering mode. Add tests for an error with no rendering mode, a late rendering mode after a failed init, and success-then-mode ordering. Stop injecting a rendering mode in the existing bypass-bridge failure test, which masked the hang. Also assert that no rendering mode is sent when SbPlayerBridge creation fails. Bug: 568602448 (cherry picked from commit fd27ee6)
briantting
pushed a commit
that referenced
this pull request
Oct 16, 2026
…r mode Refer to original PR: #13066 StarboardRendererClient completed initialization only after both the Mojo Initialize() reply and the rendering mode arrived. The GPU side sends a rendering mode only after it creates a valid SbPlayerBridge, so an init error before that (SbPlayerCreate() failure, an invalid output mode, a bypass-bridge init failure, Android overlay failures) sent no mode. init_cb never ran and pipeline start hung on every Starboard platform. Run init_cb immediately on an error status. A successful reply still waits for the rendering mode. Add tests for an error with no rendering mode, a late rendering mode after a failed init, and success-then-mode ordering. Stop injecting a rendering mode in the existing bypass-bridge failure test, which masked the hang. Also assert that no rendering mode is sent when SbPlayerBridge creation fails. Bug: 568602448 (cherry picked from commit fd27ee6)
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.
StarboardRendererClient completed initialization only after both the
Mojo Initialize() reply and the rendering mode arrived. The GPU side
sends a rendering mode only after it creates a valid SbPlayerBridge,
so an init error before that (SbPlayerCreate() failure, an invalid
output mode, a bypass-bridge init failure, Android overlay failures)
sent no mode. init_cb never ran and pipeline start hung on every
Starboard platform.
Run init_cb immediately on an error status. A successful reply still
waits for the rendering mode.
Add tests for an error with no rendering mode, a late rendering mode
after a failed init, and success-then-mode ordering. Stop injecting a
rendering mode in the existing bypass-bridge failure test, which
masked the hang. Also assert that no rendering mode is sent when
SbPlayerBridge creation fails.
Bug: 568602448