Re: New tests: GTK3 platform accessibility

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2023-08-28 19:54, Stephan Bergmann wrote:
Otherwise: Does the test work when run in an X11 session instead?

no; guess I need to install some piece of software that is missing from my machine

I can reproduce in a GNOME session in a Fedora 38 VM.

It seems to be related to GNOME and dbus-broker being used by default on Fedora, together with the gtk3 a11y test suite using xvfb and dbus-launch.

It works just fine for me with the same VM in an SSH or OpenBox session instead of the GNOME one.

The error can also be triggered with a simple sample program instead (based on what the gtk3 a11y test does):


// to build:
// g++ -g $(pkg-config --cflags atspi-2) -o atspi-sample-app atspi-sample-app.cxx $(pkg-config --libs atspi-2)

#include <cassert>
#include <iostream>

#include <atspi/atspi.h>

int main()
{
    const int nDesktops = atspi_get_desktop_count();
    for (int desktopId = 0; desktopId < nDesktops; desktopId++)
    {
        AtspiAccessible* pAcc = atspi_get_desktop(desktopId);
        GError* pError = nullptr;
        gint nChildCount = atspi_accessible_get_child_count(pAcc, &pError);
std::cout << "pAcc: " << pAcc << ", childCount: " << nChildCount << ", error: " << pError
                  << std::endl;
        assert(nChildCount >= 0);
    }
};


When running that app as follows, it fails the same way in the Fedora 38 GNOME session:

$ xvfb-run dbus-launch --exit-with-session ./atspi-sample-app

(process:4584): dbind-WARNING **: 12:01:39.097: Couldn't get application list: Could not activate remote peer: unit failed.

(process:4584): GLib-GObject-CRITICAL **: 12:01:39.097: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(process:4584): dbind-WARNING **: 12:01:39.099: AT-SPI: Error in GetItems, sender=org.freedesktop.DBus, error=Could not activate remote peer: unit failed.
pAcc: 0xd0d500, childCount: -1, error: 0
atspi-sample-app: atspi-sample-app.cxx:19: int main(): Assertion `nChildCount >= 0' failed.
/usr/bin/xvfb-run: line 181: 4584 Aborted


Running the same with dbus-run-session (hopefully doesn't affect the relevant behavior and) gives additional output:

$ xvfb-run dbus-run-session ./atspi-sample-app
dbus-daemon[4713]: [session uid=1000 pid=4713] Activating service name='org.a11y.Bus' requested by ':1.0' (uid=1000 pid=4714 comm="./atspi-sample-app" label="kernel")
dbus-daemon[4713]: [session uid=1000 pid=4713] Successfully activated service 'org.a11y.Bus'
Policy to allow eavesdropping in /usr/share/defaults/at-spi2/accessibility.conf +15: Eavesdropping is deprecated and ignored
Policy to allow eavesdropping in /usr/share/defaults/at-spi2/accessibility.conf +17: Eavesdropping is deprecated and ignored
dbus-daemon[4713]: [session uid=1000 pid=4713] Activating service name='org.freedesktop.systemd1' requested by ':1.2' (uid=1000 pid=4722 comm="/usr/bin/dbus-broker-launch --config-file=/usr/sha" label="kernel")
dbus-daemon[4713]: [session uid=1000 pid=4713] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
dbus-daemon[4713]: [session uid=1000 pid=4713] Activating service name='org.freedesktop.systemd1' requested by ':1.2' (uid=1000 pid=4722 comm="/usr/bin/dbus-broker-launch --config-file=/usr/sha" label="kernel")
dbus-daemon[4713]: [session uid=1000 pid=4713] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1

(process:4714): dbind-WARNING **: 12:03:53.467: Couldn't get application list: Could not activate remote peer: unit failed.

(process:4714): GLib-GObject-CRITICAL **: 12:03:53.467: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
dbus-daemon[4713]: [session uid=1000 pid=4713] Activating service name='org.freedesktop.systemd1' requested by ':1.2' (uid=1000 pid=4722 comm="/usr/bin/dbus-broker-launch --config-file=/usr/sha" label="kernel")
dbus-daemon[4713]: [session uid=1000 pid=4713] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1

(process:4714): dbind-WARNING **: 12:03:53.469: AT-SPI: Error in GetItems, sender=org.freedesktop.DBus, error=Could not activate remote peer: unit failed.
pAcc: 0x15fa500, childCount: -1, error: 0
atspi-sample-app: atspi-sample-app.cxx:19: int main(): Assertion `nChildCount >= 0' failed.

This shows that there is an attempt to start a dbus session using dbus-broker-launch. This seems surprising at first, since dbus-run-session (and dbus-launch) use dbus-daemon in $PATH by default.

But then, there's an at-spi-bus-launcher involved for running a separate bus for AT-SPI/a11y, and the README [1] mentions that that is a separate instance of dbus-daemon or dbus-broker. From a first look into the source code [2], it looks like it prefers dbus-broker-launch when built with the corresponding option and running under systemd, but that apparently fails at that stage.


I currently can't come with any idea how to fix/avoid that on our end, suggestions welcome.


Related discussion: [3]


[1] https://gitlab.gnome.org/GNOME/at-spi2-core/-/blob/main/bus/README.md
[2] https://gitlab.gnome.org/GNOME/at-spi2-core/-/blob/main/bus/at-spi-bus-launcher.c
[3] https://github.com/bus1/dbus-broker/issues/145

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux