[Windows] Freeze / Crash on startup
When I try to start rio on Windows (installed through scoop) I only get a white window for a few seconds and then the app disappears. The app used to work in the past but now doesn't. It happened with version 0.5.5 and still happens with 0.5.8.
There is no error or stdout/stderr. The exit code is shown as -1073741819 or 5 (when trying to launch from WSL).
I tried to remove my config / theme which had no impact.
Please assist.
Thanks for the report. Exit code -1073741819 is 0xC0000005 (access violation) — the "5" you see from WSL is the same status truncated to 8 bits, so this is a native crash rather than a normal error, which is why there's no output. A few things would help pinpoint it:
-
Enable trace logging and attach the log. In
%LOCALAPPDATA%\rio\config.tomlset:[developer] log-level = "TRACE" enable-log-file = truethen run rio once and copy
%LOCALAPPDATA%\rio\log\rio.logbefore launching rio again (the file is truncated on every start). Where the log stops tells us how far startup got: font init, renderer init, and pty spawn are all logged. -
A/B test the shell: does
rio.exe -e cmd.exestay alive while your default PowerShell crashes? Also: do you use a prompt like oh-my-posh/starship, or a non-English (localized) PowerShell? That would point at the text-decode path. -
If both crash: what GPU/driver do you have, and does setting the env var
WGPU_BACKEND=gl(ordx12) change anything? Windows Event Viewer then Windows Logs then Application should also have an "Application Error" entry naming the faulting module (rio.exe vs. a driver DLL), that name alone would settle a lot.
In the meantime I've audited the changes between 0.4.x and 0.5.x and found (and fixed) two memory-safety issues on paths that run at startup on Windows; the fixes will be in the next release, so it's worth retrying once that's out even before the info above.
Thank you for the very good info!
- Here is the logfile: rio.log
- The command
rio.exe -e cmd.exeshows no difference, same behavior. I just checked my config and there [shell] section is the default one (it's commented out). - Success! With both options,
WGPU_BACKEND=glanddx12rio starts successfully.
i also confirm that WGPU_BACKEND is the workaround to work on windows
Both WGPU_BACKEND=gl and WGPU_BACKEND=dx12 for 0.5.19 work on my Windows 11 (intel 10500T and i7-1185G7).
Same crash here on Rio 0.5.28 (Windows 11 build 26200). Event Viewer names the faulting module:
- Application Error:
rio.exe0.5.28.0, faulting moduleamdvlk64.dll32.0.21045.5002, exit status0xC000041D
Setup: three AMD adapters on two different AMD driver packages, each registering its own Vulkan ICD (VulkanDriverName per adapter):
- Ryzen 9000 iGPU (Granite Ridge): Adrenalin 26.8.1 / 32.0.21045.5002, amdvlk64 9.2.10.353
- RX 580 (Polaris): 31.0.12027.9001 (2023 package, Polaris isn't in 26.x), amdvlk64 9.2.10.233
- RX 6800 XT: was on the 2023 package when this was captured
Results (7 s launch each):
| Launch | Result |
|---|---|
| default | crash 0xC000041D in amdvlk64.dll |
WGPU_BACKEND=dx12 |
works |
VK_DRIVER_FILES=<only the 2023 amd-vulkan64.json> |
works |
So the crash comes from the newer AMD Vulkan ICD being loaded while wgpu enumerates adapters, probably triggered by mixed AMD driver versions in one system. Since dx12 fixes every report in this thread, would you consider defaulting to the DX12 backend on Windows
(or not enumerating Vulkan unless renderer.backend = "Vulkan" is set)?
- The crash went away once the 6800 XT got the newer driver. That pins it down further. It crashed when the 6800 XT and RX 580 were on the old driver and the CPU's graphics on the new one. It stopped once the 6800 XT matched the new driver, even with the RX 580 still on the old one. So the trigger seems to be the newer Vulkan driver meeting a card that runs the older driver.
- The dx12 workaround turns off transparency. With WGPU_BACKEND=dx12, window.opacity and blur do nothing; the window is fully opaque. They work with gl and Vulkan. Anyone using the workaround should know.