Bug 86674 - Previously-viewed paragraphs have ATK_STATE_INVALID after navigation by page
Summary: Previously-viewed paragraphs have ATK_STATE_INVALID after navigation by page
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.4.1 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard: target:4.5.0 target:4.4.1 target:4.3.7
Keywords:
Depends on:
Blocks: a11y-Linux
  Show dependency treegraph
 
Reported: 2014-11-24 22:58 UTC by kendell clark
Modified: 2015-01-19 13:00 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
accessible-event listener (478 bytes, text/plain)
2014-11-24 22:58 UTC, kendell clark
Details
modified accessible-event listener (549 bytes, text/x-python)
2014-12-30 16:07 UTC, Joanmarie Diggs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kendell clark 2014-11-24 22:58:06 UTC
Created attachment 109967 [details]
accessible-event listener

steps to reproduce: 1. Open a large, preferably multi page libreoffice writer document, although it doesn't have to be open document format. 2. Press page down a couple of times. 3. Then press page up. Expected results: orca should go back to the previous page and read the contents. Actual results: orca is silent because of an object_state_changed invalid message, which causes orca not to be able to read the contents until LO is restarted. Joanie from the orca list has created an attached accessible listener. To use, simply open a terminal and run python3 invalid.py, before testing for this bug. I'll attach it below
Comment 1 Niklas Johansson 2014-11-26 08:52:14 UTC
Just to be sure, when you say page up and page down you mean the keyboard keys right?
I wasn't able to get orca completely silent as you describe in step 3 actual results. But that might be due to different versions of LibreOffice or orca. I can however see the invalid messages with the listener.
One thing that strikes me is that when using the page down key and the cursor does not have anything to land on, for example between to pages it doesn't even try to find something to land on. This is really not good from an accessibility point of view. When this happens I suppose that object_state_changed invalid is correct in this situation, however, it would be better to find a valid cursor position, preferably in the direction that your moving.
Comment 2 kendell clark 2014-11-26 10:36:49 UTC
hi. This bug happens with latest stable orca, which is currently 3.14. If you clone and build orca from git, this doesn't happen. However joanie tells me this is because she has stopped checking for atk_object_invalid, sorry if I'm mangling this, and this could break libreoffice support if this isn't fixed. This is my first actual bug filed, so I'm still new at this.
Comment 3 Robinson Tryon (qubit) 2014-12-30 06:22:37 UTC
(In reply to kendell clark from comment #0)
> Created attachment 109967 [details]
> accessible-event listener
> 
> steps to reproduce: 

> 1. Open a large, preferably multi page libreoffice
> writer document, although it doesn't have to be open document format. 

Open attachment 111114 [details] (from bug 87418).

1.5) Download and run the event listener in a terminal:

  python3 invalid.py

> 2.Press page down a couple of times. 
> 3. Then press page up. 

> Expected results:
> orca should go back to the previous page and read the contents. Actual
> results: orca is silent because of an object_state_changed invalid message,
> which causes orca not to be able to read the contents until LO is restarted.

So when I press PGDOWN and PGUP, I just see these:

ERROR: object with STATE_INVALID just claimed focus: [paragraph | ]
ERROR: object with STATE_INVALID just claimed focus: [paragraph | ]
...

> ...she has stopped checking for atk_object_invalid, sorry if
> I'm mangling this, and this could break libreoffice support if this isn't
> fixed.

What behavior should LibreOffice have here? What should the event listener be reporting?

Status -> NEEDINFO
Comment 4 Joanmarie Diggs 2014-12-30 15:12:40 UTC
(In reply to Robinson Tryon (qubit) from comment #3)

> What behavior should LibreOffice have here? What should the event listener
> be reporting?

The object:state-changed:focused events emitted. ;) Try pressing Alt+F and arrowing around in the file menu. Also try getting into a dialog box and tabbing around.

I'd also suggest arrowing around in paragraphs, but I just tried that and also got the STATE_INVALID error. :(
 
> Status -> NEEDINFO

