ccsm crashes with "locale.Error: unsupported locale setting" when locale is unsupported - should fallback to C

Bug #796308 reported by Sam_
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
compizconfig-settings-manager (Ubuntu)
Invalid
Low
Unassigned

Bug Description

TEST CASE:
1. open a terminal
2. run the command:
   $ export LC_MESSAGES=unknown
3. ccsm

Results:
The crash below. ccsm should catch the exception and fallback to C.

$ ccsm
(process:1732): Gtk-WARNING **: Locale not supported by C library.
 Using the fallback 'C' locale.
Traceback (most recent call last):
  File "/usr/bin/ccsm", line 93, in <module>
    import ccm
  File "/usr/lib/python2.7/dist-packages/ccm/__init__.py", line 1, in <module>
    from ccm.Conflicts import *
  File "/usr/lib/python2.7/dist-packages/ccm/Conflicts.py", line 26, in <module>
    from ccm.Constants import *
  File "/usr/lib/python2.7/dist-packages/ccm/Constants.py", line 79, in <module>
    locale.setlocale(locale.LC_ALL, "")
  File "/usr/lib/python2.7/locale.py", line 531, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting
When started with LANG=C it opens fine.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: compizconfig-settings-manager 0.9.4-0ubuntu3
ProcVersionSignature: Ubuntu 2.6.39-3.10-generic 2.6.39
Uname: Linux 2.6.39-3-generic x86_64
NonfreeKernelModules: wl
Architecture: amd64
Date: Sun Jun 12 20:58:30 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110423)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=de:en
 PATH=(custom, no user)
 LANG=C
 LC_MESSAGES=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: compizconfig-settings-manager
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Sam_ (and-sam) wrote :
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thanks for your report. This is easily reproducible. I'm setting to triaged/low because the workaround is easy, and usually the locale is set to a supported and installed locale.

summary: - [Oneiric] CCSM launcher doesn't start. Missing language support
+ ccsm crashes with "locale.Error: unsupported locale setting" when locale
+ is unsupported - should fallback to C
Changed in compizconfig-settings-manager (Ubuntu):
status: New → Triaged
importance: Undecided → Low
description: updated
Revision history for this message
Sam_ (and-sam) wrote :

dpkg-reconfigure locales was issued.
Maybe this Bug #198758 is similar.
$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Kann LC_ALL nicht auf die Standard-Lokale einstellen: Datei oder Verzeichnis nicht gefunden
## above line says: can't set LC_ALL to standard local: file or directory not found.
LANG=de
LANGUAGE=de:en
LC_CTYPE="de"
LC_NUMERIC="de"
LC_TIME="de"
LC_COLLATE="de"
LC_MONETARY="de"
LC_MESSAGES=de_DE.UTF-8
LC_PAPER="de"
LC_NAME="de"
LC_ADDRESS="de"
LC_TELEPHONE="de"
LC_MEASUREMENT="de"
LC_IDENTIFICATION="de"
LC_ALL=

Revision history for this message
Sam_ (and-sam) wrote :

Since latest updates of language packages no further crash, CCSM starts from launcher without complains.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

This is because lightdm has been fixed to correctly handle locales but the crash still exists in ccsm if the locale isn't installed on the system (see test case)

---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

description: updated
Revision history for this message
Sam_ (and-sam) wrote :

Thanks for the clarification; I thought because locales was updated also.
locales 2.13+git20110617-1

tags: added: testcase
Revision history for this message
w-sky (w-sky) wrote :

This bug affects me now with Ubuntu 12.04 beta when the "Regional Formats" have been changed with the Language Support tool to something else than "en_US.UTF-8" !!!

Workaround: in a terminal, enter the following command:
export LC_ALL="en_US.UTF-8"

then start ccsm in that terminal.

Revision history for this message
w-sky (w-sky) wrote :

PS: same problem with OpenShot ... it will not start and complain about languages unless preceded by
export LC_ALL="en_US.UTF-8"
in a terminal.

locale-gen does not help.

Revision history for this message
Phillip Susi (psusi) wrote :

This package has been removed from Ubuntu. Closing all related bugs.

Changed in compizconfig-settings-manager (Ubuntu):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.