Skip to content

Fix/render thread handler race - #95

Merged
peerless2012 merged 2 commits into
masterfrom
fix/render-thread-handler-race
Nov 10, 2026
Merged

peerless2012 merged 2 commits into
masterfrom
fix/render-thread-handler-race

Conversation

@peerless2012

Copy link
Copy Markdown
Owner

This should fix #92

AssHandler.videoTime may be set from the player thread while a subtitle
view is starting or stopping its renderer.

- AssSubtitleTextureView: requestRender could run before
  AssRenderThread.start() had assigned its lateinit handler and throw
  UninitializedPropertyAccessException. Make the handler nullable and
  ignore calls until it is ready, queue MSG_INIT before publishing it so
  draws always come after init, and mark renderThread @volatile.
- AssSubtitleCanvasView: mark assExecutor @volatile.
- AssExecutor: drop the frame instead of throwing
  RejectedExecutionException when the executor was already shut down.
@peerless2012
peerless2012 merged commit 6afb1d5 into master Nov 10, 2026
4 checks passed
@peerless2012
peerless2012 deleted the fix/render-thread-handler-race branch November 10, 2026 02:41
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.

AssSubtitleTextureView: UninitializedPropertyAccessException in AssRenderThread.requestRender if videoTime is set while the thread starts

1 participant