Cancel FFmpeg library work when the dialog closes - #136
Draft
Blackspirits wants to merge 1 commit into
Draft
Blackspirits wants to merge 1 commit into
Blackspirits wants to merge 1 commit into
Conversation
Blackspirits
force-pushed
the
audit/ffmpeg-libs-close-cancel-dd7e
branch
from
September 15, 2026 20:31
f7a3ce3 to
eed96e1
Compare
Blackspirits
commented
Sep 15, 2026
Blackspirits
left a comment
Owner
Author
There was a problem hiding this comment.
Final adversarial review on eed96e1a1c5f3c57411293fdd3ee56316c385ef0 after CI SubtitleEdit#273: no blocker found. Verified X/Cancel/Escape converge on the same cancellation token; an already-running timer callback can no longer outlive the dialog without observing cancellation; temporary ZIP cleanup waits for the download task to release the file; #135 supplies rollback if cancellation lands during install. The earlier xUnit1051 warning was removed before this final run. No merge/promotion performed.
This was referenced Sep 16, 2026
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.
Purpose
Dependent lifecycle follow-up to #135 ("Install verified FFmpeg libraries transactionally").
#134 verifies the downloaded archive and #135 makes installation rollback-safe. This tranche closes the remaining dialog-lifetime gap: closing the FFmpeg libraries window through the title-bar X must cancel the same work as the explicit Cancel/Escape paths and must not leave a partial ZIP in the data folder.
Current upstream
SubtitleEdit/subtitleeditmain was rechecked atd6917286e355976da953d0ee22208b4bf9461699; its latest change is unrelated to this downloader.Finding fixed
DownloadFfmpegLibsViewModelimplementsIClosingCleanup, butOnClosingCleanup()previously only stopped/disposed its polling timer.Closing the window with the title-bar X could therefore leave the HTTP/hash task running, leave a partial/full ZIP in
Se.DataFolder, and allow already-started unpack/install work to outlive the window.Fix
_donevisible across timer/UI threads;CancelPendingWork();Normal successful close remains safe and idempotent.
Regression coverage
Tests pin that:
OnClosingCleanup()cancels a still-running service token;Scope / branch state
dd7e85e4319154aaf3105f85e745509ea902c4dceed96e1a1c5f3c57411293fdd3ee56316c385ef0d6917286e355976da953d0ee22208b4bf9461699AI assistance: ChatGPT was used for adversarial window-close/timer/task lifecycle review, cancellation race modelling and temporary-file cleanup regression design.
Final CI
Authoritative run: SubtitleEdit#273 on
eed96e1a1c5f3c57411293fdd3ee56316c385ef0Final adversarial review was performed on this exact HEAD after CI; no blocker found.