Subject: bug#66068: 30.0.50; xwidget-webkit-browse-url makes Emacs abort

From: Stephen Berman <[email-masked]>
Date: Sat, 09 Dec 2023 16:12:03 +0100

On Thu, 07 Dec 2023 11:28:00 +0100 Ramon Diaz-Uriarte <[email-masked]> wrote:

> For what is worth, xwidget-webkit-browse-url does not make Emacs 30 (30.0.50)
> or 29 (29.1.90) abort on my system (Debian) (I just built both a few minutes
> ago after freshly checking the git repos).
>
> The webkitgtk packages I have are:
>
> libwebkit2gtk-4.0-37:amd64                                  2.42.2-1
> libwebkit2gtk-4.0-dev:amd64                                 2.42.2-1
> libwebkit2gtk-4.0-doc                                       2.42.2-1
> libwebkit2gtk-4.1-0:amd64                                   2.42.2-1

This prompted me to update my webkitgtk to 2.42.3, the latest stable
release, then I rebuilt Emacs from the latest commit on master.  But
invoking xwidget-webkit-browse-url stills makes Emacs crash for me.

> In case it could matter, I am using XMonad as window manager. When
> `M-x xwidget-webkit-browse-url` and I enter the URL at the prompt and press
> enter, on the terminal from which I did `emacs -Q` I see
>
> -------------------
> Overriding existing handler for signal 10. Set JSC_SIGNAL_FOR_GC if you want
> WebKit to use a different signal
> libEGL warning: failed to get driver name for fd -1
>
> libEGL warning: MESA-LOADER: failed to retrieve device information
>
> libEGL warning: failed to get driver name for fd -1
> -------------------
>
> But everything seems to work normally.

I get the signal 10 message, but I think that's been emitted for some
time when invoking xwidget-webkit-browse-url and isn't related to the
crash.  I don't get the libEGL warnings, but I do get the following,
which I think I haven't seen previously and seems like it could be
related to the crash (which is perhaps then different from what I
reported in my OP of this bug):

(emacs-master:10722): GLib-CRITICAL **: 15:46:25.356: Source ID 658 was not found when attempting to remove it
X protocol error: GLXBadWindow on protocol request 151
Serial no: 6143
Failing resource ID (if any): 0x2e001fe
Minor code: 32
This is a bug!  Please report this to [email-masked]!

Steve Berman