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 726243 - AtspiEvent.source is NULL and atspi-event-listener.c doesn't expect that
AtspiEvent.source is NULL and atspi-event-listener.c doesn't expect that
Status: RESOLVED FIXED
Product: at-spi
Classification: Platform
Component: at-spi2-core
unspecified
Other Linux
: Normal normal
: ---
Assigned To: At-spi maintainer(s)
At-spi maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-03-13 14:09 UTC by Francesco Fumanti
Modified: 2014-03-17 13:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add a check NULL for the source of the event (1.08 KB, patch)
2014-03-14 10:50 UTC, Alejandro Piñeiro Iglesias (IRC: infapi00)
committed Details | Review

Description Francesco Fumanti 2014-03-13 14:09:02 UTC
In reference to the following bug on launchpad: 
https://bugs.launchpad.net/ubuntu/+source/at-spi2-core/+bug/1253670

The Media Manager named MediaElch makes Onboard crash systematically on Ubuntu saucy and Ubuntu trusty when doing certain manipulation. 

In fact, when I tell MediaElch to search for information about the selected movie on the internet, it opens a window where it shows possible matches that it found and I have to click on the correct movie to get the corresponding information. However, by doing so, MediaElch not only downloads the information, but the on-screen keyboard Onboard also crashes.

It also crashes for example when performing a multiple selection of files which have to be scraped.

I have been told the following: "It seems while processing a "object:state-changed:focused" message AtspiEvent.source is NULL and atspi-event-listener.c doesn't expect that to happen in multiple places. Onboard could indirectly be the cause, perhaps due to the asynchronous event processing, but the crash ultimately happens in libatspi2."

The bug filed on launchpad also contains a trace back. 

Thanks in advance for looking at it.
Comment 1 Alejandro Piñeiro Iglesias (IRC: infapi00) 2014-03-14 10:50:34 UTC
Created attachment 271858 [details] [review]
Add a check NULL for the source of the event

Well, there is also the possibility that we are here on a race condition, so the accessible exists when the event is sent, but then is no longer available when we try to get it.

And although it would be good to look further on the reasons for this , could you test this patch? This just checks if the source is not NULL, and returns with a warning message doing anything with it if fails.
Comment 2 Francesco Fumanti 2014-03-14 14:47:21 UTC
Hi, 

Thanks for the patch. 

I applied it to at-spi2-core version 2.10.2.is.2.10.1-0ubuntu1 which is shipping with the current development version of Ubuntu Trusty and it fixed the crashes I had when using MediaElch. 

Thanks.
Comment 3 Mike Gorse 2014-03-17 13:43:56 UTC
Comment on attachment 271858 [details] [review]
Add a check NULL for the source of the event

Pushed to master as commit 87edad. Also pushed to gnome-3-10. Thanks for the patch.