Repository navigation
fix(app): release the engine setup window however it is closed (#666) - #750
Merged
Merged
Conversation
Closing the setup window with the title bar left its view model subscribed to the shared engine packages, so the window and view model were never collected. The window now releases those handlers on Closed; the Close command keeps doing it too.
KnifeLemon
approved these changes
Oct 29, 2026
KnifeLemon
left a comment
Owner
There was a problem hiding this comment.
Thanks, @SeoJCalive! Releasing on Closed covers the title-bar X, Alt+F4, the button and Esc, and putting it on the window keeps directly created windows covered too. Closes #666 as agreed there.
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.
What does this change?
Fixes #666 (item 1 of the findings comment). Closing the engine setup window with the title-bar X (or Alt+F4) left the window and its view model alive, because the view model's handlers on the shared engine packages were only removed by its Close command. The window now releases its view model's package handlers on
Closed, so every close route (X, the Later/Done button, Esc) lets the window be collected.EngineSetupViewModel: the unsubscribe loop moved intoRelease(); the Close command calls it before asking the window to close, as before.EngineSetupWindow: callsRelease()onClosed. Releasing twice (command, thenClosed) is harmless.WindowServiceso windows created directly (the render and zoom tests) are covered too.Type of change
How was it tested?
dotnet format --verify-no-changesdotnet test: App 1518 passed, 1 failed, 9 skipped; Core 719 passed, on Linux (xvfb). Compared test by test with a run before the change, only the 7 new tests differ. The one App failure,RenderTests.Engines_page_shows_versions_descriptions_and_download_speed, also fails on main on this machine (system gs/soffice versions).New
EngineSetupReleaseTests(7 cases), passing 10 runs in a row:WindowService.ShowEngineSetup()and closed withwindow.Close()or the Close command, three times each: every closed window and view model is collected and each package's setup handler count is back to where it started.window.Close(), the Close command, or a real Esc key press: same checks.Each test fails when the fix is taken out: without the
Closedrelease thewindow.Close()cases fail, without the unsubscribe all of them fail, releasing only inWindowServicefails the directly created case, and releasing on open fails the open-window checks.With the leak probe from the investigation, the 9 setup windows that stayed alive until the end of the run (
RenderTests.First_run_engine_setup_rendersin 7 languages,UiZoomTests.Engine_setup_grows_with_the_zoom_and_nothing_is_cut_offat 1.5 and 1.8) are now all collected by the next test.Screenshots (UI changes)
None, the window looks the same.
Checklist
src/Filee.App/Assets/i18n/*.jsonfiles (no new strings)THIRD-PARTY-NOTICES.md(none)