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 649370 - crash in compute_above_tab_keycode() if keyboard geometry not available
crash in compute_above_tab_keycode() if keyboard geometry not available
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.34.x
Other Linux
: High critical
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2011-05-04 12:46 UTC by Dave Shield
Modified: 2011-06-21 17:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Simple fix (564 bytes, patch)
2011-05-04 12:47 UTC, Dave Shield
none Details | Review

Description Dave Shield 2011-05-04 12:46:52 UTC
Metacity 2.34 introduced code to try and determine the key
immediately above the Tab key,  by querying the X server
for the keyboard geometry.
   [above-tab-keycode.c:76-78
       keyboard = XkbGetKeyboard(....);
   ]

If this query fails for any reason, then metacity ends up
dereferencing a null pointer, and crashes.
   [above-tab-keycode.c:80
       geometry = keyboard->geom;
   ]

This problem was encountered when running Hummingbird Exceed
against a Fedora 15 server.

There is a simple fix, which is to default to assuming the
keycode 'XK_grave'   (as is currently the case if the XKB
extension is explicitly omitted when compiling metacity).

A suitable patch is attached
Comment 1 Dave Shield 2011-05-04 12:47:38 UTC
Created attachment 187183 [details] [review]
Simple fix
Comment 2 Owen Taylor 2011-05-04 15:38:43 UTC
See bug 647777 for mutter
Comment 3 George Petasis 2011-06-21 14:49:24 UTC
I also observed this bug, when trying to run gnome 3 under fedora 15, with RealVNC. Metacity crashes, and gnome does not start at all. What I get is a big image, and a message "oh no! something has gone wrong", with a prompt to logout and try again. 

Running metacity under gdb, gave the following: 

Program received signal SIGSEGV, Segmentation fault.
compute_above_tab_keycode (xdisplay=0x80e5c00) at core/above-tab-keycode.c:80
80 geometry = keyboard->geom;
(gdb) where
  • #0 compute_above_tab_keycode
    at core/above-tab-keycode.c line 80
  • #1 meta_display_get_above_tab_keycode
    at core/above-tab-keycode.c line 235
  • #2 keysym_to_keycode
    at core/keybindings.c line 262
  • #3 reload_keycodes
    at core/keybindings.c line 283
  • #4 meta_display_init_keys
    at core/keybindings.c line 628
  • #5 meta_display_open
    at core/display.c line 385
  • #6 main
    at core/main.c line 581

Comment 4 Olav Vitters 2011-06-21 15:34:14 UTC
Seems this was fixed on Thu Apr 14 10:10:40 2011 -0400 by Adam Jackson in commit e3baf14cbb0e595f3bb67a7fc4fb607720c9aecb.

We just need to do a metacity release (ideally the maintainer..).
Comment 5 Olav Vitters 2011-06-21 17:37:44 UTC
I've released metacity 2.34.1