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 675371 - Asserts when getting touch events
Asserts when getting touch events
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2012-05-03 13:56 UTC by Bastien Nocera
Modified: 2012-05-03 17:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
event: Fix copying touch events (938 bytes, patch)
2012-05-03 17:01 UTC, Bastien Nocera
committed Details | Review
x11/device-manager-xi2: Fix assertions with touch (1.94 KB, patch)
2012-05-03 17:01 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2012-05-03 13:56:35 UTC
totem-3.4.0-1.fc17.x86_64
cogl-1.10.2-1.fc17.x86_64
clutter-1.10.2-1.fc17.x86_64
clutter-gtk-1.2.0-1.fc17.x86_64

When moving my touchpad's cursor on top of the Totem video widget, or clicking on it, I get an assertion:
(totem:16947): Clutter-CRITICAL **: clutter_input_device_get_n_axes: assertion `CLUTTER_IS_INPUT_DEVICE (device)' failed

(totem:16947): Clutter-CRITICAL **: clutter_input_device_get_axis: assertion `CLUTTER_IS_INPUT_DEVICE (device)' failed

Zeeshan saw a similar crash in gnome-boxes:
https://bugzilla.redhat.com/show_bug.cgi?id=809645

The end of the valgrind run for git master of clutter, totem, clutter-gtk and cogl on the cogl-1.10 branch.

==16769== Conditional jump or move depends on uninitialised value(s)
==16769==    at 0x7E989E0: _gdk_windowing_got_event (gdkwindow.c:9656)
==16769==    by 0x7EAB611: _gdk_x11_display_queue_events (gdkeventsource.c:339)
==16769==    by 0x7E825D0: gdk_display_get_event (gdkdisplay.c:310)
==16769==    by 0x7EAB301: gdk_event_source_dispatch (gdkeventsource.c:354)
==16769==    by 0x915E2C4: g_main_context_dispatch (gmain.c:2539)
==16769==    by 0x915E5F7: g_main_context_iterate.isra.23 (gmain.c:3146)
==16769==    by 0x915E6B3: g_main_context_iteration (gmain.c:3207)
==16769==    by 0x89DB42B: g_application_run (gapplication.c:1496)
==16769==    by 0x402515: main (totem.c:264)
==16769==  Uninitialised value was created by a stack allocation
==16769==    at 0x7E975E0: _gdk_windowing_got_event (gdkwindow.c:9890)
==16769== 
==16769== Conditional jump or move depends on uninitialised value(s)
==16769==    at 0x7E98E14: _gdk_windowing_got_event (gdkwindow.c:9423)
==16769==    by 0x7EAB611: _gdk_x11_display_queue_events (gdkeventsource.c:339)
==16769==    by 0x7E825D0: gdk_display_get_event (gdkdisplay.c:310)
==16769==    by 0x7EAB301: gdk_event_source_dispatch (gdkeventsource.c:354)
==16769==    by 0x915E2C4: g_main_context_dispatch (gmain.c:2539)
==16769==    by 0x915E5F7: g_main_context_iterate.isra.23 (gmain.c:3146)
==16769==    by 0x915E6B3: g_main_context_iteration (gmain.c:3207)
==16769==    by 0x89DB42B: g_application_run (gapplication.c:1496)
==16769==    by 0x402515: main (totem.c:264)
==16769==  Uninitialised value was created by a stack allocation
==16769==    at 0x7E975E0: _gdk_windowing_got_event (gdkwindow.c:9890)
==16769== 

