Skip to content

Windows: captions helper (whisper-stt-server) crashes at boot when the user profile path contains non-ASCII characters #1405

Closed

Description

@pgkang0619

What happens
On Windows with a non-ASCII user name (e.g. C:\Users\홍길동\), auto captions never start. whisper-stt-server.exe exits during boot, before / reports ready. The model download itself succeeds.

Repro path
C:\Users\홍길동\AppData\Roaming\openscreen\stt-models\whisper-ggml\ggml-small-q8_0.bin → the helper exits with code 3221226505 (0xC0000409).

Environment

  • OpenScreen 2.1.2 (x64 installer), Windows 11, Korean locale (ANSI code page 949)
  • Model: the default 264 MB model, stored under %APPDATA% (which contains the non-ASCII user name)

Cause
electron/native/whisper-stt/src/main.cpp takes the model path from char** argv / getenv(). On Windows those arrive in the ANSI code page (CP949 here), not UTF-8. whisper.cpp v1.9.1 converts the path with std::wstring_convert<std::codecvt_utf8<wchar_t>>::from_bytes (whisper_init_from_file_with_params_no_state, and the VAD loader), which throws std::range_error on non-UTF-8 bytes, so the process terminates.

Confirmed by copying the same model to an ASCII path and launching the same binary with that --model: it boots and transcribes Korean correctly.

Workaround
OPENSCREEN_WHISPER_SERVER_EXE pointing at a small wrapper that rewrites --model to an ASCII copy of the model.

Proposed fix (patch attached)
On _WIN32, rebuild the arguments from GetCommandLineW() + CommandLineToArgvW() and read the env vars with _wgetenv(), converting both to UTF-8 with WideCharToMultiByte(CP_UTF8, ...). Non-Windows behaviour is unchanged. Links shell32 for CommandLineToArgvW. The patch has not been built on Windows yet; only the cause was confirmed.

This affects every Windows user whose profile name is not ASCII (Korean, Chinese, Japanese, Cyrillic, accented Latin names, ...).

openscreen-utf8-paths.patch

Activity

  1. EtienneLescot commented on Oct 28, 2026

    @EtienneLescot
    Member

    Thanks a lot @pgkang0619, your diagnosis and patch were spot on! I built on it in #1407, which also covers the CTC aligner model and the temp WAV path. Verified on Windows with a model under a non-ASCII folder: it boots and transcribes, while main crashes with 0xC0000409. A test from your machine once it ships would be very welcome.

  2. added
    status: fixed in mainWork is merged into main but may not be in a downloadable release yet.
    status: pending releaseMerged change is waiting for a packaged desktop release.
    on Oct 29, 2026
  3. added this to the Next Release milestone on Oct 29, 2026
  4. EtienneLescot commented on Oct 29, 2026

    @EtienneLescot
    Member

    Fixed by #1407 and merged into main. It isn't in a downloadable release yet; it will ship with the next one. Thanks again @pgkang0619!

  5. EtienneLescot commented on Oct 29, 2026

    @EtienneLescot
    Member

    Moved into v2.2.0 as part of the pre-release cut.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: fixed in mainWork is merged into main but may not be in a downloadable release yet.status: pending releaseMerged change is waiting for a packaged desktop release.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions