[Bug]: GNOME Clocks triggers GLib critical: g_ascii_strtod assertion 'nptr != NULL' failed
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
The bug is in geocode-glib library, called by GNOME Clocks. Start by reproducing the issue with G_DEBUG=fatal-criticals to get a backtrace. Examine geocode-glib source to find where g_ascii_strtod is called with a NULL pointer. Look at the GNOME Clocks code that uses geocode-glib to understand the data flow. The fix likely involves validating input before passing to g_ascii_strtod.
Written by the indexing model from the issue text.
Description
Kernel
7.2.6-1-cachyos
Desktop Environment / Window Manager
GNOME
CPU
AMD Ryzen 5 5600H
GPU / Driver
AMD Radeon Graphics (integrated) / amdgpu NVIDIA GeForce RTX 2050 / NVIDIA proprietary driver
Description
GNOME Clocks consistently produces a GLib critical warning during startup:
g_ascii_strtod: assertion 'nptr != NULL' failed
The warning occurs every time GNOME Clocks is started and is reproducible regardless of the locale used.
Testing with both LANG=C LC_ALL=C and LANG=en_IN.UTF-8 LC_ALL=en_IN.UTF-8 produces the same warning.
Using GDB with G_DEBUG=fatal-criticals causes the process to trap at the GLib critical. The backtrace indicates that the call to g_ascii_strtod() originates from libgeocode-glib-2.so.0.
The installed packages involved are:
- gnome-clocks 50.0-2.1
- glib2 2.88.3-1.1
- geocode-glib 3.26.4-6
Steps to Reproduce
- Start a GNOME/Wayland session.
- Open a terminal.
- Run:
gnome-clocks
- Observe the terminal output.
The following warning is consistently produced:
(org.gnome.clocks:XXXXX): GLib-CRITICAL **:
g_ascii_strtod: assertion 'nptr != NULL' failed
The issue can also be reproduced with:
LANG=C LC_ALL=C gnome-clocks
and:
LANG=en_IN.UTF-8 LC_ALL=en_IN.UTF-8 gnome-clocks
Both produce the same GLib critical.
Expected Behavior
GNOME Clocks should start without producing GLib critical warnings or triggering an assertion in g_ascii_strtod().
Actual Behavior
GNOME Clocks starts but consistently produces the following GLib critical warning:
GLib-CRITICAL: g_ascii_strtod: assertion 'nptr != NULL' failed
When executed with:
G_DEBUG=fatal-criticals gnome-clocks
the GLib critical causes the application to abort with SIGABRT.
A GDB backtrace shows:
#0 ... in GLib
#1 ... in g_logv()
#2 ... in g_log()
#3 ... in g_ascii_strtod()
#4 ... in libgeocode-glib-2.so.0
#5 ... in libgeocode-glib-2.so.0
The warning therefore appears to originate from code in the geocode-glib path used by GNOME Clocks.
Logs / Error Messages
https://paste.cachyos.org/p/3ecc67c.log
Additional Context
Installed package versions:
gnome-clocks 50.0-2.1
glib2 2.88.3-1.1
geocode-glib 3.26.4-6
libgeocode-glib-2.so.0 is provided by the installed geocode-glib package:
/usr/lib/libgeocode-glib-2.so.0 is owned by geocode-glib 3.26.4-6
ldd /usr/bin/gnome-clocks confirms that GNOME Clocks loads:
libglib-2.0.so.0
libgeocode-glib-2.so.0
libjson-glib-1.0.so.0
The warning is reproducible with both C and en_IN.UTF-8 locales, so it does not appear to be specific to the user's locale.
Running:
G_DEBUG=fatal-criticals gnome-clocks
causes the application to abort after the GLib critical.
The GDB backtrace points through:
gnome-clocks
→ geocode-glib
→ g_ascii_strtod
→ GLib
No missing files were reported by the earlier package integrity check:
sudo pacman -Qk 2>&1 | grep -v '0 missing files'
This issue is being reported against the CachyOS packaged environment because the installed GNOME Clocks/geocode-glib/GLib package combination produces the reproducible warning.
- Dominant language
- No language data
- Stars
- 29
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CachyOS/distribution
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
CachyOS/distribution#645 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 74/100
CachyOS/distribution#620 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
CachyOS/distribution#603 · 2 comments · 1 reaction ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
CachyOS/distribution#602 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
CachyOS/distribution#590 ·
All issues in CachyOS/distribution
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
constellation-app/constellation#2603 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
krazyjakee/caskade#173 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day