Fix liblouis access violation errors#19070
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.
seanbudd
reviewed
Oct 10, 2025
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
nvdaes
approved these changes
Oct 11, 2025
Collaborator
|
This fixes the issue for me. |
seanbudd
approved these changes
Oct 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: