Outlook 2013: Unable to edit mail signature due to NVDA error generation #3833

Closed
nvaccessAuto opened this Issue Jan 31, 2014 · 24 comments

2 participants

@nvaccessAuto

Reported by leonarddr on 2014-01-31 09:39
In the outlook 2013 options dialog: tab mail, item signatures, the following error is generated whenever i try to edit the text of a signature:

ERROR - eventHandler.executeEvent (10:36:32):
error executing event: gainFocus on <NVDAObjects.IAccessible.winword.SpellCheckErrorField object at 0x04A72C90> with extra args of {}
Traceback (most recent call last):
  File "eventHandler.pyc", line 136, in executeEvent
  File "eventHandler.pyc", line 84, in __init__
  File "eventHandler.pyc", line 91, in next
  File "NVDAObjects\__init__.pyc", line 843, in event_gainFocus
  File "NVDAObjects\IAccessible\winword.pyc", line 67, in reportFocus
  File "speech.pyc", line 238, in speakObjectProperties
  File "baseObject.pyc", line 34, in __get__
  File "baseObject.pyc", line 110, in _getPropertyViaCache
  File "NVDAObjects\IAccessible\winword.pyc", line 59, in _get_name
  File "baseObject.pyc", line 34, in __get__
  File "baseObject.pyc", line 110, in _getPropertyViaCache
  File "NVDAObjects\window\winword.pyc", line 512, in _get_WinwordVersion
  File "baseObject.pyc", line 34, in __get__
  File "baseObject.pyc", line 110, in _getPropertyViaCache
  File "NVDAObjects\window\winword.pyc", line 534, in _get_WinwordApplicationObject
AttributeError: 'NoneType' object has no attribute 'application'
ERROR - scriptHandler.executeScript (10:36:34):
error executing script: <bound method SpellCheckErrorField.script_tab of <NVDAObjects.IAccessible.winword.SpellCheckErrorField object at 0x04A72C90>> with gesture u'tab'
Traceback (most recent call last):
  File "scriptHandler.pyc", line 174, in executeScript
  File "NVDAObjects\window\winword.pyc", line 546, in script_tab
  File "NVDAObjects\__init__.pyc", line 909, in makeTextInfo
  File "NVDAObjects\window\winword.pyc", line 246, in __init__
AttributeError: 'NoneType' object has no attribute 'range'
@nvaccessAuto

Comment 1 by leonarddr on 2014-06-27 08:06
Eventhough there have been implemented several improvements for Outlook, htis problem still seems to persist.

@nvaccessAuto

Comment 2 by jteh on 2014-06-27 08:36
Not verified, but marking as major priority for investigation.

@nvaccessAuto

Comment 3 by nvdakor on 2014-06-27 08:54
Hi,
Confirmed in Outlook 2010 and 2013.
STR:
1. In Outlook, go to Options dialog (Alt, F, T).
2. Select Mail category, then select Signatures.
3. If there is no signature profile, select New, type a name for the new signature profile (say, "test"), then click OK.
4. Tab through the signature dialog until you pass various combo boxes for font.
5. Press TAB until you reach OK button. The very last control is the signature edit box.
Expected: NvDA should not give error tones and announce the box as a multi-line edit field.
Actual: The following traceback is generated:

Input: kb(desktop):tab
ERROR - eventHandler.executeEvent (01:51:20):
error executing event: gainFocus on <NVDAObjects.IAccessible.winword.SpellCheckErrorField object at 0x09248B90> with extra args of {}
Traceback (most recent call last):
  File "eventHandler.pyc", line 143, in executeEvent
  File "eventHandler.pyc", line 91, in __init__
  File "eventHandler.pyc", line 98, in next
  File "C:\Users\User\AppData\Roaming\nvda\globalPlugins\enhancedTouchGestures.py", line 38, in event_gainFocus
  File "eventHandler.pyc", line 98, in next
  File "NVDAObjects\__init__.pyc", line 862, in event_gainFocus
  File "NVDAObjects\IAccessible\winword.pyc", line 68, in reportFocus
  File "baseObject.pyc", line 34, in __get__
  File "baseObject.pyc", line 110, in _getPropertyViaCache
  File "NVDAObjects\IAccessible\winword.pyc", line 32, in _get_errorText
  File "baseObject.pyc", line 34, in __get__
  File "baseObject.pyc", line 110, in _getPropertyViaCache
  File "NVDAObjects\window\winword.pyc", line 716, in _get_WinwordVersion
  File "baseObject.pyc", line 34, in __get__
  File "baseObject.pyc", line 110, in _getPropertyViaCache
  File "NVDAObjects\window\winword.pyc", line 738, in _get_WinwordApplicationObject
