After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 778807 - x11/clutter-device-manager-xi2: Added checking for device and source_device are NULL
x11/clutter-device-manager-xi2: Added checking for device and source_device ...
Status: RESOLVED OBSOLETE
Product: clutter
Classification: Platform
Component: x11
git master
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2017-02-17 05:22 UTC by Jos Collin
Modified: 2021-06-10 11:31 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Patch (1.68 KB, patch)
2017-02-17 05:22 UTC, Jos Collin
none Details | Review

Description Jos Collin 2017-02-17 05:22:30 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
Comment 1 Adam Williamson 2018-04-12 23:53:27 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1554115 looks like a case of this, no?
Comment 2 Adam Williamson 2018-04-13 00:11:12 UTC
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.
Comment 3 Jonas Ådahl 2018-04-16 13:09:38 UTC
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.
Comment 4 Jos Collin 2018-04-17 03:53:48 UTC
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;
       }
Comment 5 André Klapper 2021-06-10 11:31:12 UTC
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.