Skip to content

PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust

TEMP: capture a crash dump of the ARM64 view-test crash and print its stack

Brandon Thomasc3007277ef37
diff --git a/.github/workflows/windows-arm64.yml b/.github/workflows/windows-arm64.yml
index dde218f12..d6acf271d 100644
--- a/.github/workflows/windows-arm64.yml
+++ b/.github/workflows/windows-arm64.yml
@@ -139,6 +139,25 @@ jobs:
key: windows-arm64-test
- name: Build the view tests
run: cargo test -p printcraft-ui-egui --test view --no-run
+ - name: Crash dump of the view tests, with the crashing stack
+ shell: pwsh
+ run: |
+ $dumps = "$env:RUNNER_TEMP\dumps"; New-Item -ItemType Directory -Force $dumps | Out-Null
+ $key = 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps'
+ New-Item -Force $key | Out-Null
+ Set-ItemProperty $key DumpFolder $dumps; Set-ItemProperty $key DumpType 2; Set-ItemProperty $key DumpCount 3
+ $exe = (Get-ChildItem target\debug\deps\view-*.exe | Sort-Object LastWriteTime | Select-Object -Last 1).FullName
+ Write-Output "binary: $exe"
+ for ($i = 1; $i -le 60; $i++) {
+ & $exe --quiet *> $null
+ if ($LASTEXITCODE -ne 0) { Write-Output "crashed on run $i (exit $LASTEXITCODE)"; Start-Sleep 5; if (Get-ChildItem $dumps -Filter *.dmp) { break } }
+ }
+ $dump = Get-ChildItem $dumps -Filter *.dmp | Select-Object -First 1
+ if (-not $dump) { Write-Output 'no dump written'; exit 0 }
+ $cdb = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\Debuggers' -Recurse -Filter cdb.exe -ErrorAction SilentlyContinue | Sort-Object { $_.FullName -notmatch 'arm64' } | Select-Object -First 1
+ if (-not $cdb) { Write-Output 'cdb not found'; Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10' -Directory | Out-String; exit 0 }
+ Write-Output "cdb: $($cdb.FullName)"
+ & $cdb.FullName -z $dump.FullName -y "srv*;$(Split-Path $exe)" -c ".ecxr; kn 40; ~* kn 12; q" 2>&1 | Select-Object -Last 220
- name: "A: parallel (the default), 30 runs"
shell: bash
run: |