Subject: bug#56409: 29.0.50; Mouse clicks crash Emacs

From: Michael Heerdegen <[email-masked]>
Date: Tue, 05 Jul 2022 22:04:00 +0200

Michael Heerdegen <[email-masked]> writes:

> Often just clicking with mouse-1 to set the window
> cursor to a different position causes a crash, but also dragging with
> mouse-1 or trying to use a popup menu with mouse-3 or C-mouse-3.

Just clicked with mouse-3 into *scratch* of a freshly started emacs -Q
and it immediately crashed.  Got this output in the console:

| micha> emacs -Q
|
| (emacs:658557): dbind-WARNING **: 21:58:46.207: AT-SPI: Error retrieving
| accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown:
| The name org.a11y.Bus was not provided by any .service files
|
| (emacs:658557): Gdk-ERROR **: 21:58:47.865: 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 2330 error_code 8 request_code 2 (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/micha/bin/emacs(+0x194461)[0x55938bae3461]
| /home/micha/bin/emacs(+0x49dbb)[0x55938b998dbb]
| /home/micha/bin/emacs(+0x4a2ea)[0x55938b9992ea]
| /home/micha/bin/emacs(+0x192abd)[0x55938bae1abd]
| /home/micha/bin/emacs(+0x192ba9)[0x55938bae1ba9]
| /lib/x86_64-linux-gnu/libpthread.so.0(+0x14140)[0x7f462d7d0140]
| /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_log_writer_default+0x17b)[0x7f462ef92abb]
| /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_log_structured_array+0xd7)[0x7f462ef90c67]
| /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_log_structured_standard+0x1a2)[0x7f462ef91762]
| /usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x66bca)[0x7f462f58cbca]
| /usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x73f53)[0x7f462f599f53]
| /usr/lib/x86_64-linux-gnu/libX11.so.6(_XError+0x124)[0x7f462ee10864]
| /usr/lib/x86_64-linux-gnu/libX11.so.6(+0x43327)[0x7f462ee0d327]
| /usr/lib/x86_64-linux-gnu/libX11.so.6(+0x433c5)[0x7f462ee0d3c5]
| /usr/lib/x86_64-linux-gnu/libX11.so.6(_XReply+0x22d)[0x7f462ee0e62d]
| /usr/lib/x86_64-linux-gnu/libXi.so.6(XIQueryPointer+0xea)[0x7f462d6b46fa]
| /usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x5f798)[0x7f462f585798]
| /usr/lib/x86_64-linux-gnu/libgdk-3.so.0(gdk_device_get_window_at_position_double+0x98)[0x7f462f5590b8]
| /usr/lib/x86_64-linux-gnu/libgdk-3.so.0(gdk_device_get_window_at_position+0x2d)[0x7f462f5591dd]
| /home/micha/bin/emacs(+0x16787b)[0x55938bab687b]
| /home/micha/bin/emacs(+0x14604d)[0x55938ba9504d]
| /home/micha/bin/emacs(+0x147f18)[0x55938ba96f18]
| /usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x6e23f)[0x7f462f59423f]
| /usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x6e572)[0x7f462f594572]
| /usr/lib/x86_64-linux-gnu/libgdk-3.so.0(gdk_display_get_event+0x40)[0x7f462f55bc90]
| /usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x6e2d2)[0x7f462f5942d2]
| /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x25b)[0x7f462ef89e6b]
| /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x52118)[0x7f462ef8a118]
| /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2f)[0x7f462ef8a1cf]
| /usr/lib/x86_64-linux-gnu/libgtk-3.so.0(gtk_main_iteration+0x15)[0x7f462f876b15]
| /home/micha/bin/emacs(+0x133d53)[0x55938ba82d53]
| /home/micha/bin/emacs(+0x17b69a)[0x55938baca69a]
| /home/micha/bin/emacs(+0x17ba55)[0x55938bacaa55]
| /home/micha/bin/emacs(+0x17c928)[0x55938bacb928]
| /home/micha/bin/emacs(+0x17ce8d)[0x55938bacbe8d]
| /home/micha/bin/emacs(+0x17d028)[0x55938bacc028]
| /home/micha/bin/emacs(+0x181e28)[0x55938bad0e28]
| /home/micha/bin/emacs(+0x2518e2)[0x55938bba08e2]
| /home/micha/bin/emacs(+0x17d591)[0x55938bacc591]
| /home/micha/bin/emacs(+0x182f93)[0x55938bad1f93]
| /home/micha/bin/emacs(+0x1853fe)[0x55938bad43fe]
| ...
| Exception: emacs killed by signal trace/breakpoint trap
| [tty 1], line 1: emacs -Q

Michael.