Bug 236208

Summary: [GTK] D-Bus crash atk-bridge
Product: WebKit Reporter: kailueke
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, andresg_22, aperez, apinheiro, bugs-noreply, cfleizach, cgarcia, dmazzoni, ews-watchlist, jcraig, jdiggs, kailueke, mcatanzaro, samuel_white
Priority: P2    
Version: Other   
Hardware: Unspecified   
OS: Linux   
Attachments:
Description Flags
Patch aperez: review+, aperez: commit-queue-

Description kailueke 2022-02-06 14:16:51 PST
It can happen at any time but after it happend it is likely to happen directly again a few seconds after app startup that it crashes with the following error printed on the console:

```
(WebKitWebProcess:2): dbind-WARNING **: 22:39:12.184: AT-SPI: Error 
retrieving accessibility bus address: 
org.freedesktop.DBus.Error.ServiceUnknown: 
org.freedesktop.DBus.Error.ServiceUnknown
dbus[10454]: arguments to dbus_message_new_method_call() were incorrect, 
assertion "destination == NULL || _dbus_check_is_valid_bus_name 
(destination)" failed in file ../../../dbus/dbus-message.c line 1364.
This is normally a bug in some application using the D-Bus library.

  D-Bus not built with -rdynamic so unable to print a backtrace

(WebKitWebProcess:2): WPE-FDO-ERROR **: 22:39:16.262: Failed to bind 
wpe_bridge
```

Originally reported in
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=995420
and in https://gitlab.gnome.org/GNOME/epiphany/-/issues/1694
- maybe this even needs to go to the atk lib.

Here is the full backtrace: https://paste.debian.net/1229712
Comment 1 Carlos Garcia Campos 2022-02-15 02:40:04 PST
It seems that for some reason we can end up with an empty string as plug ID and ATK doesn't handle it right. We can validate the plug id returned by ATK and not call BindAccessibilityTree if it's not valid.
Comment 2 Carlos Garcia Campos 2022-02-15 02:45:29 PST
Created attachment 452008 [details]
Patch
Comment 3 Adrian Perez 2022-02-15 04:16:09 PST
Comment on attachment 452008 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=452008&action=review

> Source/WebCore/ChangeLog:8
> +        When a root is unregitered, check first if the registration is still pending to just complete and remove it.

Typo: s/unregitered/unregistered/
Comment 4 Carlos Garcia Campos 2022-02-15 06:07:59 PST
Committed r289804 (247269@trunk): <https://commits.webkit.org/247269@trunk>