Subject: Re: bug#51473: [PATCH] Enable xwidget scrolling optimizations, and other xwidgets improvements

From: Po Lu <[email-masked]>
Date: Sat, 06 Nov 2021 13:39:34 +0800

Lars Ingebrigtsen <[email-masked]> writes:

> Hm...  I'd rather not, if possible.  But if that's the only non-invasive
> fix possible...

Another solution is to set the environment variables `SNAP', `SNAP_NAME'
and `SNAP_REVISION', so WebKitGTK thinks it is running in snap and
doesn't go down the faulty Bubblewrap code path.

It works, but it could potentially affect other programs running inside
Emacs as well, and that variable can't be temporarily set because it's
impossible to determine when WebKitGTK will actually launch a
subprocess.

So I think it should be documented in etc/PROBLEMS instead.  Something
along the lines of:

** Emacs crashes with SIGTRAP when trying to start an WebKit xwidget.

The version of WebKitGTK installed on your system is buggy, and errors
out trying to start a subprocess through bubblewrap.  You can prevent
the buggy code from being executed by setting the environment variables
`SNAP', `SNAP_NAME' and `SNAP_REVISION', which tricks WebKit into
thinking Emacs is running in snap and makes it use GLib to launch
subprocesses instead.

WDYT?