nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
Other
2.08k stars 628 forks source link

language error for key 65663 in in windowsLCIDToLocaleName #11612

Open CyrilleB79 opened 4 years ago

CyrilleB79 commented 4 years ago

Steps to reproduce:

Use new beta of NVDA

Actual behavior:

Sometimes in the log, the following error occurs:

DEBUGWARNING - NVDAObjects.window.edit.ITextDocumentTextInfo._getFormatFieldAtRange (13:23:38.349) - MainThread (15536):
language error
Traceback (most recent call last):
  File "languageHandler.pyc", line 54, in windowsLCIDToLocaleName
KeyError: 65663

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "NVDAObjects\window\edit.pyc", line 547, in _getFormatFieldAtRange
  File "languageHandler.pyc", line 57, in windowsLCIDToLocaleName
KeyError: 65663

This error seems new and did not seem to appear in older NVDA versions. It happens only occasionally. I have not yet found a reliable way to reproduce this issue.

Expected behavior:

No such error

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

2020.3beta1

Windows version:

Windows 10 1809 (64-bit) build 17763.1397

Name and version of other software in use when reproducing the issue:

N/A

Other information about your system:

N/A

Other questions

Does the issue still occur after restarting your computer?

No yet tested, but I thought it was worth informing about this issue.

Have you tried any other versions of NVDA? If so, please report their behaviors.

No but I do not remember such error in the log.

If addons are disabled, is your problem still occuring?

Not tested.

Did you try to run the COM registry fixing tool in NVDA menu / tools?

No

feerrenrut commented 4 years ago

Other than the error, did you notice any problematic behavior, EG failing to auto switch language when it should?

65663 is 0x1007F

Based on https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/63d3d639-7fd2-4afb-abbe-0d5b5551eef8

I think this value should be "Reserved for invariant locale behavior" based on the 0x7F in the Language ID component of the LCID (2 bytes).

CyrilleB79 commented 4 years ago

I did not notice any other issue than the error. However, I am working most of the time with language detection option disabled.

I have just opened this issue to alert since I had never seen it before and I have seen it at least 3 times in the log since I have switched from 2020.2 to 2020.3beta1. If anyone has worked on this part of the code for this release, he may be warned of a potential issue.

I will try to enable automatic language switching more often to see if this cause any additional issue.

LeonarddeR commented 4 years ago

I can't think of any changes that justify this error. Note that it is still a debug warning though. Unless it's a showstopper for something, it shouldn't block 2020.3

LeonarddeR commented 3 years ago

I also have this with the following traceback in Word

DEBUGWARNING - NVDAObjects.UIA.UIATextInfo._getFormatFieldAtRange (07:45:16.956) - MainThread (13620):
language error
Traceback (most recent call last):
  File "languageHandler.pyc", line 55, in windowsLCIDToLocaleName
KeyError: 4096

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "NVDAObjects\UIA\__init__.pyc", line 287, in _getFormatFieldAtRange
  File "languageHandler.pyc", line 58, in windowsLCIDToLocaleName
KeyError: 4096

Pretty noisy in the log when debugWarning is on, however not more than that. That said, in case of LOCALE_CUSTOM_UNSPECIFIED, windowsLCIDToLocaleName shouldn't bother about checking the dictionaries at all.

josephsl commented 3 years ago

Hi, I remember dealing with this in a distant past (remember the issue with recognizing Aragonese a few years ago?). Thanks.

CyrilleB79 commented 3 years ago

@lukaszgo1 since you've worked recently on this part of code, maybe you can tell something for this issue.

lukaszgo1 commented 3 years ago

It would be nice to have reliable reproduction steps for this.

CyrilleB79 commented 3 years ago

As written in the original description:

I have not yet found a reliable way to reproduce this issue.

Unfortunately, this has not changed.

I had just CCed you in case you have an idea on this topic since you've worked recently in this part of the code.

Adriani90 commented 2 months ago

@CyrilleB79 did you still come accross this issue during last NVDA version?

CyrilleB79 commented 2 months ago

Did not remember to have seen this DEBUGWARNING in the log for some time now. I have not checked specifically either though. I'll try to pay attentention to it in the coming days.