Files
Radicade/Tools/client-exit-triage.ps1
T
2026-10-16 23:33:13 -07:00

39 lines
1.8 KiB
PowerShell

# Triage the last Rec Room run: crash vs orderly exit.
#
# The Unity log ends without a shutdown sequence in both cases, so the Windows
# Application log is what separates a fault (Application Error / WER) or a freeze
# (Application Hang) from a clean process end.
#
# Usage:
# powershell -NoProfile -File tools/client-exit-triage.ps1 [-Minutes 60]
param([int]$Minutes = 60)
$since = (Get-Date).AddMinutes(-$Minutes)
Write-Host "== Application log events touching the client (last $Minutes min) =="
Get-WinEvent -FilterHashtable @{ LogName = 'Application'; StartTime = $since } -ErrorAction SilentlyContinue |
Where-Object { $_.Message -match 'RecRoom|GameAssembly|UnityPlayer|breakpad' } |
Select-Object -First 12 |
ForEach-Object {
$first = ($_.Message -split [char]10 | Where-Object { $_ -and $_.Trim() }) | Select-Object -First 4
Write-Host ("{0} id={1} {2}" -f $_.TimeCreated, $_.Id, $_.ProviderName)
$first | ForEach-Object { Write-Host (" " + $_.Trim()) }
}
Write-Host ""
Write-Host "== WER reports for the client =="
Get-ChildItem "$env:LOCALAPPDATA\Microsoft\Windows\WER\ReportArchive" -ErrorAction SilentlyContinue |
Where-Object { $_.Name -match 'RecRoom' -and $_.LastWriteTime -gt $since } |
Select-Object LastWriteTime, Name |
Format-Table -AutoSize
Write-Host ""
Write-Host "== fresh minidumps =="
@("$env:LOCALAPPDATA\Temp", "$env:LOCALAPPDATA\CrashDumps", "$env:LOCALAPPDATA\Microsoft\Windows\WER\ReportQueue") |
Where-Object { Test-Path $_ } |
ForEach-Object {
Get-ChildItem $_ -Recurse -Depth 2 -Include *.dmp, *.mdmp -ErrorAction SilentlyContinue |
Where-Object { $_.LastWriteTime -gt $since } |
Select-Object LastWriteTime, Length, FullName
} | Format-Table -AutoSize