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 734805 - Using AtspiCollection to match via interfaces seems broken and causes crashes
Using AtspiCollection to match via interfaces seems broken and causes crashes
Product: at-spi
Classification: Platform
Component: at-spi2-core
Other Linux
: Normal normal
: ---
Assigned To: At-spi maintainer(s)
At-spi maintainer(s)
Depends on:
Reported: 2014-08-14 15:30 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2021-07-05 10:45 UTC
See Also:
GNOME target: ---
GNOME version: 3.13/3.14

test case (4.21 KB, text/x-python)
2014-08-14 15:30 UTC, Joanmarie Diggs (IRC: joanie)

Description Joanmarie Diggs (IRC: joanie) 2014-08-14 15:30:17 UTC
Created attachment 283398 [details]
test case

Steps to reproduce:
1. Launch the attached listener in a terminal
2. Alt+Tab to move focus into another window

Expected results: The listener would not crash.

Actual results: The listener reliably crashes with this error:
arguments to dbus_message_iter_append_basic() were incorrect, assertion "_dbus_check_is_valid_utf8 (*string_p)" failed in file dbus-message.c line 2598.

You can eliminate the crashes by commenting out calls to the tests which try to match on a non-empty string interface.

From the documentation, it doesn't seem clear what the expected argument should be. If it's an empty string (which is used in the first two tests run), there is no crash. If it's a string or a list of strings, there is a crash. Even if the argument is completely bogus, it shouldn't crash the caller.

Independent of the above, i.e. even if it doesn't crash the caller, I suspect there's at least one bug in ATSPI2 because the functional expected value is an array but the actual expected value appears to be a string. If nothing else, more documentation would be appreciated. :)
Comment 1 Mike Gorse 2014-08-16 16:15:30 UTC
The crash should be fixed (commit bb89b1), but I'm hesitant to mark the bug closed because it is untested and there may well be other bugs. And createMatchRule should want an array, since it's possible to specify multiple interfaces, although maybe pygobject automatically converts a single string into an array.
Comment 2 Mike Gorse 2014-08-16 23:46:03 UTC
So the crash is fixed, but a couple more things:

- You need to pass in an array of strings for interfaces. If you pass in a string, then pygobject oddly marshals it character by character to create an array of strings.

- On the at-spi2-atk side, the interfaces are tested by child_interface_p (in atk-adaptor/adaptors/collection-adaptor.c). It expects interface names in a short form ("action", "component", etc), while you're passing in D-Bus interface names. Do you think it makes more sense to use the D-Bus names, or to use the names we're currently expecting? I don't have a strong opinion one way or the other.
Comment 3 GNOME Infrastructure Team 2021-07-05 10:45:36 UTC
GNOME is going to shut down in favor of
As part of that, we are mass-closing older open tickets in
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
and create a new ticket at

Thank you for your understanding and your help.