darktable-org / darktable-org/darktable

[Windows] Startup failure due to Japanese characters in username path and premature config directory check

Open
#20,202 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

no-issue-activity
Dominant language
C
Stars
13.1k
Forks
1.4k
Avg merge
22h 14m
Merged PRs (30d)
198

Description

Is there an existing issue for this?
  • I checked and did not find my issue in the already reported ones
Describe the bug

On Windows systems where the username contains Japanese (multi-byte) characters, darktable 5.4.0 fails to launch, displaying a "darktableを終了する" (Exiting darktable) dialog.

The logs indicate that the application fails to handle the UTF-8 encoding of the user path and attempts to access the default %LOCALAPPDATA% directory before processing command-line arguments like --configdir. This makes it impossible to bypass the issue by redirecting the configuration folder.

Steps to reproduce
  1. Install darktable 5.4.0 on Windows with a user account named in Japanese characters.
  2. Launch darktable.exe from the installation folder (e.g., D:\darktable\bin\darktable.exe).
  3. Observe the "Exiting darktable" error window.
  4. Attempt to launch via command line with --configdir "D:\dt_config".
  5. Observe that it still fails with the same error, as it tries to open the default C: drive path first.
Expected behavior

The application should correctly handle UTF-8 encoded paths for Windows usernames. Additionally, command-line arguments such as --configdir should be prioritized and processed before the application attempts to initialize the default configuration directory.

Logfile | Screenshot | Screencast

Please find the terminal output from darktable-cltest.exe below, which clearly shows the directory initialization error and the encoding issue:

0.0053 darktable.configdir: directory 'C:\Users\蠎励・PC7U\AppData\Local\darktable' fails to open

(process:19996): GLib-CRITICAL **: 21:25:25.429: g_strlcpy: assertion 'src != NULL' failed

(darktable.exe:9056): Gtk-WARNING **: Failed to set text from markup due to error parsing markup:
The name contains invalid UTF-8 characters.
(Original Japanese path was corrupted in the log due to encoding mismatch)


Observation: Even when I try to override the configuration directory using --configdir "D:\dt_config", the application still attempts to access the default %LOCALAPPDATA% path first and crashes before it can apply the command-line argument.

Commit

No response

Where did you obtain darktable from?

darktable.org / GitHub release

darktable version

darktable 5.4.0 (official win64 release)

What OS are you using?

Windows

What is the version of your OS?

Windows 11 Pro

Describe your system

OS: Windows 10/11

Graphics card: NVIDIA GeForce 210 (Driver 342.01)

OpenCL installed: Yes (but device is too old for darktable, cltest shows "insufficient device version")

Are you using OpenCL GPU in darktable?

None

If yes, what is the GPU card and driver?

No response

Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip

The installation is located on D:\darktable\bin.

The darktable-cltest.exe confirms that OpenCL is disabled, so this is purely a path/initialization issue.

The GLib-CRITICAL error g_strlcpy: assertion 'src != NULL' failed suggests a null pointer when trying to resolve the user path string.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with darktable.exe under a Windows account whose username contains Japanese characters, then compare startup behavior with --configdir and the darktable-cltest.exe output. Trace the configuration-directory initialization and command-line processing entry points implicated by the log. Done means the application handles the user path correctly and honors --configdir before accessing the default directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop-dev, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.