fix(whisper): extract MSVC runtime DLLs beside win32 whisper-server - #1687
Draft
greatcoat wants to merge 2 commits into
Draft
fix(whisper): extract MSVC runtime DLLs beside win32 whisper-server#1687greatcoat wants to merge 2 commits into
greatcoat wants to merge 2 commits into
Conversation
The win32 CPU whisper-server.exe links the dynamic MSVC runtime (msvcp140/vcruntime140/vcruntime140_1/vcomp140) but shipped as a bare exe: download-whisper-cpp.js copied only the binary out of the release zip, so on machines without the VC++ 2015-2022 redistributable the Windows loader killed every spawn with 0xC0000135 (STATUS_DLL_NOT_FOUND) before main(), with empty stderr — local transcription dead on arrival (CUS-113). - pin whisper.cpp 0.0.10, the first release whose win32 zips bundle the DLLs - give the win32 config the same libPattern DLL-companion extraction the llama/sherpa download scripts already use, consolidating their duplicated findLibrariesInDir/matchesPattern helpers into lib/download-utils.js - prep whisperVulkanManager with libPattern so the 0.0.10 vulkan zip's CRT DLLs are extracted too (its "statically linked" comment was wrong re CRT) electron-builder's extraResources filter already passes *.dll and cleanupFiles already spares libraries, so no packaging-config change needed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem: Windows machines without the VC++ redistributable kill the CPU whisper-server at load with 0xC0000135 — every local dictation fails, empty stderr, before main().
Fix: Pin whisper.cpp 0.0.10 (first release bundling the MSVC runtime DLLs in its win32 zips) and extract those DLL companions beside the exe, reusing the llama/sherpa libPattern approach, now consolidated in lib/download-utils.
Important
Draft until
OpenWhispr/whisper.cppPR #6 merges and release 0.0.10 is cut — until that tag exists, any build from this branch fails to fetch the pinned release. Merging both + the release cut wait for Josh's explicit go.Root cause
The win32 CPU
whisper-server.exelinks the dynamic MSVC runtime — its PE import table demandsMSVCP140.dll,VCOMP140.DLL,VCRUNTIME140.dll,VCRUNTIME140_1.dll(the upstream build'sCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedstatic-CRT flag is a silent no-op without CMake policy CMP0091, and OpenMP links vcomp dynamically regardless) — butwhisper-server-win32-x64-cpu.zipcontained only the exe anddownload-whisper-cpp.jscopied only the binary, unlike the llama/sherpa download scripts which both carrylibPatternDLL companions. Nothing else provides the runtime: Electron's own copies live next toOpenWhispr.exeand are invisible to a child process inresources\bin, so on machines without the system-wide redist the loader terminates every spawn with0xC0000135(STATUS_DLL_NOT_FOUND).Probe evidence (CUS-113, RCA in Titan wiki
whisper-server-dll-not-found-rca.md): customer debug logdebug-2026-08-17T12-23-22-137Z.logshows 14 spawns in ~8 s, each dead in ~50 ms with exit 3221225781 (=0xC0000135) across three models; PE import parse of the shipped 0.0.8/0.0.9 exes confirms the four CRT imports; zip listings confirm no DLLs shipped. Field-confirmed 2026-08-17: installing the VC++ redistributable — the only change — immediately fixed the reporting machine.Fix
scripts/download-whisper-cpp.js— pin 0.0.10;win32-x64config gainslibPattern: "*.dll"; DLL companions are copied intoresources/binbeside the exe (identical to the llama/sherpa pattern).main()is now guarded byrequire.mainand the config exported, so the regression test can import the script without side effects.scripts/lib/download-utils.js— new sharedmatchesPattern/findLibrariesInDir/copyLibraries;download-llama-server.jsanddownload-sherpa-onnx.jshad byte-identical private copies (whisper would have been the third), now consolidated.src/helpers/whisperVulkanManager.js— win32 asset gainslibPattern: /\.dll$/iso the 0.0.10 Vulkan zip's CRT DLLs are extracted at runtime too; its "statically linked — no companion libs" comment was wrong about the CRT and is corrected. No-op at 0.0.9 (zip has no DLLs).Deliberate non-changes:
electron-builder.json— theextraResourcesfilter already passes*.dll(the RCA's claim it blocks DLLs was stale on this point); no change needed.cleanupFiles— already spares libraries (isLibraryguard) and only touches thewhisper-serverprefix; verified, untouched.whisperCudaManager/whisperVulkanManagertag bumps to 0.0.10 + digests — the sha256 digest map can only be filled after the 0.0.10 assets exist; follow-up commit once the release is cut. CUDA's existinglibPatternalready extracts all zip DLLs, so it needs only the tag+digest bump.Tests
test/scripts/downloadWhisperCpp.test.jsfails —BINARIES["win32-x64"].libPatternisundefined, tag asserts'0.0.8' !== '0.0.10',copyLibraries is not a function.npm test: 2094 tests, 1923 pass, 0 fail (170 skipped = known Electron-ABI better-sqlite3 local skips).Provenance
RCA: Titan
wiki/areas/engineering/whisper-server-dll-not-found-rca.md· Linear CUS-113 · customer thread1a00fc15dfac3569(Brian, Win10, free tier) · companion CI fix: OpenWhispr/whisper.cpp#6🤖 Generated with Claude Code