Skip to content

Fix virtual buffer creation when object IDs are None#20440

Open
cary-rowen wants to merge 2 commits into
nvaccess:betafrom
cary-rowen:fix/20356-vbuf-none-id-beta
Open

Fix virtual buffer creation when object IDs are None#20440
cary-rowen wants to merge 2 commits into
nvaccess:betafrom
cary-rowen:fix/20356-vbuf-none-id-beta

Conversation

@cary-rowen

@cary-rowen cary-rowen commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Link to issue number:

Fixes #20356

Summary of the issue:

In Foxit PDF Editor, NVDA could fail to create a virtual buffer for PDF content. When this happened, arrow keys scrolled the PDF instead of reading it.

Some virtual buffer backends can return None for part of an object identifier. This used to be accepted as 0 by ctypes, but the typed 64-bit VBuf calls now reject None for integer arguments.

Description of user facing changes:

PDF content in Foxit PDF Editor can be read with browse mode again when an object identifier contains None.

Description of developer facing changes:

Virtual buffer object identifiers are normalized before being passed to VBuf helper functions.

Description of development approach:

Added a small helper to convert None values in virtual buffer identifiers to 0.

This is handled in the shared virtual buffer code so buffer creation and related object lookup paths use the same behavior.

Testing strategy:

Manual testing.

Known issues with pull request:

None known.

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.

@cary-rowen

Copy link
Copy Markdown
Contributor Author

Hi @prakashgomathi1-ui,
Just letting you know that I've opened a PR for the fix here. Although @lantianbaiyun2002 has already verified it works, it would be awesome if we could get some additional testing!

@cary-rowen cary-rowen marked this pull request as ready for review July 2, 2026 10:25
@cary-rowen cary-rowen requested a review from a team as a code owner July 2, 2026 10:25
@cary-rowen cary-rowen requested a review from SaschaCowley July 2, 2026 10:25
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