Skip to content

UI scale accepts negative values causing app to not start - locale issue with comma vs decimal point #2082

Description

@ikonnow

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions