Skip to content

fix(tool manager): resolve critical backend bugs from QA report (GHDL, Sync, Detection)#565

Open
bhavyabhardwaj001 wants to merge 4 commits into
FOSSEE:feature/tool-manager-integrationfrom
bhavyabhardwaj001:fix/windows-qa-bugs
Open

fix(tool manager): resolve critical backend bugs from QA report (GHDL, Sync, Detection)#565
bhavyabhardwaj001 wants to merge 4 commits into
FOSSEE:feature/tool-manager-integrationfrom
bhavyabhardwaj001:fix/windows-qa-bugs

Conversation

@bhavyabhardwaj001

Copy link
Copy Markdown
Contributor

Description

This Pull Request addresses the 6 high/medium-severity backend bugs identified during the recent Windows QA Testing Phase These fixes stabilize the core Windows backend of the eSim Tool Manager, ensuring that installation progress, runtime validation, and package detection function flawlessly.


Bugs Fixed

1. GHDL Regex Detection Failure (BUG-01)

  • Problem: The system crashed on GHDL Dunoon (0.37) because the regex r'GHDL\s+(\d+\.\d+\.\d+)' strictly required a 3-digit SemVer.
  • Fix: Updated the regex pattern across tool_manager_windows.py to r'GHDL\s+(\d+\.\d+(?:\.\d+)?)', natively supporting both 2-digit and 3-digit versioning formats.

2. False GHDL DLL Validation Error (BUG-02)

  • Problem: Verilator and GHDL are MSYS2 binaries relying on hidden .dll files in C:\msys64\usr\bin. Running them via Python subprocess caused false libgcc_s_seh-1.dll was not found crashes.
  • Fix: Added get_msys2_env() in utils.py and modified run_cmd_safe() to temporarily inject the MSYS2 binary directories into the child process PATH right before execution.

3. Installation Extraction Stall (BUG-03)

  • Problem: During heavy installations (GHDL/Verilator), the UI froze at 99.5% for over 15 minutes while silently extracting thousands of files via zf.extractall().
  • Fix: Injected a real-time [INFO] Extracting package... This may take several minutes. status marker into the standard output. The GUI now natively parses this to update the progress log.

4. Package Status Synchronization Failure (BUG-04)

  • Problem: Failed installations still showed a green "Installation Complete" message because tool_manager_windows.py exited with a 0 return code even when catching internal errors.
  • Fix: Modified the InstallWorker thread in main.py to continuously parse the stdout stream. If it detects [ERROR] or install_failed|, it dynamically flips the success flag to False and warns the user.

5 & 6. eSim and Verilator Detection Logic (BUG-05 & BUG-06)

  • Problem: eSim falsely reported "Not Detected" after installation because the detector strictly searched C:\FOSSEE\eSim instead of the active workspace.
  • Fix: Expanded the check_esim() and install_esim() loops to intelligently probe BASE_DIR (the repository root) for eSim.bat and Application.py, ensuring flawless detection regardless of where the developer cloned the repo.

Testing Performed

  • Verified ghdl --version parses 0.37 correctly without crashing.
  • Verified GHDL and Verilator launch successfully without missing .dll Windows popups.
  • Verified the Extracting package... message appears in the GUI during the 99.5% stall phase.
  • Verified that triggering an intentional failure correctly displays a warning instead of a "Success" popup.
  • Verified eSim is successfully detected immediately after an Analog Mode installation.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard to understand areas
  • My changes generate no new warnings
  • I have rebased against feature/tool-manager-integration to prevent merge conflicts.

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.

1 participant