After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 489490 - [verified] [pyatspi] Test for OOo Writer bug #413909 not producing the correct output.
[verified] [pyatspi] Test for OOo Writer bug #413909 not producing the correc...
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
2.21.x
Other Linux
: Normal normal
: 2.22.0
Assigned To: Rich Burridge
Orca Maintainers
http://www.openoffice.org/issues/show...
Depends on: 490623
Blocks: 404411 448848 491885
 
 
Reported: 2007-10-23 17:25 UTC by Rich Burridge
Modified: 2008-07-22 19:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Orca output for the pyatspi'ed version when running this test. (337.20 KB, text/plain)
2007-10-23 17:26 UTC, Rich Burridge
  Details
Orca output for the old (pre-pyatspi) version generated when running this test. (352.56 KB, text/plain)
2007-10-23 17:26 UTC, Rich Burridge
  Details
Proposed fix (4.07 KB, patch)
2007-10-25 23:31 UTC, Eitan Isaacson
none Details | Review
Revised patch. (4.17 KB, patch)
2007-10-26 17:41 UTC, Rich Burridge
committed Details | Review
Proposed fix (1.43 KB, patch)
2007-11-05 17:42 UTC, Eitan Isaacson
committed Details | Review

Description Rich Burridge 2007-10-23 17:25:15 UTC
I manually ran the steps to test that bug #413909 is still fixed.

   Orca can no longer provide "smarts" for spell checking in OOo
   Writer v2.1 (or later).

Steps to reproduce:
1. Start oowriter.
2. Enter Alt-f, right arrow and Return.  (File->New->Text Document).
3. Enter the following line, each one followed by a Return:
     The quuuiick brown fox
     jumps over the lazy dog
4. Type Control-Home to position the text caret to the left of
   the first character on the first line.
5. Enter F7 to bring up the spell checking dialog.
6. Press Esc to dismiss the spell checking dialog.
7. Enter Alt-f, Alt-c to close the Writer application.
8. Enter Tab and Return to discard the current changes.

It missed speaking the line:
SPEECH OUTPUT: 'Misspelled word: quuuiick Context is The quuuiick brown fox'
Comment 1 Rich Burridge 2007-10-23 17:26:00 UTC
Created attachment 97741 [details]
Orca output for the pyatspi'ed version when running this test.
Comment 2 Rich Burridge 2007-10-23 17:26:44 UTC
Created attachment 97742 [details]
Orca output for the old (pre-pyatspi) version generated when running this test.
Comment 3 Rich Burridge 2007-10-24 20:56:32 UTC
The problem here is that in the locusOfFocusChanged() method
in the StarOffice.py script, we look for a specific role hierarchy
to detect the spell checking dialog:

        rolesList = [pyatspi.ROLE_PUSH_BUTTON, \
                     pyatspi.ROLE_OPTION_PANE, \
                     pyatspi.ROLE_DIALOG, \
                     pyatspi.ROLE_APPLICATION]