(lt-totem:16769): Clutter-CRITICAL **: clutter_input_device_get_n_axes: assertion `CLUTTER_IS_INPUT_DEVICE (device)' failed

(lt-totem:16769): Clutter-CRITICAL **: clutter_input_device_get_axis: assertion `CLUTTER_IS_INPUT_DEVICE (device)' failed
==16769== Invalid read of size 8
==16769==    at 0x6E2A140: _clutter_input_device_translate_axis (clutter-input-device.c:1031)
==16769==    by 0x6DE6B9B: translate_axes.isra.2 (clutter-device-manager-xi2.c:624)
==16769==    by 0x6DE6E5E: clutter_device_manager_xi2_translate_event (clutter-device-manager-xi2.c:1048)
==16769==    by 0x6E0B7EB: clutter_backend_real_translate_event (clutter-backend.c:569)
==16769==    by 0x6DE1451: clutter_x11_handle_event (clutter-event-x11.c:198)
==16769==    by 0x6BA70AF: gtk_clutter_filter_func (gtk-clutter-embed.c:200)
==16769==    by 0x7EAB3F0: gdk_event_apply_filters (gdkeventsource.c:81)
==16769==    by 0x7EAB5AE: _gdk_x11_display_queue_events (gdkeventsource.c:195)
==16769==    by 0x7E825D0: gdk_display_get_event (gdkdisplay.c:310)
==16769==    by 0x7EAB301: gdk_event_source_dispatch (gdkeventsource.c:354)
==16769==    by 0x915E2C4: g_main_context_dispatch (gmain.c:2539)
==16769==    by 0x915E5F7: g_main_context_iterate.isra.23 (gmain.c:3146)
==16769==  Address 0xa0 is not stack'd, malloc'd or (recently) free'd
==16769== 
==16769== 
==16769== Process terminating with default action of signal 11 (SIGSEGV)
==16769==  Access not within mapped region at address 0xA0
==16769==    at 0x6E2A140: _clutter_input_device_translate_axis (clutter-input-device.c:1031)
==16769==    by 0x6DE6B9B: translate_axes.isra.2 (clutter-device-manager-xi2.c:624)
==16769==    by 0x6DE6E5E: clutter_device_manager_xi2_translate_event (clutter-device-manager-xi2.c:1048)
==16769==    by 0x6E0B7EB: clutter_backend_real_translate_event (clutter-backend.c:569)
==16769==    by 0x6DE1451: clutter_x11_handle_event (clutter-event-x11.c:198)
==16769==    by 0x6BA70AF: gtk_clutter_filter_func (gtk-clutter-embed.c:200)
==16769==    by 0x7EAB3F0: gdk_event_apply_filters (gdkeventsource.c:81)
==16769==    by 0x7EAB5AE: _gdk_x11_display_queue_events (gdkeventsource.c:195)
==16769==    by 0x7E825D0: gdk_display_get_event (gdkdisplay.c:310)
==16769==    by 0x7EAB301: gdk_event_source_dispatch (gdkeventsource.c:354)
==16769==    by 0x915E2C4: g_main_context_dispatch (gmain.c:2539)
==16769==    by 0x915E5F7: g_main_context_iterate.isra.23 (gmain.c:3146)
Comment 1 Bastien Nocera 2012-05-03 16:23:01 UTC
Still happens with clutter.x86_64 0:1.10.4-1.fc17
Comment 2 Bastien Nocera 2012-05-03 17:01:02 UTC
Created attachment 213392 [details] [review]
event: Fix copying touch events

We were trying to copy motion axes instead of touch ones.
Comment 3 Bastien Nocera 2012-05-03 17:01:12 UTC
Created attachment 213393 [details] [review]
x11/device-manager-xi2: Fix assertions with touch

When getting touch events, the device manager would try
to pass an invalid device to translate_axes().

clutter_event_set_device() will only update event->touch.device
for touch events, not event->motion.device, as used.

Fixes Totem crashing on mouse motion/button press when using
a touchpad.
Comment 4 Emmanuele Bassi (:ebassi) 2012-05-03 17:06:20 UTC
Review of attachment 213393 [details] [review]:

looks good to me. feel free to backport to the clutter-1.10 branch as well
Comment 5 Emmanuele Bassi (:ebassi) 2012-05-03 17:16:33 UTC
Review of attachment 213392 [details] [review]:

looks good to me. feel free to cherry-pick it to the clutter-1.10 branch as well
Comment 6 Bastien Nocera 2012-05-03 17:34:00 UTC
Pushed to master and clutter-1.10

Attachment 213392 [details] pushed as 217ff7c - event: Fix copying touch events
Attachment 213393 [details] pushed as 2bb84d9 - x11/device-manager-xi2: Fix assertions with touch