nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
https://www.nvaccess.org/
Other
2.12k stars 637 forks source link

Excel Find and Replace dialog raises error when Japanese characters are typed #10936

Open nishimotz opened 4 years ago

nishimotz commented 4 years ago

Steps to reproduce:

Expected behavior:

While in the edit control, characters should be announced when the left/right arrow keys are pressed. Also, no error sound.

Actual behavior:

When this error occurs, the announcements of multi-byte characters can not be heard, so it is difficult to type or confirm such characters.

Error in log:

ERROR - eventHandler.executeEvent (19:39:55.151) - MainThread (27576):
error executing event: caret on <NVDAObjects.Dynamic_DisplayModelEditableTextInputCompositionInputComposition object at 0x00BA58F0> with extra args of {}
Traceback (most recent call last):
  File "eventHandler.pyc", line 155, in executeEvent
  File "eventHandler.pyc", line 92, in __init__
  File "eventHandler.pyc", line 100, in next
  File "NVDAObjects\behaviors.pyc", line 189, in event_caret
  File "NVDAObjects\__init__.pyc", line 1155, in event_caret
  File "review.pyc", line 174, in handleCaretMove
  File "documentBase.pyc", line 24, in makeTextInfo
  File "displayModel.pyc", line 292, in __init__
  File "textInfos\offsets.pyc", line 453, in __init__
  File "displayModel.pyc", line 609, in _getCaretOffset
AttributeError: 'NoneType' object has no attribute 'toLTRB'
ERROR - eventHandler.executeEvent (19:39:55.719) - MainThread (27576):
error executing event: caret on <NVDAObjects.Dynamic_DisplayModelEditableTextInputCompositionInputComposition object at 0x00BA58F0> with extra args of {}
Traceback (most recent call last):
  File "eventHandler.pyc", line 155, in executeEvent
  File "eventHandler.pyc", line 92, in __init__
  File "eventHandler.pyc", line 100, in next
  File "NVDAObjects\behaviors.pyc", line 189, in event_caret
  File "NVDAObjects\__init__.pyc", line 1155, in event_caret
  File "review.pyc", line 174, in handleCaretMove
  File "documentBase.pyc", line 24, in makeTextInfo
  File "displayModel.pyc", line 292, in __init__
  File "textInfos\offsets.pyc", line 453, in __init__
  File "displayModel.pyc", line 609, in _getCaretOffset
AttributeError: 'NoneType' object has no attribute 'toLTRB'
ERROR - eventHandler.executeEvent (19:39:56.407) - MainThread (27576):
error executing event: caret on <NVDAObjects.Dynamic_DisplayModelEditableTextInputCompositionInputComposition object at 0x00BA58F0> with extra args of {}
Traceback (most recent call last):
  File "eventHandler.pyc", line 155, in executeEvent
  File "eventHandler.pyc", line 92, in __init__
  File "eventHandler.pyc", line 100, in next
  File "NVDAObjects\behaviors.pyc", line 189, in event_caret
  File "NVDAObjects\__init__.pyc", line 1155, in event_caret
  File "review.pyc", line 174, in handleCaretMove
  File "documentBase.pyc", line 24, in makeTextInfo
  File "displayModel.pyc", line 292, in __init__
  File "textInfos\offsets.pyc", line 453, in __init__
  File "displayModel.pyc", line 609, in _getCaretOffset
AttributeError: 'NoneType' object has no attribute 'toLTRB'

System configuration

NVDA installed/portable/running from source:

NVDA version:

Windows version:

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.

If addons are disabled, is your problem still occuring?

Yes

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

No

feerrenrut commented 4 years ago

@nishimotz Does this causes any noticeable degradation in behavior or just the error sound?

nishimotz commented 4 years ago

While in the edit control, characters should be announced when the left/right arrow keys are pressed. When this error occurs, the announcements of multi-byte characters can not be heard, so it is difficult to type or confirm such characters.

nishimotz commented 4 years ago

If error sound is suppressed in release build, can it be used normally? I think the caret move announcements are missing when this error occurs.

feerrenrut commented 4 years ago

@nishimotz, yes it sounds like this will cause problems in the release. Depending on the complexity of a fix, it might be too late to do something about this, it may have to wait for the 2020.2 release.

lukaszgo1 commented 4 years ago

@nishimotz Would you be able to bisect this perhaps?

feerrenrut commented 4 years ago

I would start by seeing how the behavior changes when checking if objLocation is None and raising a RuntimeError in displayModel.EditableTextDisplayModelTextInfo._getCaretOffset

It would be good to understand what the exact type is for self.obj and why it's call to def _get_location fails

nishimotz commented 4 years ago

I am checking again, but it doesn't seem to be a regression. Now I can see the similar issue with 2019.2.1.