ch11ng/exwm

'BadWindow (invalid Window parameter)' on GNU Guix

tylerwolf35 opened this issue · 3 comments

(emacs:8993): Gdk-ERROR **: 14:27:45.046: The program 'emacs' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 1506 error_code 3 request_code 18 (core protocol) minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Fatal error 5: Trace/breakpoint trap
Backtrace:
/home/tyler/.guix-profile/bin/emacs[0x529b7e]
/home/tyler/.guix-profile/bin/emacs[0x4257ca]
/home/tyler/.guix-profile/bin/emacs[0x425c62]
/home/tyler/.guix-profile/bin/emacs[0x528208]
/home/tyler/.guix-profile/bin/emacs[0x5282e9]
/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libpthread.so.0(+0x11d80)[0x7ff51a6b2d80]
/gnu/store/hc6c0f0sil7f3i52k9ys3qdfx6clqm9x-glib-2.70.2/lib/libglib-2.0.so.0(g_log_writer_default+0x1a7)[0x7ff51bab7e57]
/gnu/store/hc6c0f0sil7f3i52k9ys3qdfx6clqm9x-glib-2.70.2/lib/libglib-2.0.so.0(g_log_structured_array+0xd7)[0x7ff51bab60e7]
/gnu/store/hc6c0f0sil7f3i52k9ys3qdfx6clqm9x-glib-2.70.2/lib/libglib-2.0.so.0(g_log_structured_standard+0x181)[0x7ff51bab6b11]
/gnu/store/8h2gjaf32lq41mfv45g7s25mm7jv1fkc-gtk+-3.24.30/lib/libgdk-3.so.0(+0x685aa)[0x7ff51c92b5aa]
/gnu/store/8h2gjaf32lq41mfv45g7s25mm7jv1fkc-gtk+-3.24.30/lib/libgdk-3.so.0(+0x751d3)[0x7ff51c9381d3]
/gnu/store/fa43ijbrb96x08621qigxxiphp503lsi-libx11-1.7.3.1/lib/libX11.so.6(_XError+0x114)[0x7ff51b937f94]
/gnu/store/fa43ijbrb96x08621qigxxiphp503lsi-libx11-1.7.3.1/lib/libX11.so.6(+0x43de7)[0x7ff51b934de7]
/gnu/store/fa43ijbrb96x08621qigxxiphp503lsi-libx11-1.7.3.1/lib/libX11.so.6(+0x43e75)[0x7ff51b934e75]
/gnu/store/fa43ijbrb96x08621qigxxiphp503lsi-libx11-1.7.3.1/lib/libX11.so.6(_XReply+0x1dd)[0x7ff51b935e1d]
/gnu/store/fa43ijbrb96x08621qigxxiphp503lsi-libx11-1.7.3.1/lib/libX11.so.6(XGetWindowProperty+0xd0)[0x7ff51b91c5b0]
/gnu/store/8h2gjaf32lq41mfv45g7s25mm7jv1fkc-gtk+-3.24.30/lib/libgdk-3.so.0(+0x6a127)[0x7ff51c92d127]
/gnu/store/8h2gjaf32lq41mfv45g7s25mm7jv1fkc-gtk+-3.24.30/lib/libgdk-3.so.0(+0x70151)[0x7ff51c933151]
/gnu/store/8h2gjaf32lq41mfv45g7s25mm7jv1fkc-gtk+-3.24.30/lib/libgdk-3.so.0(+0x6fc23)[0x7ff51c932c23]
/gnu/store/8h2gjaf32lq41mfv45g7s25mm7jv1fkc-gtk+-3.24.30/lib/libgdk-3.so.0(gdk_display_get_event+0x40)[0x7ff51c8fb9b0]
/gnu/store/8h2gjaf32lq41mfv45g7s25mm7jv1fkc-gtk+-3.24.30/lib/libgdk-3.so.0(+0x6f8b2)[0x7ff51c9328b2]
/gnu/store/hc6c0f0sil7f3i52k9ys3qdfx6clqm9x-glib-2.70.2/lib/libglib-2.0.so.0(g_main_context_dispatch+0x23b)[0x7ff51baaf4cb]
/gnu/store/hc6c0f0sil7f3i52k9ys3qdfx6clqm9x-glib-2.70.2/lib/libglib-2.0.so.0(+0x55748)[0x7ff51baaf748]
/gnu/store/hc6c0f0sil7f3i52k9ys3qdfx6clqm9x-glib-2.70.2/lib/libglib-2.0.so.0(g_main_context_iteration+0x2f)[0x7ff51baaf7ef]
/gnu/store/8h2gjaf32lq41mfv45g7s25mm7jv1fkc-gtk+-3.24.30/lib/libgtk-3.so.0(gtk_main_iteration+0x15)[0x7ff51c24a665]
/home/tyler/.guix-profile/bin/emacs[0x4e1063]
/home/tyler/.guix-profile/bin/emacs[0x517902]
/home/tyler/.guix-profile/bin/emacs[0x5185b5]
/home/tyler/.guix-profile/bin/emacs[0x4ee3d9]
/home/tyler/.guix-profile/bin/emacs[0x43a1cd]
/gnu/store/7hk7xng1w4ai0v1ryxfccm3nqwv0cnzj-emacs-28.2/bin/../lib/emacs/28.2/native-lisp/28.2-16da12a1/preloaded/window-0d1b8b93-7ef4271a.eln(F77696e646f772d2d6d617962652d72616973652d6672616d65_window__maybe_raise_frame_0+0x1b)[0x7ff517b651bb]
/home/tyler/.guix-profile/bin/emacs[0x58ba0b]
/gnu/store/7hk7xng1w4ai0v1ryxfccm3nqwv0cnzj-emacs-28.2/bin/../lib/emacs/28.2/native-lisp/28.2-16da12a1/preloaded/window-0d1b8b93-7ef4271a.eln(F646973706c61792d6275666665722d706f702d75702d77696e646f77_display_buffer_pop_up_window_0+0x1ff)[0x7ff517b6715f]
/home/tyler/.guix-profile/bin/emacs[0x58ba0b]
/gnu/store/7hk7xng1w4ai0v1ryxfccm3nqwv0cnzj-emacs-28.2/bin/../lib/emacs/28.2/native-lisp/28.2-16da12a1/preloaded/window-0d1b8b93-7ef4271a.eln(F646973706c61792d6275666665722d2d6d617962652d706f702d75702d77696e646f77_display_buffer__maybe_pop_up_window_0+0x5a)[0x7ff517b673ea]
/home/tyler/.guix-profile/bin/emacs[0x58ba0b]
/gnu/store/7hk7xng1w4ai0v1ryxfccm3nqwv0cnzj-emacs-28.2/bin/../lib/emacs/28.2/native-lisp/28.2-16da12a1/preloaded/window-0d1b8b93-7ef4271a.eln(F646973706c61792d6275666665722d2d6d617962652d706f702d75702d6672616d652d6f722d77696e646f77_display_buffer__maybe_pop_up_frame_or_window_0+0x88)[0x7ff517b672c8]
/home/tyler/.guix-profile/bin/emacs[0x58ba0b]
/gnu/store/7hk7xng1w4ai0v1ryxfccm3nqwv0cnzj-emacs-28.2/bin/../lib/emacs/28.2/native-lisp/28.2-16da12a1/preloaded/window-0d1b8b93-7ef4271a.eln(F646973706c61792d627566666572_display_buffer_0+0x34f)[0x7ff517b65a0f]
/home/tyler/.guix-profile/bin/emacs[0x58ba0b]
/gnu/store/7hk7xng1w4ai0v1ryxfccm3nqwv0cnzj-emacs-28.2/lib/emacs/28.2/native-lisp/28.2-16da12a1/warnings-28e75f4d-870b026e.eln(F646973706c61792d7761726e696e67_display_warning_0+0x896)[0x7ff506c983f6]
...
Trace/breakpoint trap

