From fe03cf4302dec57d22d7ca691a34097e6d90c37e Mon Sep 17 00:00:00 2001 From: Sergiy Borodych Date: Mon, 16 Feb 2026 11:05:14 +0200 Subject: [PATCH] fix hang caused by Gtk3 -init breaking float arithmetic in non-C locales Gtk3's gtk_init() calls setlocale(LC_ALL, "") which sets LC_NUMERIC to the user's locale. In locales using comma as decimal separator (e.g. uk_UA.UTF-8), this causes Perl to misinterpret float literals like .8 as 0, making Breakdown_List loop infinitely with $max=0. use locale :numeric tells Perl to properly manage LC_NUMERIC, keeping C locale for arithmetic while respecting user locale for display. Resolves #253 --- gmusicbrowser.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/gmusicbrowser.pl b/gmusicbrowser.pl index dbaf30d3..eed11850 100755 --- a/gmusicbrowser.pl +++ b/gmusicbrowser.pl @@ -15,6 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +use locale qw/ :numeric /; # fix arithmetic broken by Gtk3 -init setting LC_NUMERIC to user locale (see github #253) use strict; use warnings; use utf8;