M4: Windows 실기 확인으로 찾은 워커 크래시 수정

- 원인: pywinrt 의 오래된 msvcp140.dll(14.29)이 먼저 올라가면 onnxruntime 이 0xC0000005 로 죽음
  (롤 채팅 OCR 을 한 번 쓴 뒤 첫 STT 에서 워커가 조용히 종료, PyInstaller 분석도 실패)
- 워커 시작 때 onnxruntime·ctranslate2 를 먼저 적재, 빌드 전에 winrt 의 msvcp140 삭제
- 코어: 워커가 죽은 뒤 stdin 쓰기(EPIPE)로 앱 전체가 죽던 문제

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-15 02:16:08 +09:00
parent 47fd237baf
commit 827e9d822c
4 changed files with 29 additions and 1 deletions

View File

@@ -88,7 +88,10 @@ try {
& $py -m pip install --upgrade pip -q
& $py -m pip install -r requirements.txt -r requirements-dev.txt -q
if ($LASTEXITCODE -ne 0) { Pop-Location; throw "pip exit $LASTEXITCODE" }
& $py -c "import faster_whisper, ctranslate2, winrt.windows.media.ocr as o; print('faster-whisper', faster_whisper.__version__, 'ct2', ctranslate2.__version__)"
# pywinrt 가 넣어 둔 오래된 MSVC 런타임(msvcp140 14.29)은 지운다. 남겨 두면 PyInstaller 분석과 실행 중에
# onnxruntime 이 0xC0000005 로 죽는다 (시스템/번들의 새 런타임을 쓰게 한다)
Get-ChildItem (Join-Path $Repo 'worker\.venv\Lib\site-packages\winrt') -Filter 'msvcp140*.dll' -ErrorAction SilentlyContinue | ForEach-Object { "삭제: $($_.FullName)"; Remove-Item $_.FullName -Force }
& $py -c "import winrt.windows.media.ocr as o; import onnxruntime, faster_whisper, ctranslate2; print('faster-whisper', faster_whisper.__version__, 'ct2', ctranslate2.__version__, 'ort', onnxruntime.__version__)"
Pop-Location
}
# 한국어 OCR 언어 기능 (롤 채팅 OCR 에 필요. 게임 PC 에서는 첫 실행 마법사가 안내)