GNOME Bugzilla – Bug 642481
Invalid reads during menu invocation
Last modified: 2011-02-22 23:42:08 UTC
Run this command: $ G_SLICE=always-malloc valgrind gtk3-demo When it's up and running, choose the "Application main window" demo (double click its name), and in the new window press Alt+F for a file menu. Valgrind fills console with four invalid read reports like this one: ==12319== Invalid read of size 1 ==12319== at 0x4A07480: memcpy (mc_replace_strmem.c:602) ==12319== by 0x3121E0A35D: XIGrabDevice (in /usr/lib64/libXi.so.6.1.0) ==12319== by 0x535914F: gdk_x11_device_xi2_grab (gdkdevice-xi2.c:409) ==12319== by 0x530849A: gdk_device_grab (gdkdevice.c:1239) ==12319== by 0x4DABED2: popup_grab_on_window (gtkmenu.c:1419) ==12319== by 0x4DAC2AD: gtk_menu_popup_for_device (gtkmenu.c:1589) ==12319== by 0x4DAC88B: gtk_menu_popup (gtkmenu.c:1780) ==12319== by 0x4DBBC9C: gtk_menu_item_real_popup_submenu (gtkmenuitem.c:1859) ==12319== by 0x4DBBFCF: _gtk_menu_item_popup_submenu (gtkmenuitem.c:1958) ==12319== by 0x4DBB591: gtk_real_menu_item_select (gtkmenuitem.c:1676) ==12319== by 0x6565418: g_cclosure_marshal_VOID__VOID (gmarshal.c:79) ==12319== by 0x654B882: g_type_class_meta_marshal (gclosure.c:878) ==12319== Address 0xe508384 is 0 bytes after a block of size 4 alloc'd ==12319== at 0x4A04896: calloc (vg_replace_malloc.c:418) ==12319== by 0x3121E0A275: XIGrabDevice (in /usr/lib64/libXi.so.6.1.0) ==12319== by 0x535914F: gdk_x11_device_xi2_grab (gdkdevice-xi2.c:409) ==12319== by 0x530849A: gdk_device_grab (gdkdevice.c:1239) ==12319== by 0x4DABED2: popup_grab_on_window (gtkmenu.c:1419) ==12319== by 0x4DAC2AD: gtk_menu_popup_for_device (gtkmenu.c:1589) ==12319== by 0x4DAC88B: gtk_menu_popup (gtkmenu.c:1780) ==12319== by 0x4DBBC9C: gtk_menu_item_real_popup_submenu (gtkmenuitem.c:1859) ==12319== by 0x4DBBFCF: _gtk_menu_item_popup_submenu (gtkmenuitem.c:1958) ==12319== by 0x4DBB591: gtk_real_menu_item_select (gtkmenuitem.c:1676) ==12319== by 0x6565418: g_cclosure_marshal_VOID__VOID (gmarshal.c:79) ==12319== by 0x654B882: g_type_class_meta_marshal (gclosure.c:878)
libX11 problem, not GTK+
I do not think so, if I try the same with gtk2 gtk-demo, then I do not get these. Did you really change so much in popup menus in gtk3 that it uncovered such bug in X11? gtk2 version: gtk2-2.22.0-1.fc14.1.x86_64
That is because gtk2 does not use xi2.
libXi bug, patch proposed: http://patchwork.freedesktop.org/patch/4239/