Fix Extract hanging on progress dialog when config dir is missing#313
Open
piotte13 wants to merge 1 commit into
Open
Fix Extract hanging on progress dialog when config dir is missing#313piotte13 wants to merge 1 commit into
piotte13 wants to merge 1 commit into
Conversation
The Extract flow builds an .ini path under <ini_file_path>/<configName>.ini, but only the parent of <ini_file_path> was being created, so opening the .ini for write raised FileNotFoundError. The exception killed the worker thread before ProgressBar.End() ran, leaving the "Downloading" dialog visible forever and the UI unresponsive. - FileManager.submit: ensure os.path.dirname(configFile) exists right before opening it for write, so the actual containing directory is created (not just its parent). - ProgressBar.Run: wrap the task callable in a try/except that schedules Destroy on the Tk thread if the worker crashes, so any future thread fault closes the progress window instead of hanging the UI. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Extract stuck on MacOS
<ini_file_path>/<configName>.inibut only the parent ofini_file_pathwas being created. On a fresh extract that target dir doesn't exist yet, soopen(configFile, "w+")raisesFileNotFoundError.ProgressBar.End()runs, leaving the "Downloading / NX-Optimizer Patching..." window visible forever and the UI unresponsive (reproduced on macOS arm64).Changes
src/modules/GameManager/FileManager.py—os.makedirs(os.path.dirname(configFile), exist_ok=True)now runs afterconfigFileis computed, so the actual containing directory is created (not just its parent). Works for both the legacy "Keys" path (whereconfigFile == ini_file_path) and the new per-config layout.src/modules/FrontEnd/ProgressBar.py— wrap the task callable in a try/except. If the worker crashes, scheduleDestroyon the Tk thread viaafter(0, …)so the progress window closes instead of stranding the UI. Errors are still logged.Test plan
run_tasks— progress window now closes; previously it hung.