It seems that the hierarchy now (according to the printAncestry() 
routine, is:

+- [application | soffice]
  +- [dialog | Spellcheck:  (English (USA))]
    +- [push button | Change]

Eitan why isn't the option pane reported in the hierarchy?
Comment 4 Rich Burridge 2007-10-25 14:48:58 UTC
Additional information:

I've applied the patch from Eitan to pyatspi that "fixes the Mozilla
problem" and reinstalled pyatspi. I've pulled very latest Orca from
SVN trunk and reran the test. The problem still exists.

Both accerciser and at-poke see the option pane. 

I'll now dig deeper to see if it's an Orca or a pyatspi problem.
Comment 5 Rich Burridge 2007-10-25 15:40:15 UTC
Doing an Insert-F8 when focus in on the Change button in the Spell
check dialog, shows the hierarchy is "broken". I'll try to investigate 
further now, to determine exactly what old Orca used to do differently 
to handle this.


vvvvv PROCESS KEY PRESS EVENT F8 vvvvv
+- [application | soffice]
  +- [frame | Untitled1 - OpenOffice.org Writer]
    +- [root pane | Untitled1 - OpenOffice.org Writer]
      +- [menu bar | ]
        +- [menu | File]
        +- [menu | Edit]
        +- [menu | View]
        +- [menu | Insert]
        +- [menu | Format]
        +- [menu | Table]
        +- [menu | Tools]
        +- [menu | Window]
        +- [menu | Help]
      +- [panel | ]
        +- [tool bar | Standard]
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
        +- [tool bar | Formatting]
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
          WARNING CHILD.PARENT != PARENT!!!
      +- [panel | ]
      +- [panel | ]
      +- [panel | ]
      WARNING CHILD.PARENT != PARENT!!!
      +- [statusbar | ]
        +- [label | Page Number]
        +- [label | Page Style]
        +- [label | Zoom]
        +- [label | Insert Mode]
        +- [label | Selection Mode]
        +- [label | Document Modified]
        +- [label | Digital Signatures]
        +- [label | Size]
  +- [dialog | Spellcheck:  (English (USA))]
    +- [option pane | Spellcheck:  (English (USA))]
      +- [label | Not in dictionary]
      +- [scroll pane | Not in dictionary]
        +- [unknown | ]
          +- [paragraph | 1]
        +- [scroll bar | ]
        +- [filler | ]
      +- [label | Suggestions]
      +- [panel | Suggestions]
        WARNING CHILD.PARENT != PARENT!!!
      +- [label | Dictionary language]
      +- [combo box | Dictionary language]
        WARNING CHILD.PARENT != PARENT!!!
        WARNING CHILD.PARENT != PARENT!!!
      +- [push button | Ignore Once]
      +- [push button | Ignore All]
      +- [push button | Add]
      WARNING CHILD.PARENT != PARENT!!!
      +- [push button | Change All]
      +- [push button | AutoCorrect]
      +- [push button | Options]
      +- [push button | Help]
      +- [push button | Undo]
      +- [push button | Close]

^^^^^ PROCESS KEY PRESS EVENT F8 ^^^^^
Comment 6 Rich Burridge 2007-10-25 16:00:43 UTC
Well this is interesting. I went back to the pre-pyatspi'ed Orca, and
changed three values in settings.py:

cacheValues             = False
cacheDescriptions       = False
cacheAccessibles        = False

I then installed that version and reran the test and did an Insert-F7
when the focus was on the Change button in the Spell check dialog:

+-name='soffice' role='application' state='' relations=''
  +-name='Spellcheck:  (English (USA))' role='dialog' state='ENABLED SENSITIVE SHOWING VISIBLE' relations=''
    +-name='Change' role='push button' state='ENABLED FOCUSABLE FOCUSED SENSITIVE SHOWING VISIBLE' relations=''

No option pane there either. And it didn't speak the misspelled word context
(i.e. what latest Orca is failing to do too).

So this looks like a caching problem/difference.

Still investigating.

Comment 7 Eitan Isaacson 2007-10-25 23:31:52 UTC
Created attachment 97880 [details] [review]
Proposed fix

This is less than ideal.
But at least it fixes the output issues.
I would love to see this fixed upstream. The OO.o bug is:
http://www.openoffice.org/issues/show_bug.cgi?id=78117
Comment 8 Joanmarie Diggs (IRC: joanie) 2007-10-26 00:58:17 UTC
I was just glancing at the patch which seems to be based on the revised isDesiredFocusedItem() from default.py.  In the original isDesiredFocusedItem() we did a check to be sure current existed before getting its role.  The revised version was causing tracebacks if obj == None or if obj had fewer ancestors than our desired item.  I checked in a fix for default.py.  If this patch winds up being the approach we take in StarOffice, a similar change will likely be needed.
Comment 9 Rich Burridge 2007-10-26 17:41:10 UTC
Created attachment 97935 [details] [review]
Revised patch.

Makes two changes:

1/ In isDesiredFocusItem(), moves the check for current equal to None
   to the top of the for loop (similar to the change made by Joanie
   in default.py).

2/ In printHierarchy(), adjusted the two "root"'s to
   debug.getAccessibleDetails(root) (similar to the recent change that
   Will made to fix the print[Ancestry,Hierarchy] bug).
Comment 10 Willie Walker 2007-10-26 20:13:47 UTC
Looks good!  Please commit.  Thanks!
Comment 11 Rich Burridge 2007-10-26 20:15:50 UTC
Patch committed to SVN trunk. Moving to "[pending]".
Comment 12 Willie Walker 2007-10-30 16:37:45 UTC
We've tested this one pretty well.  Please feel free to close.
Comment 13 Rich Burridge 2007-10-30 17:02:19 UTC
Thanks. Closing as FIXED.
Comment 14 Joanmarie Diggs (IRC: joanie) 2007-11-01 16:56:22 UTC
This fix seems to be the source of Orca hanging with oocalc.  In _getParent() we call pyatspi.findDescendant() and never come back.
Comment 15 Rich Burridge 2007-11-01 17:06:58 UTC
Thanks Joanie. Reopening.
Comment 16 Eitan Isaacson 2007-11-03 21:35:07 UTC
Joanie, what at what point do you get to this hang? What are you doing?
Comment 17 Joanmarie Diggs (IRC: joanie) 2007-11-03 21:44:06 UTC
All I have to do is launch Calc with Orca running.
Comment 18 Eitan Isaacson 2007-11-05 17:42:44 UTC
Created attachment 98576 [details] [review]
Proposed fix

This patch re-implements Script._getParent. This is optomised to only override the regular behavior if it is a know problem node.
Comment 19 Rich Burridge 2007-11-05 18:25:57 UTC
Thanks Eitan. Looks good. I think this one can be closed out as FIXED, 
as we're tracking the remaining problems in bug #491885.
Comment 20 Rich Burridge 2007-11-05 21:20:03 UTC
Mike has also tested this (as part of testing bug #491885), so I've
checked the patch in, and am moving the state to "[pending]". 
Comment 21 Mike Pedersen 2007-11-06 17:21:44 UTC
Seems to work fine now. 
Comment 22 Eitan Isaacson 2007-11-06 17:30:26 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.