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 <[email protected]>
This commit is contained in:
1 parent
0ddd660089
commit
d20b0fab65
15 files changed
+703
-30
No files matched your search
@@ -27,9 +27,11 @@ new uses of it anywhere else. Public docs/web/Flatpak deployments use project Pa
|
||||
## Never crash
|
||||
People trust SolidCraft with their designs; a crash loses their work. **This outranks feature work.**
|
||||
- **No panics in non-test code:** no `unwrap()`, `expect()`, `panic!`, `unreachable!`, `todo!`,
|
||||
`unimplemented!`; no `unsafe` (`unsafe_code = "forbid"`). The one exception is two functions in
|
||||
`apps/solidcraft/src/open_documents.rs` (that crate denies it instead): macOS hands Finder files
|
||||
only to an Objective-C method.
|
||||
`unimplemented!`; no `unsafe` (`unsafe_code = "forbid"`). The two exceptions, in the app crate
|
||||
(which denies it instead), have no safe API: two functions in
|
||||
`apps/solidcraft/src/open_documents.rs` (macOS hands Finder files only to an Objective-C
|
||||
method) and the Windows-only `apps/solidcraft/src/native_crash.rs` (the exception filter that
|
||||
records crashes inside native code such as graphics drivers).
|
||||
- **Errors are `Result<T, E>`** through the crate's error type and `?`. An unfinished feature
|
||||
returns an error ("not supported yet: …"); it never panics.
|
||||
- **Input-derived numbers are hostile** (command parameters, design files, control-channel
|
||||
|
||||
Reference in new issue
Block a user