Files
omniget/src-tauri
tonhowtf 3fe2aed412 fix(windows): hold one MTA for the process instead of init/uninit per call
Opening the share picker twice crashed the app with an access violation. The
capture paths wrapped each call in CoInitializeEx/CoUninitialize, but tearing
the apartment down does not invalidate the WinRT activation factories the
windows crate caches, so the second GraphicsCaptureSession::IsSupported read
freed memory. CoIncrementMTAUsage exists for this: an implicit MTA that outlives
every call, with the cookie deliberately never released. The worker threads stop
initialising their own apartments for the same reason.

Found by the capture self-test on the Windows CI job, which is why it exists.
2026-08-28 11:40:43 -03:00
..
2026-08-28 00:19:08 -03:00