nvaccess / nvda

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

support for Mirc is now broken #3202

Closed nvaccessAuto closed 8 years ago

nvaccessAuto commented 11 years ago

Reported by camlorn on 2013-05-06 02:01 In Mirc, NVDA now repeats everything said in the currently active chat window, including content no longer on the visible screen, when new messages arrive, and the following error occurs when attempting to review the channel output or private message output using object navigation--I'm assuming they're related, so have reported them together. This is Mirc 7.22, and I haven't updated it in months. Also, it was working as recently as 2 days ago. NVDA Version: master-9178,8090f41 The error and the developer info for a control that causes it:

ERROR - scriptHandler.executeScript (21:56:06):
error executing script: <bound method GlobalCommands.script_review_bottom of <globalCommands.GlobalCommands object at 0x063DA2F0>> with gesture u'ctrl+NVDA+end'
Traceback (most recent call last):
  File "scriptHandler.pyc", line 165, in executeScript
  File "globalCommands.pyc", line 521, in script_review_bottom
  File "api.pyc", line 175, in getReviewPosition
  File "NVDAObjects\__init__.pyc", line 903, in makeTextInfo
  File "displayModel.pyc", line 159, in __init__
  File "textInfos\offsets.pyc", line 280, in __init__
  File "displayModel.pyc", line 403, in _getCaretOffset
  File "displayModel.pyc", line 375, in _findCaretOffsetFromLocation
LookupError

And the developer info for the control:

INFO - globalCommands.GlobalCommands.script_navigatorObject_devInfo (21:58:41):
Developer info for navigator object:
name: None
role: ROLE_STATICTEXT
states: STATE_READONLY
isFocusable: False
hasFocus: False
Python object: <NVDAObjects.Dynamic_DisplayModelLiveTextIAccessibleWindowNVDAObject object at 0x066F66B0>
Python class mro: (<class 'NVDAObjects.Dynamic_DisplayModelLiveTextIAccessibleWindowNVDAObject'>, <class 'NVDAObjects.window.DisplayModelLiveText'>, <class 'NVDAObjects.behaviors.LiveText'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <type 'object'>)
description: None
location: (1, 41, 1109, 919)
value: None
appModule: <'mirc' (appName u'mirc', process ID 764) at address 6368270>
TextInfo: <class 'displayModel.EditableTextDisplayModelTextInfo'>
windowHandle: 9110662L
windowClassName: u'Static'
windowControlID: 32918
windowStyle: 1442840587
windowThreadID: 3580
windowText: u''
displayText: u'[pm](9:58) * Now talking in #emptychannel1234 [pm](9:58) <@camlorn> hello world '
IAccessibleObject: <POINTER(IAccessible) ptr=0x7da0dd0 at 67064e0>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=9110662L, objectID=-4, childID=0L
IAccessible accName: None
IAccessible accRole: ROLE_SYSTEM_STATICTEXT
IAccessible accState: STATE_SYSTEM_READONLY, STATE_SYSTEM_VALID (64)
IAccessible accDescription: None
IAccessible accValue: None
nvaccessAuto commented 11 years ago

Comment 1 by camlorn on 2013-05-06 02:01 Changes: Changed title from "suport for Mirc is now broken" to "support for Mirc is now broken"

nvaccessAuto commented 11 years ago

Comment 2 by jteh on 2013-05-06 02:07 The first issue should be fixed by c757762. Please test and report once a build arrives.

The second occurs because !DisplayModelTextInfo throws !LookupError instead of !RuntimeError for an invalid caret position. Arguably, this is more correct, but if we decide this is so, we need to change api.getReviewPosition to handle this.

nvaccessAuto commented 11 years ago

Comment 3 by jteh on 2013-05-06 02:08 Changes: Milestone changed from None to 2013.2

nvaccessAuto commented 11 years ago

Comment 4 by jteh on 2013-05-06 06:12 Mick, I was about to change api.getReviewPosition to handle !LookupError, but it seems there are quite a few other places where we don't cover !LookupError for POSITION_CARET. For now, I think it might be better to change displayModel to raise !RuntimeError and then clean up everything to use !LookupError separately.

nvaccessAuto commented 11 years ago

Comment 5 by mdcurran (in reply to comment 4) on 2013-05-06 06:14 Replying to jteh: Sounds fine to me.

nvaccessAuto commented 11 years ago

Comment 6 by James Teh <jamie@... on 2013-05-06 10:47 In [c999452edb76781968c2f6150de3cbbfcd420e26]:

DisplayModelTextInfo: Raise RuntimeError instead of LookupError when finding the caret fails.

LookupError probably makes more sense, but the rest of NVDA currently expects RuntimeError.
Re #3202.
nvaccessAuto commented 11 years ago

Comment 7 by jteh on 2013-05-06 11:11 Both of these issues should now be fixed as of that last commit, though I haven't tested myself. It'd be great if you could test this in tomorrow's snapshot.

nvaccessAuto commented 11 years ago

Comment 8 by camlorn on 2013-05-07 19:46 The error is gone. The other issue is not. It still rereads everything in the channel history when a new message is received, at least for me. I'm using Tirc, if it matters, which just makes the UI cleaner. Given that it was working before and that I've not updated anything, I'm not sure how important that is.

nvaccessAuto commented 11 years ago

Comment 10 by Michael Curran <mick@... on 2013-05-08 00:43 In [89969552eb7298a7b7757042b1917629b38a725d]:

Fix broken displayModel live text notifications. Fixes #3202 (new text in Mirc).

Specifically:
    \* Override _getTextInChunks on DisplayModelTextInfo to handle the line unit itself, by making use of the pre calculated line end offsets. DisplayModels may not always have a \n at the end of each line.
    DisplayModelLiveText NVDAObject: remove its implementation of textLines property as the default property will make use of the object's textInfo's _getTextInChunks which is now correct for displayModels.

Tested with Mirc 7.29.

Changes: State: closed

nvaccessAuto commented 11 years ago

Comment 11 by Michael Curran <mick@... on 2013-05-08 01:11 In [162585be1940e68f7917e4ed9f4b42b9556482d2]:

Clean up last commit. Now displayModel live text notifications really will use the more performant implementation of getTextInChunks. Re #3202