GNOME Bugzilla – Bug 619445
starting gives crash with message "locale::facet::_S_create_c_locale name not valid"
Last modified: 2011-12-19 17:06:38 UTC
On Ubuntu Lucid Lynx 10.4, starting glom in any way gives the error: terminate called after throwing an instance of 'std::runtime_error' what(): locale::facet::_S_create_c_locale name not valid Aborted even running glom --version gives this error. Version is 1.13.2. When the error is understood, the severity may be able to be set more appropriately. If it is an error in Ubuntu packaging, then I suggest setting this report to severity=enhancement as an enhancement request for more robust handling of this error.
What locale are you using? For instance, what does "echo $LANG" say in the terminal? Does it work if you do "export LANG=en_US.UTF-8" before starting Glom from the terminal? Is there anything else unusual about your system? Is it a 64-bit installation?
By the way, not that Ubuntu's package is old, and of an unstable Glom version, but this is still an unexpected error.
Also, could you try to get a gdb backtrace for this, if you know how?
You should also the package of the stable Glom 1.14.x that I have uploaded to our PPA: https://launchpad.net/~openismus-team/+archive/ppa
Upgrading using PPA produced this error: dpkg: dependency problems prevent configuration of glom: glom depends on libglom-1.14-0 (= 1.14.3-0ubuntu1openismus9); however: Package libglom-1.14-0 is not installed. dpkg: error processing glom (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: glom Other packaging errors (not glom) currently prevent me from manually installing. LANG is and was en_US.UTF-8 .
(In reply to comment #5) > Upgrading using PPA produced this error: > > dpkg: dependency problems prevent configuration of glom: > glom depends on libglom-1.14-0 (= 1.14.3-0ubuntu1openismus9); however: > Package libglom-1.14-0 is not installed. Someone else had this problem, but I don't understand why yet. Could you give me some more clues: Wat does it say when you try this? sudo apt-get install libglom-1.14-0 And if that asks for another package could you try that too, and give me that error message too, please? Maybe my libglom-1.14 package just needs to state that it replaces the libglom-1.12 package.
1.14.3-0ubuntu1openismus9 has the same error. I do not find debug symbols for it. Perhaps I will build glom for debug some time. It may depend on what i need for build dependencies.
But could you answer my questions in #6. I'd really like to fix that packaging problem. And yes, it would be really helpful if you could build Glom to get a backtrace. I'd like to find where this exception is first thrown so I can give a more helpful clue about the problem. "apt-get source Glom" might help. And I'd welcome any change to the packaging to add a dbg package. This is very odd to me though if en_US.UTF-8 is your normal locale. If it's not your normal locale then I can imagine that it is not installed properly somehow. Googling found things like this: http://ubuntuforums.org/showthread.php?t=287887
> Upgrading using PPA produced this error: > > dpkg: dependency problems prevent configuration of glom: > glom depends on libglom-1.14-0 (= 1.14.3-0ubuntu1openismus9); however: > Package libglom-1.14-0 is not installed. That should be fixed now. I still have no idea what is causing your main problem. I will try to add debug packages for Glom to help you get a backtrace.
I have added glom-dbg and libglom-1.14-0-dbg packages which might help you to get a backtrace. You probably want to install the glibmm and gtkmm debug packages too, and maybe others.
Could you try, please?
Please? I really want to fix this problem.
glom: Installed: 1.14.5-0ubuntu1openismus2 libglom-1.14-0: Installed: 1.14.5-0ubuntu1openismus2 Program received signal SIGABRT, Aborted. 0x0012d422 in __kernel_vsyscall () (gdb) bt
+ Trace 223184
Thanks. I've added a try/catch around that to give us a clue. When I've done a tarball release and Ubuntu package with that, I'll mention it here so you can try again.
That's in the PPA now: https://launchpad.net/~openismus-team/+archive/ppa It should now print the exception message to stderr and continue. Please copy/paste that message here.
int main(int, char**): exception from std::locale::global(std::locale("")): locale::facet::_S_create_c_locale name not valid Glom: exception: locale::facet::_S_create_c_locale name not valid
Thanks. I notice that you see the exception twice, probably from different parts of the code. Does Glom still crash, or do anything unusual? Does the problem go away if you do this on the command line? sudo dpkg-reconfigure locales
glom without paramers crashes as before. Running glom --version int main(int, char**): exception from std::locale::global(std::locale("")): locale::facet::_S_create_c_locale name not valid Glom 1.14.6 which did not function (tell the version) before. These tests are after running sudo dpkg-reconfigure locales
Could you get a backtrace for that new crash, please?
Please?
There are unresolved dependencies in the PPA.
(In reply to comment #21) > There are unresolved dependencies in the PPA. Can you give me a clue what they are please?
--- libgconfmm-2.6-1c2 (>= 2.24.0) (UNAVAILABLE) --- libgda-4.0-4 (UNAVAILABLE) --- python-gda (UNAVAILABLE) 'aptitude' does not show the packages for libgconfmm, Ubuntu web server shows the packages. Packages file has an entry. Package server does not: http://archive.ubuntu.com/ubuntu/pool/main/libg/
Maybe you want to file a bug with launchpad. These are normal packages. For instance, I just tested a reinstall of libgconfmm, and checked that it's here: http://us.archive.ubuntu.com/ubuntu/pool/main/g/gconfmm2.6/ You might also want to paste your whole /etc/apt/souces.list, though I'm unlikely to be able to help with general issues.
$ apt-cache policy glom-dbg glom-dbg: Installed: 1.14.6-0ubuntu1openismus1 (gdb) r Starting program: /usr/bin/glom [Thread debugging using libthread_db enabled] Catchpoint 1 (exception thrown), 0x0178ea23 in __cxa_throw () from /usr/local/lib/libstdc++.so.6 (gdb) bt
+ Trace 223926
When I run with --version, I see that the version is emitted after the exception is thrown.
(In reply to comment #18) > glom without paramers crashes as before. > > Running > glom --version > int main(int, char**): exception from std::locale::global(std::locale("")): > locale::facet::_S_create_c_locale name not valid > Glom 1.14.6 Is that an actual crash? Your backtrace seems to be catching the throw, though it is caught in main(). The code looks like this: try { std::locale::global(std::locale("")); //line 441 (seen in your backtrace) } catch(const std::runtime_error& ex) { //This has been known to throw an exception at least once: //https://bugzilla.gnome.org/show_bug.cgi?id=619445 //This should tell us what the problem is: std::cerr << G_STRFUNC << ": exception from std::locale::global(std::locale(\"\")): " << ex.what() << std::endl; }
The output posted for 'glom --version' was the actual terminal output. The back trace was when running without parameters. I'm running Ubuntu MM 10.10 now with Gnome as Desktop. The error does not reproduce. On LL 10.04, I had last used XFCE. I do not recall whether I had tried it under Gnome.
OK. Thanks for the effort. I don't think I can do much more with this until someone else can reproduce it. I still think that your environment was broken somehow, but I don't know exactly how. I'll close this bug eventually if nobody can reproduce it.
Closing for now as we can't reproduce it. Someone please reopen it if you have the same problem.
On FreeBSD, trying to update Glom to 1.16.x. With GDM_LANG=en_GB.UTF-8 LANG=en_GB.UTF-8 set in the enviroment. It fails with: -------------------------------- int main(int, char**): exception from std::locale::global(std::locale("")): locale::facet::_S_create_c_locale name not valid Glom: exception: locale::facet::_S_create_c_locale name not valid -------------------------------- How ever if I set LANG=C, I still get some ERROR's and DEBUG message. But glom works.
And I'm not able to reopen this bug, for some reason.
Thanks, Koop. Can you get a gdb backtrace of the actual crash, please? That output is probably not exactly where it crashes. I will also try to create a simple test case for this. I think it's a problem in your installation, or the distro in general, but I'll need to prove that. I'd be interested in those other error messages if they seem related.
If I run glom from gdb it tells me the application has exited normaly. Some help would be nice of what I should do, I only have experience with gdb and programs that segfault. Should I comment out some code or set a breakpoint somewhere?
Created attachment 177836 [details] [review] Fix locale problem This fix was added to our boost port. And if I apply it to glom I don't get the locale problem anymore. https://svn.boost.org/trac/boost/ticket/4688
I don't believe that locale("") and locale() mean the same thing. I think one is the classic locale and one is the current locale.
If I could find out what line of code is throwing the exception then I could cope with it more intelligently. Unfortunately, I can't reproduce it on any of my systems, and nobody has a backtrace so far. Using "catch throw" in gdb might help someone to get a backtrace, though it's only the last exception that's interesting. It will also show you some exceptions that are handled without problems.
Can anyone get a gdb backtrace for me?
Can anyone get a gdb backtrace for me, please?
Please reopen if you have a backtrace.
Created attachment 198068 [details] exception backtrace Hi. I'm seeing the exact same issue under OpenBSD. Backtrace attached.
Antoine, what version are you using to get that backtrace? What do you have on this line, mentioned in the backtrace? glom/main.cc:445 The current code has a try/catch around that line, so I am confused that the exception is not caught: try { std::locale::global(std::locale("")); } catch(const std::runtime_error& ex) { //This has been known to throw an exception at least once: //https://bugzilla.gnome.org/show_bug.cgi?id=619445 //This should tell us what the problem is: std::cerr << G_STRFUNC << ": exception from std::locale::global(std::locale(\"\")): " << ex.what() << std::endl; }
I guess that the exeception is being caught there, but I am most interested in the later exception that is apparently not being caught.
I could reproduce this by defining LANG to a locale that I have not installed (in Ubuntu Oneiric). For instance: $ export LANG=hu_HU.UTF-8 $ glom So I have added try/catch blocks to prevent later crashes: http://git.gnome.org/browse/glom/commit/?id=9158ae51d6d5a60a862b274b296e3a4a80cebc11 However, I will probably just prevent glom from starting if this happens, because this cripples Glom's functionality. For instance, you sometimes will not see any data in the list or details views.
Apparently this should list your installed locales: $ locale -a
And on debian/Ubuntu, I would like to know if this solves the problem: $ sudo dpkg-reconfigure locales
Please respond.
Please reopen if you can answer these questions, please. Otherwise, I still don't consider this a bug on normal systems, and I object to the suggested fix in comment #34.