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 700176 - crash in Region & Language
crash in Region & Language
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Region & Language
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
3.10
Depends on:
Blocks:
 
 
Reported: 2013-05-12 13:56 UTC by Pavel Vasin
Modified: 2013-05-13 14:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
region: Don't crash if the user disabled IS switch keybindings (1.13 KB, patch)
2013-05-13 13:41 UTC, Rui Matos
committed Details | Review

Description Pavel Vasin 2013-05-12 13:56:00 UTC
To reprodude:
1. open Region & Language
2. click Options
3. see crash

It looks like magic for the shift key fails on my specific configuration:

$ gsettings get org.gnome.desktop.wm.keybindings switch-input-source
['']
$ gsettings get org.gnome.desktop.wm.keybindings switch-input-source-backward
@as []
$ gsettings get org.gnome.settings-daemon.peripherals.keyboard input-sources-switcher
'alt-shift-l'

Backtrace:
  • #0 update_shortcut_label
    at cc-input-options.c line 70
  • #1 update_shortcuts
    at cc-input-options.c line 96
  • #2 cc_input_options_new
    at cc-input-options.c line 170
  • #3 show_input_options
    at cc-region-panel.c line 1347
  • #4 ??
    from /usr/lib/libgobject-2.0.so.0
  • #5 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #6 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0

Comment 1 Rui Matos 2013-05-13 13:41:17 UTC
Created attachment 243998 [details] [review]
region: Don't crash if the user disabled IS switch keybindings

A 0 length string for a keybinding means it is disabled so the whole
adding <Shift> magic to the backward accelerator string is pointless
anyway.
Comment 2 Bastien Nocera 2013-05-13 13:48:55 UTC
Review of attachment 243998 [details] [review]:

Looks good otherwise.
Please commit for gnome-3-8 and master.

::: panels/region/cc-input-options.c
@@ +91,2 @@
         previous_shortcut = g_strdup (previous[0]);
+        if (!previous_shortcut && next[0] && next[0][0])

Can you use:
next[0] and *next[0] instead?
Comment 3 Rui Matos 2013-05-13 14:20:53 UTC
(In reply to comment #2)
> Can you use:
> next[0] and *next[0] instead?

Yes.

Attachment 243998 [details] pushed as f221132 - region: Don't crash if the user disabled IS switch keybindings