Report: a crash reported during a report write is kept; Config: title_memory in any case (#106) #148
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!148
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/148/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@mmmharius on GitHub · 2026-11-23 15:48 UTC · original
mmmharius:fix/report-crash-config-case→main· +53 −3 · 2 files · 2 commits · merged 2026-11-23 21:08 UTCTwo of the minor items from #106, one commit each.
Report: a crash is no longer dropped (
crates/xcl/src/report.rs)write_finalreturned as soon asWRITE_LOCK.try_lock()failed, before it storedcrashinCRASH. When another thread was writing the report at that moment (WM_CLOSEinpresent.rs,XCL_RUN_SECONDSinhost.rs,DLL_PROCESS_DETACHinloader.rs), a crash reported byeh.rs(unhandled exception filter) or bystop_if_device_removedinreal.rswas lost:report.jsonhad nocrashand the launcher showed nothing.Now:
CRASHbefore the report lock is tried;build()on the thread that already holds the lock still ends (the reason for thetry_lock);The retry is a small helper,
lock_within, used for bothCRASHandWRITE_LOCK;CRASHis never held while waiting forWRITE_LOCK.Config:
title_memoryis read in any case (crates/xcl/src/config.rs)Config::resolvecomparedtitle_memorywith"auto"and"advanced"as written, while the manifest's value is lowercased anddevice_typeis compared in any case. Withtitle_memory = "Auto"inxcl.tomlthe manifest was ignored; with"Advanced"uma_mbbecame 2048 instead of 4095. The value is now trimmed and lowercased once at the start ofresolve.Tests
report::tests::a_crash_is_kept_while_another_thread_writes_the_report: another thread holdsWRITE_LOCKfor about 100 ms whilewrite_final(Some("boom"))is called;CRASHmust hold"boom"(no boot record in unit tests, so nothing is written to disk).CRASHis reset afterwards.config::tests::title_memory_is_read_in_any_case:"Auto"with an Advanced manifest and"ADVANCED"without a manifest both give("advanced", uma_mb 4095).What was checked: cross-built from Linux for
x86_64-pc-windows-gnuat484dd57.cargo check --workspace --all-targetspasses with 0 warnings before and after the change, the test binary builds, andcargo clippy -p xcl --libreports nothing in the changed lines.What was not: I had no Windows machine at hand and wine would not start, so the two new tests are compiled but have not been executed, and neither has the rest of the suite. Both are written to fail on the current
main. Please runcargo test -p xcl --lib -- report::tests config::testsbefore merging.@ivall on GitHub · 2026-11-23 21:09 UTC · original
Merged (main
6da33fa). Checked on an RX 9070 (RDNA4) with the 22 PRs merged together on maineaa36b6:cargo build --workspace && cargo test --workspace -- --test-threads=4- 582 unit tests passed, 0 failed (20 ignored), the integration and e2e tests passed too; and the retail game still reaches its first menu (646 frames in 30 s, no device removal).