AttributeError: 'NoneType' object has no attribute 'application'

Developer info for the signature edit box:

name: exception: 'NoneType' object has no attribute 'application'
role: ROLE_EDITABLETEXT
states: STATE_MULTILINE, STATE_FOCUSABLE, STATE_FOCUSED
isFocusable: True
hasFocus: True
Python object: <NVDAObjects.IAccessible.winword.SpellCheckErrorField object at 0x091AFB50>
Python class mro: (<class 'NVDAObjects.IAccessible.winword.SpellCheckErrorField'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.winword.WordDocument'>, <class 'NVDAObjects.behaviors.EditableTextWithoutAutoSelectDetection'>, <class 'editableText.EditableTextWithoutAutoSelectDetection'>, <class 'NVDAObjects.behaviors.EditableText'>, <class 'editableText.EditableText'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <type 'object'>)
description: None
location: (449, 602, 777, 214)
value: u''
appModule: <'outlook' (appName u'outlook', process ID 9896) at address 486a550>
appModule.productName: u'Microsoft Outlook'
appModule.productVersion: u'14.0.7113.5000'
TextInfo: <class 'NVDAObjects.window.winword.WordDocumentTextInfo'>
windowHandle: 199600
windowClassName: u'_WwN'
windowControlID: 79
windowStyle: 1344274432
windowThreadID: 2492
windowText: u''
displayText: u''
IAccessibleObject: <POINTER(IAccessible) ptr=0x7ad9ce0 at 48c4170>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=199600, objectID=-4, childID=0
IAccessible accName: u'Edit signature'
IAccessible accRole: ROLE_SYSTEM_TEXT
IAccessible accState: STATE_SYSTEM_FOCUSED, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048580)
IAccessible accDescription: exception: (-2147352573, 'Member not found.', (None, None, None, 0, None))
IAccessible accValue: u''

Control ID (79) is same across versions.
Solution proposal: Let an overlay class for signature edit field be created in Outlook app module that treats the edit field just like any multi-line edit fields.
Thanks.

@nvaccessAuto

Comment 4 by nvdakor on 2014-06-27 08:57
Oops, changing priority to major again.

@nvaccessAuto

Comment 6 by nvdakor on 2014-06-27 09:01
Hi,
Actually, a better solution is to modify winword.py by checking that control iD is 18 or not (that field has a consistent control ID across versions).
Thanks.

@nvaccessAuto

Comment 7 by nvdakor on 2014-06-27 09:09
Hi,
Confirmed in Outlook 2007 as well:
STR:
1. Go to Tools/Options.
2. Go to message format tab, then select Signatures.
The rest are same as Outlook 2010/2013.
Thanks.

@nvaccessAuto

Comment 8 by mdcurran on 2014-06-27 09:26
Note that we still need to use the MS Word object model to access this control. But we don't have to necessarily use the spellCheck error code though obviously. But, the big problem is that the way to get the document from this window varies across MS Office versions. Plus I think in Office 2013 it seems impossible... though we could use UIA instead... assuming it was implemented on that control, which I'm not quite sure it wasl. I will need to do some further investigation on this one. Is there a regression from 2014.2 here? or has this never worked on any version of Office?

@nvaccessAuto

Comment 9 by leonarddr on 2014-06-27 09:34
I tested this in 2012.3 with office 2013, similar errors. So seems neither progression nor regression.

@nvaccessAuto

