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 721260 - Crash on startup: gnucash cannot handle default locale
Crash on startup: gnucash cannot handle default locale
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: MacOS
2.6.0
Other Mac OS
: Normal major
: ---
Assigned To: gnucash-mac-maint
gnucash-mac-maint
: 721259 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-12-31 07:33 UTC by minfrin
Modified: 2018-06-29 23:23 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description minfrin 2013-12-31 07:33:21 UTC
After downloading the v2.6.0 DMG and running GnuCash for the first time, the splash screen appears for a fraction of a second, and then crashes.

Moving to the command line, attempting to start gnucash writes the following to the console before exiting:

Little-Net:Testing minfrin$ Gnucash.app/Contents/MacOS/Gnucash
Application Path /Applications/Testing/Gnucash.app/Contents/MacOS/Gnucash-bin

(process:30185): Gtk-WARNING **: Locale not supported by C library.
	Using the fallback 'C' locale.
Backtrace:
In /Applications/Testing/Gnucash.app/Contents/Resources/share/gnucash/guile-modules/gnucash/main.scm:
 76: 0* [setlocale 0 ""]

/Applications/Testing/Gnucash.app/Contents/Resources/share/gnucash/guile-modules/gnucash/main.scm:76:1: In procedure setlocale in expression (setlocale LC_ALL ""):
/Applications/Testing/Gnucash.app/Contents/Resources/share/gnucash/guile-modules/gnucash/main.scm:76:1: Invalid argument

Manually choosing a locale by overriding the LC_ALL environment variable works around the problem and causes Gnucash to start:

Little-Net:Testing minfrin$ LC_ALL=C Gnucash.app/Contents/MacOS/Gnucash
Application Path /Applications/Testing/Gnucash.app/Contents/MacOS/Gnucash-bin
Preference migration has finished

To fix this, gnucash's locale support needs to be fixed. It seems assumptions are being made as to the locale on the machine, and sensible fallback behaviour is missing.
Comment 1 John Ralls 2013-12-31 18:01:37 UTC
Replicated in 10.9 by setting the language to English and the region to Mongolia.

As a workaround, set a sensible over-ride using the instructions in
 http://wiki.gnucash.org/wiki/Locale_Settings#GnuCash_2.4.0_or_newer
to one of the more common locales for your language of choice.
Comment 2 John Ralls 2013-12-31 22:38:43 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.

r23660. Works around the problem (which is actually Guile's fault) by ensuring that the locale set from the Mac's defaults is valid for setlocale(). If it's not, it uses the first valid locale for the same language if one exists, falling back on en_US if one doesn't.
Comment 3 John Ralls 2014-01-01 17:04:58 UTC
*** Bug 721259 has been marked as a duplicate of this bug. ***
Comment 4 John Ralls 2014-01-02 14:39:52 UTC
*** Bug 721334 has been marked as a duplicate of this bug. ***
Comment 5 John Ralls 2018-06-29 23:23:09 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=721260. Please update any external references or bookmarks.