GNOME Bugzilla – Bug 778807
x11/clutter-device-manager-xi2: Added checking for device and source_device are NULL
Last modified: 2021-06-10 11:31:12 UTC
Created attachment 346039 [details] [review] Patch Hello, Added checking for device and source_device becomes NULL under the case XI_Enter|XI_Leave. We have encountered instances in which the source_device becomes NULL and as a consequence the call to _clutter_input_device_reset_scroll_info() causes a crash. So I have added checking for 'device' and 'source_device' becomes NULL. Please verify the fix and let me know if I can combine the two 'if(source_device)' conditions into one. Thanks & Regards, Jos Collin
https://bugzilla.redhat.com/show_bug.cgi?id=1554115 looks like a case of this, no?
also, ajax has just informed me that mutter now uses its own private copy of clutter, so we may need to fix this in mutter's copy too/instead. I have just checked, and mutter's copy still has this bug, it hasn't been fixed there.
Jos, any chance you could turn this into a https://gitlab.gnome.org/GNOME/mutter merge request? Also, the two if (source_device) blocks looks like they can be combined.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/82 The gitlab.gnome.org web-interface disappeared immediately after clicking "Create Merge Request" button and it never shows back again. It Shows *Access Denied* from another machine. Please check the above Merge Request by yourself. If it is not created then email the following diff to the maintainer of gitlab.gnome.org/GNOME/mutter/ repository. diff --git a/clutter/clutter/x11/clutter-device-manager-xi2.c b/clutter/clutter/x11/clutter-device-manager-xi2.c index 62f558380..c0657bd80 100644 --- a/clutter/clutter/x11/clutter-device-manager-xi2.c +++ b/clutter/clutter/x11/clutter-device-manager-xi2.c @@ -1803,10 +1803,14 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator, _clutter_input_device_set_stage (device, NULL); } - _clutter_input_device_reset_scroll_info (source_device); + if(source_device) + _clutter_input_device_reset_scroll_info (source_device); - clutter_event_set_device (event, device); - clutter_event_set_source_device (event, source_device); + if (device) + clutter_event_set_device (event, device); + + if (source_device) + clutter_event_set_source_device (event, source_device); retval = CLUTTER_TRANSLATE_QUEUE; }
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of clutter, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a ticket at https://gitlab.gnome.org/GNOME/clutter/-/issues/ Thank you for your understanding and your help.