fix(xgameruntime): guard frame_counter against 0 ms division, non-finite elapsed, and empty CSV path #375
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!375
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-375"
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?
@Lewandox on GitHub · 2026-11-26 13:46 UTC · original
Lewandox:fix/xgameruntime-frame-counter-zero-div→main· +26 −5 · 1 files · 1 commits · merged 2026-11-26 13:57 UTCSummary
Fixes three edge-case bugs in
crates/anyxboxx-xgameruntime/src/frame_counter.rs:slowest_ms == 0.0:1000.0 / report.slowest_msproducedinfin trace logs and the window title (1 % bas inf) when frames completed within the same monotonic clock tick. Extractedlow_fps(slowest_ms: f64) -> f64returning0.0whenslowest_msis non-positive or non-finite.elapsedinsummarise:summariseonly checkedelapsed <= 0.0, acceptingf64::INFINITYorf64::NAN. Now rejects!elapsed.is_finite() || elapsed <= 0.0.ANYXBOXX_FPS_CSV:write_csvnow ignores an emptyANYXBOXX_FPS_CSVenvironment variable instead of attempting to open"".Verification
cargo fmt -p anyxboxx-xgameruntime -- --check— passcargo clippy -p anyxboxx-xgameruntime --no-deps --all-targets -- -D warnings— passcargo test -p anyxboxx-xgameruntime frame_counter::tests— all passed, 0 failed