Comment 10 by Michael Curran <mick@... on 2014-07-02 02:38
In [9eb7021]:
```CommitTicketReference repository="" revision="9eb70211bc695ded778bb197d97241c8fce73990"
Merge branch 't3833' into next. Incubates #3833

Changes:
Added labels: incubating
@nvaccessAuto

Comment 11 by leonarddr on 2014-07-02 07:24
Although the signature window has been improved by this change, NVDA still doesn't read the contents as it should. Running from source:

Input: kb(laptop):tab
IO - speech.speak (09:21:48):
Speaking [signature edit Alt+t'](u'Edit)
DEBUGWARNING - NVDAObjects.window.winword._get_WinwordWindowObject (09:21:48):
Could not get MS Word object model
Traceback (most recent call last):
File "NVDAObjects\window\winword.py", line 730, in _get_WinwordWindowObject
pDispatch=oleacc.AccessibleObjectFromWindow(self.documentWindowHandle,winUser.OBJID_NATIVEOM,interface=comtypes.automation.IDispatch)
File "oleacc.py", line 212, in AccessibleObjectFromWindow
oledll.oleacc.AccessibleObjectFromWindow(hwnd,objectID,byref(p._iid_),byref(p))
File "_ctypes/callproc.c", line 945, in GetResult
WindowsError: [-2147467259](Error) Unspecified error
ERROR - eventHandler.executeEvent (09:21:48):
error executing event: gainFocus on <NVDAObjects.Dynamic_IAccessibleWordDocument_WwNWindowNVDAObject object at 0x04DD30D0> with extra args of {}
Traceback (most recent call last):
File "eventHandler.py", line 143, in executeEvent
_EventExecuter(eventName,obj,kwargs)
File "eventHandler.py", line 91, in __init__
self.next()
File "eventHandler.py", line 98, in next
return func(*args, **self.kwargs)
File "NVDAObjects\__init__.py", line 862, in event_gainFocus
self.reportFocus()
File "NVDAObjects\__init__.py", line 806, in reportFocus
speech.speakObject(self,reason=controlTypes.REASON_FOCUS)
File "speech.py", line 331, in speakObject
newInfo=obj.makeTextInfo(textInfos.POSITION_ALL)
File "NVDAObjects\__init__.py", line 928, in makeTextInfo
return self.TextInfo(self,position)
File "NVDAObjects\window\winword.py", line 266, in __init__
self._rangeObj=self.obj.WinwordSelectionObject.range
File "baseObject.py", line 34, in __get__
return instance._getPropertyViaCache(self.fget)
File "baseObject.py", line 110, in _getPropertyViaCache
val=getterMethod(self)
File "NVDAObjects\window\winword.py", line 751, in _get_WinwordSelectionObject
windowObject=self.WinwordWindowObject
File "baseObject.py", line 34, in __get__
return instance._getPropertyViaCache(self.fget)
File "baseObject.py", line 110, in _getPropertyViaCache
val=getterMethod(self)
File "NVDAObjects\window\winword.py", line 1019, in _get_WinwordWindowObject
return window.application.activeWindow.activePane
AttributeError: 'NoneType' object has no attribute 'application'

@nvaccessAuto

Comment 12 by mdcurran (in reply to comment 11) on 2014-07-02 07:56
Replying to leonarddr:
This is working fine for me running from source in Outlook 2010 on Windows 8.1 and 2013 on Windows 7.

what Operating System are you running?
Clearly there must be something different about our systems.

@nvaccessAuto

Comment 13 by leonarddr on 2014-07-02 08:00
I have Office 2013 together with Windows 8.1. Could the problem be related to #4227?

@nvaccessAuto

Comment 15 by Michael Curran <mick@... on 2014-07-07 09:13
In [f63f941]:
```CommitTicketReference repository="" revision="f63f9415a7366ec7c597c90b06e8ec78988efabe"
Merge branch 't3833' into next. Incubates #3833

@nvaccessAuto

Comment 16 by surveyor on 2014-07-10 11:25
Windows 7 and Office 2010. I'm getting error sounds in
Signatures and Stationery dialog when focused, while editing and navigating in the edit area.

IO - speech.speak (14:23:49):
Speaking signature Alt+t'
DEBUGWARNING - NVDAObjects.window.winword.get_WinwordWindowObject (14:23:49):
Could not get MS Word object model
Traceback (most recent call last):
File "NVDAObjects\window\winword.pyc", line 730, in get_WinwordWindowObject
File "oleacc.pyc", line 212, in AccessibleObjectFromWindow
File "_ctypes/callproc.c", line 945, in GetResult
WindowsError: -2147467259 Unspecified error
ERROR - eventHandler.executeEvent (14:23:49):
error executing event: gainFocus on with extra args of {}
Traceback (most recent call last):
File "eventHandler.pyc", line 143, in executeEvent
File "eventHandler.pyc", line 91, in __init

File "eventHandler.pyc", line 98, in next
File "NVDAObjects__init__.pyc", line 862, in event_gainFocus
File "NVDAObjects__init__.pyc", line 806, in reportFocus
File "speech.pyc", line 332, in speakObject
File "NVDAObjects__init__.pyc", line 928, in makeTextInfo
File "NVDAObjects\window\winword.pyc", line 266, in init
File "baseObject.pyc", line 34, in get
File "baseObject.pyc", line 110, in getPropertyViaCache
File "NVDAObjects\window\winword.pyc", line 751, in get_WinwordSelectionObject
File "baseObject.pyc", line 34, in __get

