Skip to content

Allow NVDA x64 to run on clean installs of Windows#18828

Merged
SaschaCowley merged 3 commits intomasterfrom
fixX64CRuntime
Aug 28, 2025
Merged

Allow NVDA x64 to run on clean installs of Windows#18828
SaschaCowley merged 3 commits intomasterfrom
fixX64CRuntime

Conversation

@SaschaCowley
Copy link
Copy Markdown
Member

Link to issue number:

Fixes #18827

Summary of the issue:

On clean copies of Windows (such as Windows Sandbox), 64 bit builds of NVDA fail to run.

Description of user facing changes:

These builds now run.

Description of developer facing changes:

None.

Description of development approach:

In #18814 (comment) we identified that NVDA wasn't running because vcruntime140.dll couldn't be loaded. Inspection of this DLL revealed that it was a PE32 executable.
Updated the build script to copy C Runtime DLLs from the appropriate architecture directory based on the build architecture.
Attempted running a 64 bit launcher in Windows Sandbox. NVDA starts but importing wx fails:

core failure
Traceback (most recent call last):
  File "nvda.pyw", line 309, in <module>
  File "core.pyc", line 713, in main
  File "NVDAHelper\__init__.pyc", line 40, in <module>
  File "eventHandler.pyc", line 13, in <module>
  File "api.pyc", line 14, in <module>
  File "textInfos\__init__.pyc", line 31, in <module>
  File "locationHelper.pyc", line 12, in <module>
  File "wx\__init__.pyc", line 17, in <module>
  File "wx\core.pyc", line 12, in <module>
  File "<loader>", line 15, in <module>
  File "<loader>", line 13, in __load
ImportError: (DLL load failed while importing _core: The specified module could not be found.) 'C:\\Users\\WDAGUtilityAccount\\AppData\\Local\\Temp\\nslFB31.tmp\\app\\wx._core.pyd'

After some investigation with procmon and Dependencies I worked out that 64 bit wx requires vcruntime140_1.dll.

Added vcruntime140_1.dll to the list of C Runtime DLLs to be included in the build. This is deleted if building for x86 as this file doesn't exist for the x86 runtime. I chose to go in this direction as this code is easier to remove when we drop x86 support.

Testing strategy:

Built x86 and x86_64 launchers and ran them in separate Windows Sandboxes.

Known issues with pull request:

None

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

Copilot AI review requested due to automatic review settings August 28, 2025 03:21
@SaschaCowley SaschaCowley requested a review from a team as a code owner August 28, 2025 03:21
@SaschaCowley SaschaCowley requested a review from seanbudd August 28, 2025 03:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes NVDA x64 builds failing to run on clean Windows installations by correcting the architecture-specific copying of Visual C++ Runtime DLLs during the build process.

  • Updated build script to copy C Runtime DLLs from the correct architecture directory (x64 vs x86)
  • Added vcruntime140_1.dll to the list of required runtime libraries for x64 builds
  • Maintained backward compatibility by excluding vcruntime140_1.dll for x86 builds

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@SaschaCowley
Copy link
Copy Markdown
Member Author

I believe the reason that we did not see this in CI is because the Windows Server 2025 and Windows Server 2022 GitHub Actions runners include Visual C++ runtimes. The runtime is also installed by a lot of other programs, so it is likely that a machine that has been used for a while already includes the runtime.

@SaschaCowley SaschaCowley added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Aug 28, 2025
@SaschaCowley SaschaCowley merged commit cfe8e7a into master Aug 28, 2025
40 checks passed
@SaschaCowley SaschaCowley deleted the fixX64CRuntime branch August 28, 2025 05:58
@github-actions github-actions bot added this to the 2026.1 milestone Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

64 bit NVDA is bundled with 32 bit vccorlib140.dll

3 participants