Subject: bug#56869: 29.0.50; segfault, "assertion 'GDK_IS_DEVICE (device)' failed"

From: Joe Corneli <[email-masked]>
Date: Sun, 21 Aug 2022 10:57:56 +0100

Po Lu writes:

> Joe Corneli <[email-masked]> writes:
>
>> Thank you!
>
> Thanks.  That's pretty odd, I guess gdk_device_get_seat is what's
> failing here, followed by the reference to source_device->last_tool
> causing a segfault.
>
> When you next encounter this crash, please show the value of
> "xev->sourceid" (p xev->sourceid in gdb) and the shell command "xinput
> list-devices" immediately after it happens.

OK, here’s the info:

(gdb) p xev->sourceid
$1 = 12

$ xinput list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ MSFT0001:01 06CB:CD64 Mouse             	id=11	[slave  pointer  (2)]
⎜   ↳ MSFT0001:01 06CB:CD64 Touchpad          	id=12	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Video Bus                               	id=7	[slave  keyboard (3)]
    ↳ Power Button                            	id=8	[slave  keyboard (3)]
    ↳ Sleep Button                            	id=9	[slave  keyboard (3)]
    ↳ Intel HID events                        	id=13	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=14	[slave  keyboard (3)]
    ↳ Chicony USB2.0 Camera: Chicony          	id=10	[slave  keyboard (3)]

... and another possible clue, which is that I’m running Touchpad
Indicator, https://github.com/atareao/Touchpad-Indicator

and I have it set up to disable the trackpad _while typing_.  Perhaps
the way it enables and disables the trackpad is currently interacting
with Emacs in a glitchy way.

...
==== start set_touch_enabled =====
set_touch_enabled: True
are_all_touchpad_enabled:  False
==|==
==|== 1
==== start set_touch_enabled =====
set_touch_enabled: False
are_all_touchpad_enabled:  True
...

-- 
Dr Joseph A. Corneli (https://github.com/holtzermann17)

HYPERREAL ENTERPRISES LTD is a private company limited by shares, incorporated
25th, June 2019 as Company Number 634284 on the Register of Companies for
Scotland (https://beta.companieshouse.gov.uk/company/SC634284).