File "baseObject.pyc", line 110, in _getPropertyViaCache
File "NVDAObjects\window\winword.pyc", line 1019, in _get_WinwordWindowObject
AttributeError: 'NoneType' object has no attribute 'application'
IO - inputCore.InputManager.executeGesture (14:23:51):
Input: kb(laptop):NVDA+f1

@nvaccessAuto

Comment 17 by Michael Curran <mick@... on 2014-07-19 22:47
In [7fceb1d]:
```CommitTicketReference repository="" revision="7fceb1d552df2993b1c8bf3e0bb1fba67679931b"
Merge branch 't3833'. Fixes #3833

Changes:
Removed labels: incubating
State: closed
@nvaccessAuto

Comment 18 by mdcurran on 2014-07-19 22:48
Changes:
Milestone changed from None to 2014.3

@nvaccessAuto

Comment 19 by leonarddr on 2014-07-21 06:56
I'm sorry, but this isn't fixed for me yet.

@nvaccessAuto

Comment 20 by leonarddr on 2014-07-21 07:00
Input: kb(laptop):tab
IO - speech.speak (08:58:44):
Speaking [signature edit Alt+t'](u'Edit)
DEBUGWARNING - NVDAObjects.window.winword._get_WinwordWindowObject (08:58:44):
Could not get MS Word object model
Traceback (most recent call last):
File "NVDAObjects\window\winword.py", line 730, in _get_WinwordWindowObject
pDispatch=oleacc.AccessibleObjectFromWindow(self.documentWindowHandle,winUser.OBJID_NATIVEOM,interface=comtypes.automation.IDispatch)
File "oleacc.py", line 212, in AccessibleObjectFromWindow
oledll.oleacc.AccessibleObjectFromWindow(hwnd,objectID,byref(p._iid_),byref(p))
File "_ctypes/callproc.c", line 945, in GetResult
WindowsError: [-2147467259](Error) Unspecified error
ERROR - eventHandler.executeEvent (08:58:44):
error executing event: gainFocus on <NVDAObjects.Dynamic_IAccessibleWordDocument_WwNWindowNVDAObject object at 0x04FD5AB0> with extra args of {}
Traceback (most recent call last):
File "eventHandler.py", line 143, in executeEvent
_EventExecuter(eventName,obj,kwargs)
File "eventHandler.py", line 91, in __init__
self.next()
File "eventHandler.py", line 98, in next
return func(*args, **self.kwargs)
File "NVDAObjects\__init__.py", line 862, in event_gainFocus
self.reportFocus()
File "NVDAObjects\__init__.py", line 806, in reportFocus
speech.speakObject(self,reason=controlTypes.REASON_FOCUS)
File "speech.py", line 332, in speakObject
newInfo=obj.makeTextInfo(textInfos.POSITION_ALL)
File "NVDAObjects\__init__.py", line 928, in makeTextInfo
return self.TextInfo(self,position)
File "NVDAObjects\window\winword.py", line 266, in __init__
self._rangeObj=self.obj.WinwordSelectionObject.range
File "baseObject.py", line 34, in __get__
return instance._getPropertyViaCache(self.fget)
File "baseObject.py", line 110, in _getPropertyViaCache
val=getterMethod(self)
File "NVDAObjects\window\winword.py", line 751, in _get_WinwordSelectionObject
windowObject=self.WinwordWindowObject
File "baseObject.py", line 34, in __get__
return instance._getPropertyViaCache(self.fget)
File "baseObject.py", line 110, in _getPropertyViaCache
val=getterMethod(self)
File "NVDAObjects\window\winword.py", line 1024, in _get_WinwordWindowObject
return window.application.activeWindow.activePane
AttributeError: 'NoneType' object has no attribute 'application'

@nvaccessAuto

Comment 21 by Michael Curran <mick@... on 2014-07-21 22:24
In [745edb5]:
```CommitTicketReference repository="" revision="745edb5846cc56de2d9c6c3ecf3dd4ce94c0b625"
Winword NVDAObjects: add a little bit more debugging messages around fetching the real document window handle when dlealing with a _WwN proxy window (signature, spell check etc). Re #3833

@nvaccessAuto

Comment 22 by mdcurran (in reply to comment 16) on 2014-07-21 22:26
Replying to surveyor:
I cannot reproduce this at all. What exact version of Office 2010 do you have?
It will be impossible to fix this for your particular situation, but I have added a bit more debugging to master so that in future we may get a little more information on what is going on.

@nvaccessAuto

