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 707179 - segfault on Debian due to Esperanto on Debian
segfault on Debian due to Esperanto on Debian
Status: RESOLVED DUPLICATE of bug 705885
Product: gnome-control-center
Classification: Core
Component: Region & Language
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-08-31 14:31 UTC by Osamu Aoki
Modified: 2013-09-03 23:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
handle null country code for Esperanto (2.09 KB, patch)
2013-08-31 14:31 UTC, Osamu Aoki
none Details | Review

Description Osamu Aoki 2013-08-31 14:31:50 UTC
Created attachment 253686 [details] [review]
handle null country code for Esperanto

code: panels/region/cc-input-chooser.c (For version 3.8.3)
segfault line: 1075
   list = gnome_xkb_info_get_layouts_for_country (priv->xkb_info, country_code);

Explanation:
Debian comes with locales including:

 $ cat /usr/share/i18n/SUPPORTED
...
en_ZW ISO-8859-1
eo.UTF-8 UTF-8
eo ISO-8859-3
es_AR.UTF-8 UTF-8
es_AR ISO-8859-1
...

This "eo" for Esperanto naturally has no country code and causes panels/region/cc-input-chooser.c to segfaults when, for example, I try to set input source for the keyboard.  (Also this prevented ibus to function)

== Error seen when gnome-control-center is run from console ==

(gnome-control-center:29342): GnomeDesktop-WARNING **: locale
'eo_(null).utf8' isn't valid

(gnome-control-center:29342): GnomeDesktop-WARNING **: locale
'eo_(null).utf8' isn't valid

(gnome-control-center:29342): GnomeDesktop-WARNING **: locale
'eo_(null).utf8' isn't valid

(gnome-control-center:29342): GnomeDesktop-CRITICAL **:
gnome_get_country_from_code: assertion 'code != NULL' failed

 ======

Although null happens for country_code on Debian, I thought it is more prudent to protect this program from crash for NULL language_code.  

Attached patch should prevent segfault.

See more on http://bugs.debian.org/692453 for more.
Comment 1 Rui Matos 2013-09-03 23:27:55 UTC
This is most likely the same as bug 705885. I'll do a gnome-desktop 3.8.4 release tomorrow, if that doesn't fix it for you please re-open.

*** This bug has been marked as a duplicate of bug 705885 ***