Skip to content

Fix liblouis access violation errors#19070

Merged
seanbudd merged 8 commits into
nvaccess:masterfrom
LeonarddeR:louisTest
Oct 13, 2025
Merged

Fix liblouis access violation errors#19070
seanbudd merged 8 commits into
nvaccess:masterfrom
LeonarddeR:louisTest

Conversation

@LeonarddeR

Copy link
Copy Markdown
Collaborator

Link to issue number:

Fixes #19025

Summary of the issue:

Translation can cause access violations on 64 bit version of NVDA.

Description of user facing changes:

Errors are hopefully fixed

Description of developer facing changes:

None

Description of development approach:

Our table resolver was returning an array of tables, but that array was not terminated with a NULLPTR as expected by liblouis. Added the None/NULLPTR to the end of the array.

Testing strategy:

Unit tests. The new unit test throws access violations and no longer does so after this patch.

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 October 9, 2025 12:41
@LeonarddeR LeonarddeR requested a review from a team as a code owner October 9, 2025 12:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request fixes access violation errors in liblouis that became more prevalent in 64-bit NVDA when performing braille translation. The root cause was that the table resolver was returning an array of tables without proper null termination, which liblouis expects.

Key changes:

  • Added proper null termination to the table path array in the table resolver
  • Added comprehensive unit tests to validate translation functionality for all braille tables
  • Updated copyright years and added type hints to the translate function

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
user_docs/en/changes.md Added changelog entry documenting the braille output error fix
tests/unit/test_brailleTables.py Enhanced test suite with translation tests and improved test structure using subTest
source/louisHelper.py Fixed null termination bug and improved function type annotations

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

Comment thread user_docs/en/changes.md Outdated
Comment thread user_docs/en/changes.md Outdated
Comment thread user_docs/en/changes.md Outdated
@nvdaes

nvdaes commented Oct 11, 2025

Copy link
Copy Markdown
Collaborator

This fixes the issue for me.

@seanbudd seanbudd merged commit 9333e49 into nvaccess:master Oct 13, 2025
27 of 29 checks passed
@github-actions github-actions Bot added this to the 2026.1 milestone Oct 13, 2025
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.

Liblouis seems unstable on 64 bit builds of NVDA

4 participants