-
-
Notifications
You must be signed in to change notification settings - Fork 646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With no braille display connected, exception is thrown inside a MathCAT braille computation #17563
Comments
Cc: @Emil-18, @LeonarddeR |
Related to my plans to a work around: is there a public interface that says whether a braille display is connected? I thought |
@NSoiffer , here Noelia. I'm not sure if you receive my private emails or they are missing. if not braille.handler.enabled: I'm not sure if this requires some kind of fix in NVDA, or if this is some to be fixed in MathCat or other add-ons if they override NVDA's behavior to show text in braille. |
@nvdaes: thanks, that's the check I was looking for for the workaround. That solves the problem for MathCAT, but addons may run into the same problem. |
It is also a minor speedup in that it no longer computes the braille string when there is no braille display.
Hi @NSoiffer NSoiffer, thanks for reporting this.
I'm closing this issue for now, since you have fixed your add-on and I currently see no reason why NVDA is in error here. |
This is a new bug that has shown up in NVDA 2025.1 alpha code. It is not part of 2024.4 or prior releases. Nothing changed in MathCAT.
If I turn on the braille viewer, there is no problem. This is possibly related to this commit which seems to try to address a similar "integer division or modulo by zero" error.
I can probably work around this bug by making a change in MathCAT to detect whether a braille display is connected or not. That's useful to do for efficiency (why generate braille when it goes nowhere?), but I suspect that other addons might be affected also so this would be good to fix.
FYI: I traced the exception to the call to
self._calculateWindowRowBufferOffset
insource/braille.py:BrailleBuffer::update()
. However, I can't see where there is division by 0 or modulo being called in that method.Steps to reproduce:
Actual behavior:
The speech log is:
and the log file contains the line:
Expected behavior:
There should be no error.
NVDA logs, crash dumps and other attachments:
System configuration
NVDA installed/portable/running from source:
Running from source
NVDA version:
2025.1 current source
Windows version:
Windows 10
Name and version of other software in use when reproducing the issue:
Other information about your system:
Other questions
Does the issue still occur after restarting your computer?
Yes
Have you tried any other versions of NVDA? If so, please report their behaviors.
All previous versions of NVDA have worked
If NVDA add-ons are disabled, is your problem still occurring?
NA
Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
Yes
The text was updated successfully, but these errors were encountered: