armory3d / armory3d/armorpaint
UI scale accepts negative values causing app to not start - locale issue with comma vs decimal point
- Dominant language
- C
- Stars
- 5k
- Forks
- 553
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 6
Description
**ArmorPaint version:**
1.0 alpha-97d9614
**OS / GPU model:**
Windows, NVIDIA GeForce RTX 4080 Laptop GPU, Intel(R) UHD Graphics
**Issue description:**
It is possible to set a negative value for UI scale in Preferences > Interface, which causes the application to not start anymore. The negative value is created automatically when entering a comma-separated decimal value (e.g., 1,5). Upon confirmation, the value automatically jumps to -1. Only dot-separated decimal values (e.g., 1.5) are accepted correctly.
**Severity:** Critical - Once this setting is applied, the application becomes completely broken and cannot be executed anymore.
**Workaround to recover:**
To restore functionality, the user needs to manually edit the configuration file:
1. Navigate to the ArmorPaint application folder (e.g., where ArmorPaint.exe is located)
2. Open the `data/config.json` file in a text editor
3. Find the `"window_scale"` parameter
4. Change the negative value (e.g., -1) to a valid positive value (e.g., 1.0 or 1.5)
5. Save the file and restart ArmorPaint
This appears to be a locale issue where the application expects decimal points (.) but users with comma-based locales (German, etc.) naturally enter commas, which are incorrectly parsed and result in negative values.
**Steps to reproduce:**
1. Open ArmorPaint
2. Go to Preferences > Interface
3. In the UI scale field, enter a decimal value with a comma (e.g., 1,5)
4. Confirm the value
5. Observe that the value automatically changes to -1
6. Close and restart ArmorPaint
7. Application fails to start due to the negative UI scale value
**Expected behavior:**
- The UI scale field should either:
- Accept both comma and decimal point separators based on system locale
- Reject invalid input and show a clear error message
- Prevent negative values from being saved
- Provide input validation to ensure only valid positive values are accepted
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue in ArmorPaint on a comma-based locale, then inspect data/config.json and the window_scale setting described in the report. Trace where the Preferences > Interface value is parsed and saved. Done means comma-separated input is handled correctly or rejected clearly, invalid or negative values cannot be saved, and the application still starts after confirmation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop, localization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100