GNOME Bugzilla – Bug 446881
Orca braillegenerator code assumes that what's in a table is a table cell.
Last modified: 2008-07-22 19:27:55 UTC
This error was found whilst working on the new text attribute code. Steps to reproduce: 1/ Start latest Orca from SVN HEAD. 2/ Type Insert-Space to bring up the Orca Preferences dialog and End to get to the Text Attribute tab. 3/ Type Tab to move into the text attribute list. 4/ Type right arrow to move to the "Spoken unless" column, then type Space to edit it. Results: The following message is displayed in the terminal window where you started Orca: /usr/lib/python2.5/site-packages/orca/braillegenerator.py:1540: GtkWarning: gtk_list_store_get_path: assertion `iter->stamp == GTK_LIST_STORE (tree_model)->stamp' failed desc = parent.table.getRowDescription(row) The problem is caused by the focus item in the table changing from a table cell to a text field. When you have focus in the "Spoken unless" column but aren't editing the entry, the component ancestry is: +-name='orca' role='application' state='' relations='' +-name='Orca Preferences' role='dialog' state='ACTIVE ENABLED RESIZABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name=None role='page tab list' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Text Attributes' role='page tab' state='ENABLED MULTI_LINE SELECTABLE SELECTED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED HORIZONTAL SENSITIVE SHOWING VISIBLE' relations='' +-name='Text attributes' role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name=None role='scroll pane' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='table' state='ENABLED FOCUSABLE FOCUSED SENSITIVE SHOWING VISIBLE MANAGES_DESCENDANTS' relations='' +-name='600' role='table cell' state='ACTIVE ENABLED FOCUSABLE SELECTABLE SELECTED SENSITIVE SHOWING SINGLE_LINE TRANSIENT VISIBLE' relations='' When it's being edited, it's: +-name='orca' role='application' state='' relations='' +-name='Orca Preferences' role='dialog' state='ACTIVE ENABLED RESIZABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name=None role='page tab list' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Text Attributes' role='page tab' state='ENABLED MULTI_LINE SELECTABLE SELECTED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED HORIZONTAL SENSITIVE SHOWING VISIBLE' relations='' +-name='Text attributes' role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name=None role='scroll pane' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='table' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE MANAGES_DESCENDANTS' relations='' +-name=None role='text' state='EDITABLE ENABLED FOCUSABLE FOCUSED SELECTABLE SENSITIVE SHOWING SINGLE_LINE VISIBLE' relations=''
Note that you can see the exact same message with gcalctool when Orca is running (filed as part of atk/gail bug #449757). Steps to reproduce (for message #3): 1/ Start Orca 2/ Start gcalctool (the GNOME calculator). 3/ Click on the View menu and make sure the Scientific radio button is set. 4/ Click on the Con button 5/ Select "Edit Constants..." 6/ Click on the value entry in row 0 (0.621). You will notice that if Orca isn't running, then the message isn't generated. I took it a little further: 1/ Started Orca 2/ Started gcalctool $ gdb ./gcalctool (gdb) run --g-fatal-warnings ... performed steps 3-6. Gtk-CRITICAL **: gtk_list_store_get_path: assertion `iter->stamp == GTK_LIST_STORE (tree_model)->stamp' failed aborting... Program received signal SIGABRT, Aborted.
+ Trace 142693
Thread 47453207605392 (LWP 6588)
So this looks like an atk/gail bug to me. Line 1540 of braillegenerator.py is: desc = parent.table.getRowDescription(row) That seems a very valid thing to do on a table for a row, irrespective of what's in the table (i.e "text" instead of a "table cell"). Will, what if any changes do you think should be made to Orca to handle this?
> #5 0x00002b28902f4954 in get_row_info (table=<value optimized out>, row=-1) > at gailtreeview.c:1887 ... > Line 1540 of braillegenerator.py is: > > desc = parent.table.getRowDescription(row) ... > Will, what if any changes do you think should be made to Orca to > handle this? It looks like we're passing an illegal value (row = -1). So, we probably could do some sort of prevention to check for row = -1: if row >= 0: desc = parent.table.getRowDescription(row) else: desc = None I suspect once this is done, the same problem will need to be solved when looking at the column description a few lines later.
Created attachment 90403 [details] [review] Patch to prevent the GtkWarning. Didn't need a check for col < 0 (we have a valid column). Patch not committed yet.
Should that be "if row >= 0"? - desc = parent.table.getRowDescription(row) + if desc >= 0: + desc = parent.table.getRowDescription(row) + else: + desc = None > Didn't need a check for col < 0 (we have a valid column). > Patch not committed yet. I suspect we'd run into a use case where col < 0, so it's probably good to do a similar check. Thanks!
Created attachment 90407 [details] [review] Revised patch. Yes it should. Well spotted. That'll serve me right for starting work at 2:30am this morning so I can take the afternoon off. Revised patch attached. Not committed yet. Thanks.
> Yes it should. Well spotted. That'll serve me right for starting > work at 2:30am this morning so I can take the afternoon off. > Revised patch attached. Not committed yet. Thanks. Ha! Looks good now. Thanks! Get outta here and go enjoy yourself. :-)
Patch committed. Changing status to "[pending]". Exiting the building.