Comment 23 by mdcurran (in reply to comment 19) on 2014-07-21 22:30
Replying to leonarddr:
What exact version of Office is this? including service packs if any.
This works fine for me on Office 2010 on Windows 8.1, and Office 2013 on Windows 7.
It is unlikely that this can be fixed for your particualr system what ever the problem as we are already being pretty hacky to get it working on other systems. However, is the current situation any worse than what it used to be? I.e. has anything actually broken... or just still doesn't work?

@nvaccessAuto

Comment 24 by leonarddr (in reply to comment 23) on 2014-07-22 06:56
Replying to mdcurran:
Nothing has broken becides this, it's as bad as it has always been.
This is office 2013 15.0.4631.1002, installed using Office 365, which reports that it has the most recent updates. Also, all Windows 8.1 updates have been installed.

@nvaccessAuto

Comment 25 by surveyor (in reply to comment 22) on 2014-07-31 10:02
Replying to mdcurran:

Replying to surveyor:

I cannot reproduce this at all. What exact version of Office 2010 do you have?

It will be impossible to fix this for your particular situation, but I have added a bit more debugging to master so that in future we may get a little more information on what is going on.

Outlook Version: 14.0.7128.5000 (64-bit)
NVDA version: next-10921,7a6c337
a piece of log:
IO - inputCore.InputManager.executeGesture (12:52:23):
Input: kb(laptop):rightArrow
DEBUGWARNING - NVDAObjects.window.winword.Dynamic_IAccessibleWordDocument_WwNWindowNVDAObject.get_documentWindowHandle (12:52:23):
Could not find window for class WwG in thread.
DEBUGWARNING - NVDAObjects.window.winword._get_WinwordWindowObject (12:52:23):
Could not get MS Word object model from window 984800 with class _WwN
Traceback (most recent call last):
File "NVDAObjects\window\winword.pyc", line 730, in _get_WinwordWindowObject
File "oleacc.pyc", line 212, in AccessibleObjectFromWindow
File "_ctypes/callproc.c", line 945, in GetResult
WindowsError: -2147467259 Unspecified error
DEBUGWARNING - NVDAObjects.window.winword.Dynamic_IAccessibleWordDocument_WwNWindowNVDAObject._get_documentWindowHandle (12:52:23):
Could not find window for class _WwG in thread.
DEBUGWARNING - NVDAObjects.window.winword._get_WinwordWindowObject (12:52:23):
Could not get MS Word object model from window 984800 with class _WwN
Traceback (most recent call last):
File "NVDAObjects\window\winword.pyc", line 730, in _get_WinwordWindowObject
File "oleacc.pyc", line 212, in AccessibleObjectFromWindow
File "_ctypes/callproc.c", line 945, in GetResult
WindowsError: -2147467259 Unspecified error
ERROR - eventHandler.executeEvent (12:52:23):
error executing event: caret on with extra args of {}
Traceback (most recent call last):
File "eventHandler.pyc", line 143, in executeEvent
File "eventHandler.pyc", line 91, in __init

File "eventHandler.pyc", line 98, in next
File "NVDAObjects\IAccessible__init__.pyc", line 1285, in event_caret
File "NVDAObjects\window\winword.pyc", line 541, in event_caret
File "NVDAObjects__init__.pyc", line 928, in makeTextInfo
File "NVDAObjects\window\winword.pyc", line 261, in init
AttributeError: 'NoneType' object has no attribute 'range'
IO - inputCore.InputManager.executeGesture (12:52:24):

@nvaccessAuto

Comment 27 by heikofolkerts on 2015-09-17 19:47
The same error (at least it seems to be the same) occurs on my system: Windows 8.1 64bit (all windows updates applied), Microsoft Office 2010 Version 14.0.7153.500 (32bit)
My error message from the NVDA log is:
ERROR - eventHandler.executeEvent (21:33:04):
error executing event: gainFocus on
0x051200F0> with extra args of {}
Traceback (most recent call last):
File "eventHandler.pyc", line 143, in executeEvent
File "eventHandler.pyc", line 91, in init
File "eventHandler.pyc", line 98, in next
File "NVDAObjects__init__.pyc", line 867, in event_gainFocus
File "NVDAObjects__init__.pyc", line 811, in reportFocus
File "speech.pyc", line 365, in speakObject
File "NVDAObjects__init__.pyc", line 933, in makeTextInfo
File "NVDAObjects\window\winword.pyc", line 460, in init
AttributeError: 'NoneType' object has no attribute 'range'

The effect is that I canot create or edit a signature for my email account.

@nvaccessAuto nvaccessAuto added this to the 2014.3 milestone Nov 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment