Skip to content

Conversation

thomashampson
Copy link
Contributor

Description of work

Since the dawn of the mantidworkbench conda package, attempting to open the help window in a conda install on Windows would cause the application to crash. This change fixes the issue by ensuring that the files required by Qt WebEngine (such as QtWebEngineProcess.exe, .pak resource files, and icudtl.dat) are placed alongside the conda environment’s python.exe, which is where Qt expects them.

Other approaches were tested - including providing qt.conf files and setting environment variables for the resources and QtWebEngineProcess.exe - but these had no effect. From the observed behavior, the relevant search paths appear to be hard-coded within Qt WebEngine and cannot be overridden by configuration alone.

The fix here is essentially mimicking what we do with the standalone packaging, except in that case the mantidworkbench.exe is in a more friendly location from the perspective of Qt WebEngine (inside <install_root>/bin, rather than just <env_root> as with the conda installation). The fallback search paths appear to be relative to the .exe and are:

  • ../qt5/resources
  • ../resources
  • and the .exe location iself.

In the standalone install, because the .exe is nested inside bin, we could move the resources to ../lib/qt5. However, for the conda installation, that path would take us outside of the conda environment location because the python.exe sits in the root of the conda prefix. Taht is why we have to copy the files into the environment prefix.

Closes #34739

To test:

  1. Install the Windows standalone from this build and ensure that the help window opens as expected:
    https://builds.mantidproject.org/job/build_packages_from_branch/1350/
  2. Install the mantidworkbench package from conda and ensure that the help window opens as expected (previously would crash):
    mamba install -c mantid/label/windows-help-fix mantidworkbench

Reviewer

Your comments will be used as part of the gatekeeper process. Comment clearly on what you have checked and tested during your review. Provide an audit trail for any changes requested.

As per the review guidelines:

  • Is the code of an acceptable quality? (Code standards/GUI standards)
  • Has a thorough functional test been performed? Do the changes handle unexpected input/situations?
  • Are appropriately scoped unit and/or system tests provided?
  • Do the release notes conform to the guidelines and describe the changes appropriately?
  • Has the relevant (user and developer) documentation been added/updated?

Gatekeeper

As per the gatekeeping guidelines:

  • Has a thorough first line review been conducted, including functional testing?
  • At a high-level, is the code quality sufficient?
  • Are the base, milestone and labels correct?

@thomashampson thomashampson added this to the Release 6.14 milestone Sep 27, 2025
@thomashampson thomashampson added Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) Windows Only Only on Windows labels Sep 27, 2025
Copy link
Contributor Author

@thomashampson thomashampson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested both the standalone install and the conda install and in both cases the help window opens as expected without error.

@thomashampson thomashampson marked this pull request as ready for review September 27, 2025 14:44
@thomashampson
Copy link
Contributor Author

I'm going to merge this so that it's included in the manual testing.

@thomashampson thomashampson enabled auto-merge (squash) September 27, 2025 14:51
@thomashampson thomashampson changed the base branch from main to release-next September 27, 2025 14:52
@thomashampson thomashampson merged commit 1743ddd into release-next Sep 27, 2025
11 checks passed
@thomashampson thomashampson deleted the 34739-windows-conda-help-fix branch September 27, 2025 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) Windows Only Only on Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mantid Help crashes in Windows conda install
1 participant