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 793098 - Running in an invalid locale causes critical warnings
Running in an invalid locale causes critical warnings
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
git master
Other Linux
: Normal minor
: ---
Assigned To: gcalctool maintainers
gcalctool maintainers
Depends on:
Blocks:
 
 
Reported: 2018-02-01 17:31 UTC by Philip Withnall
Modified: 2018-02-01 18:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Philip Withnall 2018-02-01 17:31:52 UTC
Running gnome-calculator as follows results in some warnings:

CHARSET="Spanish Inquisition" gcalccmd -s 1+1
GLib: Cannot convert message: Conversion from character set “UTF-8” to “Spanish Inquisition” is not supported

** (process:14208): CRITICAL **: string_get_char: assertion 'self != NULL' failed

** (process:14208): CRITICAL **: string_get_char: assertion 'self != NULL' failed

---

The first warning (from GLib) is expected and correct. The two critical warnings below it are not. They are probably the result of not handling potential of an error from a g_locale_to_utf8() call (or a g_utf8_to_locale() call). I guess that might be happening inside Vala.

Originally reported as bug #685691.
Comment 1 Robert Roth 2018-02-01 18:24:02 UTC
Indeed, there was a call of string.locale_to_utf8 returning null, and calc was trying to .get(0). Fixed that with additional checks, no more warnings.

This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.