Files
BadNote/windows/runner
Akiba So 3615f2bd88
All checks were successful
CI / Windows build (push) Successful in 8m7s
fix(windows): don't crash on startup from OCR apartment
The app showed no window because RegisterOcrChannel ran
winrt::init_apartment() (defaults to MTA) on the Flutter platform
thread, which main.cpp already put in an STA via CoInitializeEx. That
throws RPC_E_CHANGED_MODE and kills the app before the window appears.
Remove that call; run the WinRT OCR on a dedicated MTA worker thread
per recognize call instead, joining before returning the result.
2026-06-21 16:19:51 +08:00
..