1

Im trying to use emacs-27.2 with xwidgets support on a Ubuntu 20.04.4 LTS x86_64 machine.Im using a doom emacs config but every time i launch application that needs xwidgets support (i.e org-roam-ui ) i get the following error:

Overriding existing handler for signal 10. Set JSC_SIGNAL_FOR_GC if you want WebKit to use a different signal

(emacs:136969): Gdk-WARNING **: 13:42:44.125: ../../../../../gdk/x11/gdkwindow-x11.c:5633 drawable is not a native X11 window

(emacs:136969): Gdk-WARNING **: 13:42:44.125: ../../../../../gdk/x11/gdkwindow-x11.c:5633 drawable is not a native X11 window

(emacs:136969): Gdk-WARNING **: 13:42:44.125: ../../../../../gdk/x11/gdkwindow-x11.c:5633 drawable is not a native X11 window

** (emacs:136969): ERROR **: 13:42:44.138: Unable to configure xdg-desktop-portal access in the WebKit sandbox: GApplication is required.
Fatal error 5: Trace/breakpoint trap
Backtrace:
emacs(+0x149042)[0x55a74264f042]
emacs(+0x4a446)[0x55a742550446]
emacs(+0x4a90f)[0x55a74255090f]
emacs(+0x14761d)[0x55a74264d61d]
emacs(+0x14770f)[0x55a74264d70f]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7f37231c03c0]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x58295)[0x7f3729361295]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_log_default_handler+0xb9)[0x7f3729362319]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_logv+0x21c)[0x7f372936255c]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_log+0x93)[0x7f3729362743]
/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(+0xbaaf3a)[0x7f3725e7ef3a]
/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(+0xbad5bb)[0x7f3725e815bb]
/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(+0xa13a54)[0x7f3725ce7a54]
/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(+0xab2b40)[0x7f3725d86b40]
/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(+0xabb246)[0x7f3725d8f246]
/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(+0xabb69c)[0x7f3725d8f69c]
/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(+0xa7e51f)[0x7f3725d5251f]
/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(+0xa7eb90)[0x7f3725d52b90]
/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(webkit_web_view_load_uri+0x1b7)[0x7f3725e1dd27]
emacs(+0x2086cb)[0x55a74270e6cb]
emacs(+0x1a8103)[0x55a7426ae103]
emacs(+0x1de80c)[0x55a7426e480c]
emacs(+0x1a8067)[0x55a7426ae067]
emacs(+0x1de80c)[0x55a7426e480c]
emacs(+0x1a8067)[0x55a7426ae067]
emacs(+0x1de80c)[0x55a7426e480c]
emacs(+0x1a9e1b)[0x55a7426afe1b]
emacs(+0x1aa13e)[0x55a7426b013e]
emacs(+0x1aa66d)[0x55a7426b066d]
emacs(+0x1aa29d)[0x55a7426b029d]
emacs(+0x1abb43)[0x55a7426b1b43]
emacs(+0x1aa29d)[0x55a7426b029d]
emacs(+0x1ab86d)[0x55a7426b186d]
emacs(+0x1aa29d)[0x55a7426b029d]
emacs(+0x1ab86d)[0x55a7426b186d]
emacs(+0x1aa29d)[0x55a7426b029d]
emacs(+0x1aa945)[0x55a7426b0945]
emacs(+0x1a8067)[0x55a7426ae067]
emacs(+0x1a8573)[0x55a7426ae573]
emacs(+0x1a8103)[0x55a7426ae103]
emacs(+0x1de80c)[0x55a7426e480c]
...
[1]    136969 trace trap (core dumped)  emacs

Emacs segfaults even if I run in daemon mode. I've compiled emacs with the following command:

./configure --with-json --with-modules --with-cairo --with-harfbuzz --with-compress-instal --with-xwidgets \
            --with-threads --with-included-regex --with-x-toolkit=gtk --with-zlib --without-sound \
            --without-xpm --with-jpeg --without-tiff --without-gif --with-png \
            --without-rsvg --with-imagemagick --with-mailutils

I know that it's related to a GTK bug, every time I compile emacs with the --with-xwidgets flag i get the following warning message:

configure: WARNING: Your version of Gtk+ will have problems with
       closing open displays.  This is no problem if you just use
       one display, but if you use more than one and close one of them
       Emacs may crash.
       See https://gitlab.gnome.org/GNOME/gtk/issues/221

Every time I try to check what version of Gtk+ im running on this ubuntu machine i get no results, I use the following command

$ dpkg -l libgtk* | grep -e '^i' | grep -e 'libgtk-*[0-9]'
zsh: no matches found: libgtk*

I've seen some people running in to the same issue, they advised me to install the emacs dependencies with

sudo apt build-dep emacs

It install no packages and also did not solved my problem. Can anyone please help me? Im I missing something? Any advice is more than welcome

Drew
  • 75,699
  • 9
  • 109
  • 225
Occhima
  • 11
  • 1

1 Answers1

0

Solved it!

I don't know why but i did this export:

export WEBKIT_FORCE_SANDBOX=“0”

It all ran perfectly!

Occhima
  • 11
  • 1