Skip to content

Fix #617: run anonymize in background thread to prevent GUI freeze - #708

Open
Esma-Ali wants to merge 1 commit into
3C-SCSU:mainfrom
Esma-Ali:file_shuffler-bounty
Open

Fix #617: run anonymize in background thread to prevent GUI freeze#708
Esma-Ali wants to merge 1 commit into
3C-SCSU:mainfrom
Esma-Ali:file_shuffler-bounty

Conversation

@Esma-Ali

@Esma-Ali Esma-Ali commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

What this fixes

This PR fixes issue #617 where clicking Anonymize caused the GUI to freeze after selecting a folder.

Root cause

The file shuffler was being executed synchronously from the QML folder dialog flow, which blocked the main GUI thread.

What changed

  • moved the anonymize/file shuffler task into a background QThread
  • added Qt signals to report success and error back to the GUI
  • updated FileShuffler.qml so it starts the task asynchronously instead of expecting an immediate return value
  • updated the log panel when the background task finishes

Result

  • folder dialog closes normally
  • GUI remains responsive during processing
  • logs are shown without freezing the application
  • testing confirmed the shuffler completed successfully without a GUI hang

#617

@Shariq80

Copy link
Copy Markdown
Contributor

Excellent work! The provided logs perfectly confirm the bug described in #617: executing the intensive file shuffler loop directly from the QML folder dialog completely locks up the application's main loop.By refactoring this process into an asynchronous QThread and utilizing Qt signals to update the log panel, you successfully preserve UI responsiveness without interrupting the file operations. The layout remains unaffected, and the fix functions perfectly.

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.

2 participants