Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

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

已關閉
#1,405 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
1-2 天
新手友好度
57/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
c, electron, typescript

研究方向

Start with electron/native/whisper-stt/src/main.cpp and trace how the model path and environment variables reach the whisper.cpp loaders. Read the attached patch and check how the Windows build links shell32; the issue says the proposed change has not been built on Windows. Done when the helper starts with a model path under a non-ASCII Windows profile, while non-Windows behavior remains unchanged.

由索引模型根據 Issue 內容生成。

描述

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

主要語言
TypeScript
星號
3.7k
分支
231
平均合併
16 小時 38 分鐘
30 天內合併 PR
327

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

getopenscreen/openscreen 的其他 Issue

查看 getopenscreen/openscreen 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。