Native crash capture on Windows, and startup steps in crash reports (#1215)
A crash inside a graphics driver left only "an unclean exit between commands": no backtrace, no module, no hint that it was at startup. - The crash journal now keeps the startup step the app is in (window, graphics instance, surface, adapter request, adapter chosen, device creation, renderer and viewport shader compiles, surface configure, first frame and its present, running) and the renderer as soon as the adapter is picked. egui-wgpu tells the app about its steps through a small hook. An unclean exit before the first frame names the step. - Windows: an unhandled-exception filter (src/native_crash.rs, the one Windows-only module allowed unsafe) writes the exception code, the faulting module and offset, and a minidump next to the journal; the next start puts them into the report. - The Windows CI job runs a child that faults on purpose and checks the report. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0ddd660089
commit
d20b0fab65
15 files changed
+703
-30
No files matched your search
@@ -7,8 +7,9 @@ license.workspace = true
|
||||
publish = false
|
||||
default-run = "solidcraft"
|
||||
|
||||
# The workspace lints, except unsafe_code: denied, not forbidden, so that src/open_documents.rs can
|
||||
# allow it (macOS file-open events have no safe API). Keep the rest in sync with [workspace.lints].
|
||||
# The workspace lints, except unsafe_code: denied, not forbidden, so that src/open_documents.rs
|
||||
# (macOS file-open events) and src/native_crash.rs (Windows exception filter) can allow it: neither
|
||||
# has a safe API. Keep the rest in sync with [workspace.lints].
|
||||
[lints.rust]
|
||||
unsafe_code = "deny"
|
||||
|
||||
@@ -41,6 +42,18 @@ quick-xml = { workspace = true }
|
||||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
hidapi = { version = "2.6.7", default-features = false, features = ["windows-native"] }
|
||||
# Native crash capture (src/native_crash.rs): the exception filter, the faulting module, a minidump.
|
||||
windows-sys = { version = "0.61", features = [
|
||||
"Win32_Foundation",
|
||||
"Win32_Security",
|
||||
"Win32_Storage_FileSystem",
|
||||
"Win32_System_Diagnostics_Debug",
|
||||
"Win32_System_IO",
|
||||
"Win32_System_Kernel",
|
||||
"Win32_System_LibraryLoader",
|
||||
"Win32_System_Memory",
|
||||
"Win32_System_Threading",
|
||||
] }
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
# Files opened from Finder and the Dock (src/open_documents.rs); all already come with eframe and rfd.
|
||||
|
||||
Reference in new issue
Block a user