I assume you now have the info you need. So un-NEEDINFOing it.
Comment 5 Joanmarie Diggs 2014-12-30 15:13:56 UTC
(In reply to Joanmarie Diggs from comment #4)
> (In reply to Robinson Tryon (qubit) from comment #3)
> 
> > What behavior should LibreOffice have here? What should the event listener
> > be reporting?
> 
> The object:state-changed:focused events emitted. ;) Try pressing Alt+F and
> arrowing around in the file menu. Also try getting into a dialog box and
> tabbing around.
> 
> I'd also suggest arrowing around in paragraphs, but I just tried that and
> also got the STATE_INVALID error. :(

s/around in paragraphs/amongst paragraphs/

Sorry for the noise.
Comment 6 Niklas Johansson 2014-12-30 15:46:44 UTC
Thank you Joanmarie for the clarification. 

When trying the listener again I see that I get a STATE_INVALID every time I enter a paragraph, in other words whenever I move from one paragraph to another or from a menu/dialog to the text area. Moving inside a paragraph seems fine though. And I did not see many STATE_INVALID issues inside the dialogs I tested, except one which seems to be the default button of the dialog (need to verify this later though).

I was testing with LibreOffice 4.3.2.2+ on Fedora 21.
Comment 7 Joanmarie Diggs 2014-12-30 16:07:47 UTC
Created attachment 111524 [details]
modified accessible-event listener

(In reply to Niklas Johansson from comment #6)
> Moving inside a paragraph seems fine though.

See comment #5. :) When you move within a paragraph, you don't get focus-change events for the paragraph which remains focused. ;) When you change paragraphs, you do see the focus-change events.

Having said that, if you created a listener which also listened for caret-moved events, you might discover things are not fine when you move inside a paragraph. Give the attached a try. When I do, I get errors for the caret-moved events as well.
Comment 8 Niklas Johansson 2015-01-02 08:45:22 UTC
Sorry, I should have paid closer attention to what you wrote. :)

I did a bibisect to see when the issue was introduced and and it seems likely that it was one of the IA2-merges that causes the trouble. It's a big commit so I'll have to keep digging into what may be the issue.

Details from the bibisect:

source-hash-362c8d67e1cb8920bf179b52c50b5997d32eb296

git bisect log
# bad: [a92705c1fabafddd43d175a0714855cd22551232] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
# good: [6ab7f53af36f13bbefdd4e4fcbd3d1ea432a77d9] source-hash-22029c7e17b4cb48acb058d47ec9c3b6b8b6b294
git bisect start 'latest' 'oldest'
# bad: [bebf9d31c8fe9de96798484288a0fffc4d54917d] source-hash-09e5de8278dd8f13adcf614db35c8a8a04ba8e47
git bisect bad bebf9d31c8fe9de96798484288a0fffc4d54917d
# bad: [20d42d26a12e5ded00b3510d2d9e254e7876dc78] source-hash-c1503da35d8879366da13258837cf0084a536809
git bisect bad 20d42d26a12e5ded00b3510d2d9e254e7876dc78
# bad: [df997ea92f012344541d1cf25eb1ff402e6de210] source-hash-7f5494f3c4bf14209a119c6b21c02e10075503ae
git bisect bad df997ea92f012344541d1cf25eb1ff402e6de210
# bad: [fb7cc8c858ad0d6b018efed2d24ae912c4ed670d] source-hash-c828319753558e25a48ce7808604bcc648f2483d
git bisect bad fb7cc8c858ad0d6b018efed2d24ae912c4ed670d
# bad: [fb7cc8c858ad0d6b018efed2d24ae912c4ed670d] source-hash-c828319753558e25a48ce7808604bcc648f2483d
git bisect bad fb7cc8c858ad0d6b018efed2d24ae912c4ed670d
# bad: [5c5a5d374edf40a9089de1af6e0c184572158d82] source-hash-a0be5278c24efcc9a6f22fe5398d780b0744f8ce
git bisect bad 5c5a5d374edf40a9089de1af6e0c184572158d82
# bad: [5c5a5d374edf40a9089de1af6e0c184572158d82] source-hash-a0be5278c24efcc9a6f22fe5398d780b0744f8ce
git bisect bad 5c5a5d374edf40a9089de1af6e0c184572158d82
# good: [37db8f46d051bae7e7a9ce9e68ce1693d909e40c] source-hash-137f872aa8e6e598e7c7ed1ffa4d21e580e22bdb
git bisect good 37db8f46d051bae7e7a9ce9e68ce1693d909e40c
# good: [37db8f46d051bae7e7a9ce9e68ce1693d909e40c] source-hash-137f872aa8e6e598e7c7ed1ffa4d21e580e22bdb
git bisect good 37db8f46d051bae7e7a9ce9e68ce1693d909e40c
# bad: [fa2f11e14834fe607f413e0b2c8787df6c7242fd] source-hash-5b03bc8a4d92fee2fdfdca4917b321985feb930a
git bisect bad fa2f11e14834fe607f413e0b2c8787df6c7242fd
# bad: [fa2f11e14834fe607f413e0b2c8787df6c7242fd] source-hash-5b03bc8a4d92fee2fdfdca4917b321985feb930a
git bisect bad fa2f11e14834fe607f413e0b2c8787df6c7242fd
# bad: [0b7262a63fb4f7a664b2db371ce61fe1f74f36c3] source-hash-362c8d67e1cb8920bf179b52c50b5997d32eb296
git bisect bad 0b7262a63fb4f7a664b2db371ce61fe1f74f36c3
# first bad commit: [0b7262a63fb4f7a664b2db371ce61fe1f74f36c3] source-hash-362c8d67e1cb8920bf179b52c50b5997d32eb296
Comment 9 Niklas Johansson 2015-01-03 23:32:37 UTC
So I found the problem. When a part of the IA2 changes was merged a few states where added:
MOVEABLE
DEFAULT
OFFSCREEN
COLLAPSE

When it comes to this specific case it is the state MOVEABLE that is causing trouble. But all of the above states will be reported as INVALID at the moment. The default buttons of dialogs has the state DEFAULT which made them report the state INVALID. :/

I'll need to seek guidance on the developers list on the best way to tackle this. Fixing DEFAULT is straight forward since it has a direct equivalent in AtkStateType, how to handle the others is not as clear to me.
Comment 10 Commit Notification 2015-01-05 09:26:03 UTC
Niklas Johansson committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=df5fa4082cfb17c5d5be6678995689485df6d429

fdo#86674 paragraphs have ATK_STATE_INVALID

It will be available in 4.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2015-01-16 09:11:28 UTC
Niklas Johansson committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3bde8657f50b88268ffb2693cc298411fcead005&h=libreoffice-4-4

fdo#86674 paragraphs have ATK_STATE_INVALID

It will be available in 4.4.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2015-01-19 13:00:53 UTC
Niklas Johansson committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5346929ef8127e177a1bf86f47be69da0ad7603f&h=libreoffice-4-3

fdo#86674 paragraphs have ATK_STATE_INVALID

It will be available in 4.3.7.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.