Closed jgrillo-grapl closed 2 years ago
I was able to "fix" this in the sense that emacs no longer crashes by setting the following in my init.el
:
(setq lsp-ui-doc-use-childframe nil)
(setq lsp-ui-doc-use-webkit nil)
However the pop-up frame can't be scrolled now, lsp-ui-doc-focus-frame
appears to have no effect.
Also saw this stacktrace, which is different from the others I posted before:
jgrillo@penguin:~/src/grapl$ emacs
Overriding existing handler for signal 10. Set JSC_SIGNAL_FOR_GC if you want WebKit to use a different signal
** (emacs:7965): ERROR **: 11:26:13.773: Unable to configure xdg-desktop-portal access in the WebKit sandbox: GApplication is required.
Fatal error 5: Trace/breakpoint trap
Backtrace:
emacs(+0x147107)[0x56710b687107]
emacs(+0x46c4e)[0x56710b586c4e]
emacs(+0x470b7)[0x56710b5870b7]
emacs(+0x145a78)[0x56710b685a78]
emacs(+0x145b69)[0x56710b685b69]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x7c71d3384730]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x53d35)[0x7c71d9916d35]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_log_default_handler+0xad)[0x7c71d9917dcd]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_logv+0x21f)[0x7c71d991801f]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_log+0x8f)[0x7c71d991820f]
/usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(+0xb448fb)[0x7c71d66238fb]
/usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(+0xb459ea)[0x7c71d66249ea]
/usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(+0x9bf8ee)[0x7c71d649e8ee]
/usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(+0xa55680)[0x7c71d6534680]
/usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(+0xa5cd21)[0x7c71d653bd21]
/usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(+0xa5d16c)[0x7c71d653c16c]
/usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(+0xa2556e)[0x7c71d650456e]
/usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(+0xa25bd0)[0x7c71d6504bd0]
/usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(webkit_web_view_load_uri+0x1a6)[0x7c71d65c7fa6]
emacs(+0x2151c6)[0x56710b7551c6]
/home/jgrillo/.emacs.d/eln-cache/28.1-cd14eebd/lsp-ui-doc-308f758d-acaa7e3a.eln(F6c73702d75692d646f632d2d7765626b69742d72756e2d78776964676574_lsp_ui_doc__webkit_run_xwidget_0+0x155)[0x7c71b9f23805]
emacs(+0x1a866b)[0x56710b6e866b]
/home/jgrillo/.emacs.d/eln-cache/28.1-cd14eebd/lsp-ui-doc-308f758d-acaa7e3a.eln(F6c73702d75692d646f632d2d6d616b652d6672616d65_lsp_ui_doc__make_frame_0+0x415)[0x7c71b9f28445]
emacs(+0x1a866b)[0x56710b6e866b]
/home/jgrillo/.emacs.d/eln-cache/28.1-cd14eebd/lsp-ui-doc-308f758d-acaa7e3a.eln(F6c73702d75692d646f632d2d646973706c6179_lsp_ui_doc__display_0+0x224)[0x7c71b9f27ef4]
emacs(+0x1a866b)[0x56710b6e866b]
/home/jgrillo/.emacs.d/eln-cache/28.1-cd14eebd/lsp-ui-doc-308f758d-acaa7e3a.eln(F6c73702d75692d646f632d2d63616c6c6261636b_lsp_ui_doc__callback_0+0x274)[0x7c71b9f28c94]
emacs(+0x1a866b)[0x56710b6e866b]
emacs(+0x1e30f0)[0x56710b7230f0]
emacs(+0x1a8519)[0x56710b6e8519]
emacs(+0x1a89d2)[0x56710b6e89d2]
emacs(+0x1a866b)[0x56710b6e866b]
emacs(+0x1e30f0)[0x56710b7230f0]
emacs(+0x1a8519)[0x56710b6e8519]
emacs(+0x1e30f0)[0x56710b7230f0]
emacs(+0x1a8519)[0x56710b6e8519]
emacs(+0x1e30f0)[0x56710b7230f0]
emacs(+0x1a8519)[0x56710b6e8519]
/home/jgrillo/.emacs.d/eln-cache/28.1-cd14eebd/lsp-mode-9c9841c0-fb4b3a70.eln(F6c73702d2d7061727365722d6f6e2d6d657373616765_lsp__parser_on_message_0+0x780)[0x7c71c80fea70]
emacs(+0x1a866b)[0x56710b6e866b]
emacs(+0x1e30f0)[0x56710b7230f0]
...
Trace/breakpoint trap (core dumped)```
So it does work without --with-x-toolkit=gtk3 --with-xwidgets
?
So it does work without
--with-x-toolkit=gtk3 --with-xwidgets
?
No, it still crashes. I just built with ./configure --with-native-compilation
and set the following lsp-ui-doc
configurations:
(setq lsp-ui-doc-enable t)
(setq lsp-ui-doc-header nil)
(setq lsp-ui-doc-delay 0.05)
(setq lsp-ui-doc-show-with-cursor t)
(setq lsp-ui-doc-show-with-mouse t)
(setq lsp-ui-doc-position 'top)
(setq lsp-ui-doc-alignment 'frame)
(setq lsp-ui-doc-use-childframe t)
(setq lsp-ui-doc-use-webkit nil)
When I interacted with the doc child frame by attempting to scroll with the mouse scroll wheel I got this trace:
jgrillo@penguin:~/src/grapl$ emacs
Fatal error 6: Aborted
(emacs:3219): Gdk-WARNING **: 11:53:54.583: GdkWindow 0x40072a unexpectedly destroyed
(emacs:3219): Gdk-WARNING **: 11:53:54.583: GdkWindow 0x400726 unexpectedly destroyed
(emacs:3219): Gdk-WARNING **: 11:53:54.585: GdkWindow 0x40017e unexpectedly destroyed
(emacs:3219): Gdk-WARNING **: 11:53:54.585: GdkWindow 0x40017b unexpectedly destroyed
(emacs:3219): Gdk-WARNING **: 11:53:54.585: GdkWindow 0x400142 unexpectedly destroyed
(emacs:3219): Gdk-WARNING **: 11:53:54.585: GdkWindow 0x40013e unexpectedly destroyed
(emacs:3219): GLib-GObject-WARNING **: 11:53:54.585: invalid (NULL) pointer instance
(emacs:3219): GLib-GObject-CRITICAL **: 11:53:54.585: g_signal_handler_disconnect: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(emacs:3219): Gdk-CRITICAL **: 11:53:54.585: gdk_frame_clock_end_updating: assertion 'GDK_IS_FRAME_CLOCK (frame_clock)' failed
Backtrace:
emacs(+0x145f07)[0x5b4b3a36ff07]
emacs(+0x458bf)[0x5b4b3a26f8bf]
emacs(+0x45d47)[0x5b4b3a26fd47]
emacs(+0x436db)[0x5b4b3a26d6db]
emacs(+0x8f225)[0x5b4b3a2b9225]
emacs(+0x1f06e0)[0x5b4b3a41a6e0]
emacs(+0x1f7ef5)[0x5b4b3a421ef5]
emacs(+0x12c46a)[0x5b4b3a35646a]
emacs(+0x44f3a)[0x5b4b3a26ef3a]
emacs(+0x45005)[0x5b4b3a26f005]
/usr/lib/x86_64-linux-gnu/libX11.so.6(_XIOError+0x4e)[0x7989c3e4320e]
/usr/lib/x86_64-linux-gnu/libX11.so.6(+0x4439c)[0x7989c3e4139c]
/usr/lib/x86_64-linux-gnu/libX11.so.6(XSync+0x4d)[0x7989c3e3c9ed]
emacs(+0x1061ea)[0x5b4b3a3301ea]
emacs(+0x106ee0)[0x5b4b3a330ee0]
emacs(+0x107189)[0x5b4b3a331189]
emacs(+0x10849d)[0x5b4b3a33249d]
emacs(+0x10ac13)[0x5b4b3a334c13]
/usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x6a06f)[0x7989c46dd06f]
/usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x6a339)[0x7989c46dd339]
/usr/lib/x86_64-linux-gnu/libgdk-3.so.0(gdk_display_get_event+0x40)[0x7989c46a7940]
/usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x6a102)[0x7989c46dd102]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x2ae)[0x7989c41b5fee]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4e288)[0x7989c41b6288]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c)[0x7989c41b631c]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(gtk_main_iteration+0x15)[0x7989c49a9bc5]
emacs(+0xfdbc2)[0x5b4b3a327bc2]
emacs(+0x133da9)[0x5b4b3a35dda9]
emacs(+0x1342a5)[0x5b4b3a35e2a5]
emacs(+0x1a6f74)[0x5b4b3a3d0f74]
emacs(+0x8d44f)[0x5b4b3a2b744f]
emacs(+0x1376d7)[0x5b4b3a3616d7]
emacs(+0x13a0cc)[0x5b4b3a3640cc]
emacs(+0x13b94c)[0x5b4b3a36594c]
emacs(+0x1a64b2)[0x5b4b3a3d04b2]
emacs(+0x12ca22)[0x5b4b3a356a22]
emacs(+0x1a6431)[0x5b4b3a3d0431]
emacs(+0x12c9be)[0x5b4b3a3569be]
emacs(+0x13229b)[0x5b4b3a35c29b]
emacs(+0x1325e5)[0x5b4b3a35c5e5]
emacs(+0x4c5ee)[0x5b4b3a2765ee]
...
Aborted (core dumped)
When I attempted M-x lsp-ui-doc-focus-frame
I got this trace:
jgrillo@penguin:~/src/grapl$ emacs
Fatal error 6: Aborted
(emacs:6097): Gdk-WARNING **: 12:02:47.191: GdkWindow 0x40042e unexpectedly destroyed
(emacs:6097): Gdk-WARNING **: 12:02:47.191: GdkWindow 0x40042a unexpectedly destroyed
(emacs:6097): GLib-GObject-WARNING **: 12:02:47.191: invalid (NULL) pointer instance
(emacs:6097): GLib-GObject-CRITICAL **: 12:02:47.191: g_signal_handler_disconnect: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(emacs:6097): Gdk-CRITICAL **: 12:02:47.191: gdk_frame_clock_end_updating: assertion 'GDK_IS_FRAME_CLOCK (frame_clock)' failed
(emacs:6097): Gdk-WARNING **: 12:02:47.193: GdkWindow 0x40017f unexpectedly destroyed
(emacs:6097): Gdk-WARNING **: 12:02:47.193: GdkWindow 0x400182 unexpectedly destroyed
(emacs:6097): Gdk-WARNING **: 12:02:47.193: GdkWindow 0x400142 unexpectedly destroyed
(emacs:6097): Gdk-WARNING **: 12:02:47.193: GdkWindow 0x40013e unexpectedly destroyed
(emacs:6097): GLib-GObject-WARNING **: 12:02:47.194: invalid (NULL) pointer instance
(emacs:6097): GLib-GObject-CRITICAL **: 12:02:47.194: g_signal_handler_disconnect: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(emacs:6097): Gdk-CRITICAL **: 12:02:47.194: gdk_frame_clock_end_updating: assertion 'GDK_IS_FRAME_CLOCK (frame_clock)' failed
Backtrace:
emacs(+0x145f07)[0x55c17e0e7f07]
emacs(+0x458bf)[0x55c17dfe78bf]
emacs(+0x45d47)[0x55c17dfe7d47]
emacs(+0x436db)[0x55c17dfe56db]
emacs(+0x8f225)[0x55c17e031225]
emacs(+0x1f06e0)[0x55c17e1926e0]
emacs(+0x1f7ef5)[0x55c17e199ef5]
emacs(+0x12c46a)[0x55c17e0ce46a]
emacs(+0x44f3a)[0x55c17dfe6f3a]
emacs(+0x45005)[0x55c17dfe7005]
/usr/lib/x86_64-linux-gnu/libX11.so.6(_XIOError+0x4e)[0x7ed0c661720e]
/usr/lib/x86_64-linux-gnu/libX11.so.6(+0x4439c)[0x7ed0c661539c]
/usr/lib/x86_64-linux-gnu/libX11.so.6(XSync+0x4d)[0x7ed0c66109ed]
emacs(+0x1061ea)[0x55c17e0a81ea]
emacs(+0x106ee0)[0x55c17e0a8ee0]
emacs(+0x107189)[0x55c17e0a9189]
emacs(+0x10849d)[0x55c17e0aa49d]
emacs(+0x10ac13)[0x55c17e0acc13]
/usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x6a06f)[0x7ed0c6eb106f]
/usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x6a339)[0x7ed0c6eb1339]
/usr/lib/x86_64-linux-gnu/libgdk-3.so.0(gdk_display_get_event+0x40)[0x7ed0c6e7b940]
/usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x6a102)[0x7ed0c6eb1102]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x2ae)[0x7ed0c6989fee]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4e288)[0x7ed0c698a288]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c)[0x7ed0c698a31c]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(gtk_main_iteration+0x15)[0x7ed0c717dbc5]
emacs(+0xfdbc2)[0x55c17e09fbc2]
emacs(+0x133da9)[0x55c17e0d5da9]
emacs(+0x1342a5)[0x55c17e0d62a5]
emacs(+0x1a71ef)[0x55c17e1491ef]
/usr/local/libexec/emacs/28.1/x86_64-pc-linux-gnu/../../../../bin/../lib/emacs/28.1/native-lisp/28.1-6772280a/preloaded/minibuffer-1b0f548b-503c46c4.eln(F636f6d706c6574696f6e2d2d736f6d65_completion__some_0+0x1d5)[0x7ed0be9db6c5]
emacs(+0x1a745b)[0x55c17e14945b]
/usr/local/libexec/emacs/28.1/x86_64-pc-linux-gnu/../../../../bin/../lib/emacs/28.1/native-lisp/28.1-6772280a/preloaded/minibuffer-1b0f548b-503c46c4.eln(F636f6d706c6574696f6e2d2d6e74682d636f6d706c6574696f6e_completion__nth_completion_0+0x2f7)[0x7ed0be9dfaf7]
emacs(+0x1a745b)[0x55c17e14945b]
/usr/local/libexec/emacs/28.1/x86_64-pc-linux-gnu/../../../../bin/../lib/emacs/28.1/native-lisp/28.1-6772280a/preloaded/minibuffer-1b0f548b-503c46c4.eln(F636f6d706c6574696f6e2d7472792d636f6d706c6574696f6e_completion_try_completion_0+0x50)[0x7ed0be9dfe40]
emacs(+0x1a745b)[0x55c17e14945b]
/usr/local/libexec/emacs/28.1/x86_64-pc-linux-gnu/../../../../bin/../lib/emacs/28.1/native-lisp/28.1-6772280a/preloaded/simple-fab5b0cf-fcc5e219.eln(F657865637574652d657874656e6465642d636f6d6d616e642d2d73686f72746572_execute_extended_command__shorter_0+0xdd)[0x7ed0bedac45d]
emacs(+0x1a745b)[0x55c17e14945b]
emacs(+0x1e1ee0)[0x55c17e183ee0]
emacs(+0x1a7309)[0x55c17e149309]
emacs(+0x1a7789)[0x55c17e149789]
...
Aborted (core dumped)
I'm pretty sure this can't be fixed in lsp-ui. You could comment the code in lsp-ui-doc-focus-frame
step by step and see which function call results in this segfault. And then send a bug report to the emacs maintainers.
I agree, I isolated this further by compiling emacs without gtk and it appears to be somehow caused by child frames. I've worked around it by using eldoc instead, which has the added benefit that my emacs config works identically well in both a tty and a gui. Closing as this issue is not exactly an lsp-ui problem.
I've encountered an issue where any interaction with the
lsp-ui-doc
popup frame crashes emacs. If I run e.g.M-x lsp-ui-doc-focus-frame
with alsp-ui-doc
frame visible emacs crashes with the following output:I have also seen it manifest with this different looking stacktrace:
Similarly, when I try to scroll the popup frame with the mouse scroll wheel, I get a crash like this:
This is how I built emacs:
I'm running in a Debian 10 container in Chrome OS:
Please let me know if there's any way I can provide more useful information.