I ran the command xhost +SI:localuser:$USER before starting X as stated in #534, as before that I was getting the same error as in that issue.

Hello @tylerwolf35, thank you for taking the time of reporting this issue.

I'm not sure it is due to EXWM, or Emacs proper. The backtrace seems to indicate that Emacs is trying to show a warning and... BOOM. There's not much information.

I suggest you use EXWM's replace feature: start Emacs in your usual environment and run exwm-init. It will prompt you to replace your current window manager.

Please reopen if you find issues with the above suggestion.

I noticed the same error today even on the pure GTK:

gtk_css_provider_load_from_data: assertion 'GTK_IS_CSS_PROVIDER (css_provider)' failed
gtk_css_provider_load_from_data: assertion 'GTK_IS_CSS_PROVIDER (css_provider)' failed
gtk_css_provider_load_from_data: assertion 'GTK_IS_CSS_PROVIDER (css_provider)' failed
The program 'emacs' received an X Window System error.
                                       This probably reflects a bug in the program.
                                       The error was 'BadMatch (invalid parameter attributes)'.
                                         (Details: serial 4682244 error_code 8 request_code 18 (core protocol) m>                                         (Note to programmers: normally, X errors are reported asynchronously;
                                          that is, you will receive the error a while after causing it.
                                          To debug your program, run it with the GDK_SYNCHRONIZE environment
                                          variable to change this behavior. You can then get a meaningful
                                          backtrace from your debugger if you break on the gdk_x_error() function