-
-
Notifications
You must be signed in to change notification settings - Fork 21k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.3 beta 1] Godot Wayland produces corrupt config if language does not use '.' as decimal separator #92594
Comments
Addition: |
Can you reproduce this in 4.2.2? I've never heard of this issue before, as Godot does not use language-specific decimal separators when printing numbers in the first place. |
No, I've been using 4.2.2 (v4.2.2.stable.openSUSE [15073af] to be exact) the whole time and never had this issue. |
I just tried again, and it only happens with I'll attach a Screencast: Screencast_20240601_125532.webm |
Hi, thanks for the report! I'm not aware of any code on Wayland that would directly interfere with string printing. The core string logic uses Lines 1878 to 1912 in 705b7a0
The only weird thing to me, which has been there for years though, is that we set the user locale in the Linux main to an empty string, which means the user's preferred locale:
I wonder if removing it, or forcing it to "C" just in case would change things. This does not make much sense though :/ Further help would be appreciated. |
Well, the Man-Page for
Other than that, I guess the only reason it happens with Wayland is that Wayland sets (or doesn't set) these Variables differently from X11. |
@DasCapschen uh interesting. Perhaps XWayland (or the X.org server in general) generates a full locale'd environment. Testing this should not even need changing the code. If you happen to try running the engine with |
Well, I just inspected Setting |
It definitely happens inside
And now with
As you can see, the output with |
That's to be expected, as the generic linuxbsd code overwrites it. But the rest's just baffling... The fact that
That's the only thing I can think of, but still, if the environment has no other stuff... Oh, glibc... I wonder if there might be any other condition, or some weird non-standard thread-local stuff messing this stuff up. Perhaps either platform lib is doing something behind our backs? Gosh, what a mess. At this point I'd just try forcing |
Oh no... I think I found something: https://x.org/releases/current/doc/libX11/libX11/libX11.html#X_Locale_Management This is still speculation, but judging from this line I fear that xlib might actually be setting the locale in weird ways:
(emphasis mine) If setting I should've probably looked into this earlier, sorry. Edit: nevermind, it talks about the libc setlocale... I'll have to look deeper if I want to find what's going on. |
Tested versions
System information
Godot v4.3.beta1 - openSUSE Tumbleweed 20240523 - Wayland - Vulkan (Forward+) - dedicated AMD Radeon RX 580 Series (RADV POLARIS10) () - Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz (8 Threads)
Issue description
Godot writes invalid
editor_settings-4.3.tres
and invalidproject.godot
files, when the User's language does not use a period as a decimal separator.Floats get represented like
0,57
instead of0.57
, causing issues likeParse Error: Expected 4 arguments for constructor
.This prevents Godot from starting until editor_settings file is fixed.
Starting Godot with
LANG=C ./godot
fixes the problem.Steps to reproduce
Parse Error: Expected 4 arguments for constructor
Minimal reproduction project (MRP)
n.a.
The text was updated successfully, but these errors were encountered: