GNOME Bugzilla – Bug 734805
Using AtspiCollection to match via interfaces seems broken and causes crashes
Last modified: 2021-07-05 10:45:36 UTC
Created attachment 283398 [details]
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. :)
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.
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.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
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.