Skip to content

Shuffler: processing freezes #617

Description

@3C-SCSU

🚨 ['Anonymize'] button causes program to hang

🎯 Summary

The 'Anonymize' button function is causing the application window to freeze and display the "Python 3 is not responding" message after the user selects the processed directory. The expected behavior is for the window to close and output status messages to be printed to the console, showing file processing progress.

Image

🛑 Detailed Bug Report

Steps to Reproduce

  1. Click the 'Anonymize' button in the application GUI.
  2. Select the desired processed directory from the file browser window.
  3. The main application window immediately freezes.
  4. The operating system displays the "Python 3 is not responding" message.
Image

Expected Behavior

  1. The file browser window should close.
  2. The main GUI window should remain responsive or close as intended by the design.
  3. Progress updates (output messages regarding file processing) should be printed to the console/terminal.

Current Behavior (The Bug)

The program hangs indefinitely, indicating that the processing operation is blocking the GUI's main thread.

Technical Analysis (Root Cause)

This behavior strongly suggests that the file processing task triggered by the 'Anonymize' button is a long-running operation that is executed directly on the main thread (the same thread responsible for updating the GUI). Because the operation takes time, it prevents the GUI from updating or responding to events, leading to the "Not Responding" state.

🛠️ Possible Solution

Any approach that solves the current issue is accepted. One way of solving it could be by using threads.
The long-running file anonymization task can be executed asynchronously to prevent the GUI from locking up.

  1. Easy troubleshooting: take any approach that provides a proven solution to the current problem; otherwise, follow the steps 2 and 3.
  2. Implement Threading/Multiprocessing: The anonymization function should be moved into a separate thread or process (e.g., using Python's threading or concurrent.futures modules).
  3. Update GUI Safely: If status messages need to be displayed in the GUI, mechanisms like signal/slot connections (for PyQt/PySide) or thread-safe methods must be used to send updates from the background thread back to the main GUI thread.

Labels

bug, freezing, gui, threading, critical

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions