Diagnostics: native crashes, early crash log, report keeps the file - #3
Merged
Merged
Conversation
… file - An unhandled-exception filter writes last-crash.log for native crashes (access violations in Media Foundation, D3D11 and the like) with the exception code, address and module. It allocates nothing and hands on to the previous filter and Windows Error Reporting. - The log folder is known and created from diag::init, so a crash before Tauri's setup is kept too; crash handlers wait up to 100 ms for the logger lock instead of giving up at once. - The report takes plugcam.log whenever it exists, so a problem caught with the detailed log on is still there after it is turned off, plus this session's lines from memory. - "detailed log off" is written before the file closes. - The report lists each GPU once.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1, closing the gaps found when reviewing it.
What changes
last-crash.logwith the exception code, address and module (native exception 0xC0000005 at 0x… in mfplat.dll), then the in-memory log. It allocates nothing (the heap may be broken), then calls the previous filter and lets Windows Error Reporting run as before.diag::initworks out the log folder itself (logs\next to portable data, or%LOCALAPPDATA%\io.github.plugcam\logslike Tauri'sapp_log_dir) and creates it. A test checks the identifier againsttauri.conf.json.plugcam.logwhenever it exists (titled with when it was last written), plus this session's lines from memory.detailed log offgoes into the file before it closes, so the file shows where it ends.Checks
cargo test --lib: 57 passed (4 new);cargo clippy --all-targets: no new warnings.LOCALAPPDATApointed at a temp folder: a null write producednative exception 0xC0000005 at … in zz_crash_probe.exeplus the buffer; a thread panic produced the panic and the buffer.plugcam.logwith the session's earlier lines; off writes the last line; Save report writes the file to Downloads with both log sections, one GPU, the phone serial masked (***e2d7, including the Wi-Fi ADB mDNS names) and no profile path.CI can't run at the moment: GitHub reports the account is locked due to a billing issue.