fix(engine): catch native faults in Client::UseTime instead of crashing

See Changelog/2026-10-11-gametick-chatclient-guard.md.
This commit is contained in:
BlankenshipG 2026-10-12 00:33:21 -04:00
commit b77c631b8b
6 changed files with 260 additions and 7 deletions

View file

@ -85,8 +85,17 @@ if (-not $EngineOnly) {
$sameSeh = (Test-Path $sehDest) -and ((Resolve-Path $seh).Path -eq $sehDest -or
(Get-FileHash $seh).Hash -eq (Get-FileHash $sehDest).Hash)
if (-not $sameSeh) {
# Same move-aside as the loader and shim: a locked copy would otherwise keep every
# new launch on the old trampoline until all clients close.
try { Copy-Item $seh $sehDest -Force -ErrorAction Stop }
catch { Write-Warning "RynthCore.SehTrampoline.dll changed but is in use by a running client; it gets the new one when it restarts." }
catch {
try {
Rename-Item $sehDest ("RynthCore.SehTrampoline.dll.old-{0:yyyyMMddHHmmss}" -f (Get-Date)) -ErrorAction Stop
Copy-Item $seh $sehDest -Force -ErrorAction Stop
Write-Host "RynthCore.SehTrampoline.dll was in use: moved the old one aside; new launches get the new one."
}
catch { Write-Warning "RynthCore.SehTrampoline.dll changed but is in use by a running client; it gets the new one when it restarts." }
}
}
# App-local runtime: the win-x86 runtime pack the SDK restores (same version the engine was built against).