Fix for "The engine exited with code 1 / Access is denied (0x80070005)" on Launch (v0.2.0) #9
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fablinoo--kelvaroq#9
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Praisser on GitHub · 2026-11-26 16:11 UTC · original
Kelvaroq version
0.2.0 (built from
1270c42)Hardware configuration
VICTORY_*variables setWhat happened?
Pressing Launch in the desktop workspace fails immediately and the game never starts:
Running as administrator, Defender exclusions, folder permissions, and registering an event log source make no difference, because the error has nothing to do with the Windows event log or file permissions.
Cause
kelvaroq-desktop.exestartskelvaroq-cli.exewithCreateNoWindow = true(Product.Commandinsrc/launcher/App.cs), so the CLI already owns a hidden console. When launched from the workspace,native::runinsrc/native.rscallsAllocConsole()to open the log window. Windows returnsERROR_ACCESS_DENIED(0x80070005) when a process that already has a console callsAllocConsole(), and the launch stops there. phantom54 first pointed this out in #2.How to fix it
Option 1: two-line code fix (recommended, keeps the full launcher). In
src/native.rs, release the inherited console before opening the log window:Then rebuild with
cargo build --release --lockedand replacekelvaroq-cli.exein your Kelvaroq folder with the newtarget\release\kelvaroq.exe, renamed tokelvaroq-cli.exe. The rest of the package stays as it is.The ready-made commit is here:
github.com/Praisser/kelvaroq@e915c971c8(branchfix/console-before-logon Praisser/kelvaroq).Option 2: no rebuild (workaround from #2). Skip the workspace and start the game from PowerShell in the Kelvaroq folder:
This works because the CLI then has no hidden console. It skips what the workspace adds, though: shader preload, the Automatic hardware settings, and save snapshots.
Result after the fix
kelvaroq-engine.exeprocess starts.kelvaroq-engine.exe, and the game runs.cargo test --locked --bin kelvaroqpasses (15 tests).Additional information
The fix commit doesn't carry the
Co-authored-by: Moon AItrailer thatchecks.ymlrequires, since Moon AI wasn't involved in writing it. Maintainers can add their own trailer when applying it.@gaxolotl on GitHub · 2026-11-26 17:10 UTC · original
Thanks.