Repository navigation
Conversation
Reading the osu! editor is inherently best-effort: the editor object lives in osu! stable's managed heap and is rebuilt (test mode, map load) or moved by the GC, so cached pointers go stale. Until now a single failed read threw out of the periodic task, which stopped drawing, spammed "Periodic task error: Exception: FetchEditor error." / "FetchAll error." and could leave the viewer stuck until it was restarted (issue #62). Read path: * Never treat "not in the editor" as an error: a window title that does not end with ".osu" (test mode, song select, loading) is reported as an idle state and no longer counts as a failure. * Keep the last good snapshot and keep drawing frames while reads fail; the status bar now says which state the viewer is in instead of silently showing a frozen picture. * A failed read invalidates the "editor check succeeded" cache so the next tick performs a real validation instead of trusting a stale address. * Consecutive read failures back off (200ms doubling to 3s) and, after 10 failures, force a re-bind which now bypasses the success cache (previously the recovery call was swallowed by it, so a dead binding could persist forever). Re-binding: * Move the memory scan (up to ScanTimeoutMs per attempt) to a background thread; the drawing loop keeps running and only skips reads while it is in flight. * Replace the permanent region blacklist with a per-region backoff (60s doubling to 30min), a resume cursor and a "last hit region first" fast path, so a skipped region is retried later instead of never, and a timed-out scan makes progress instead of restarting from zero. * Validate candidate addresses harder (editor state + HOM + object list) to avoid latching onto dead editor copies left behind by test mode. * Limit how many scan threads may run at once (timed-out scans cannot be interrupted and would otherwise pile up). Other: * The Reset menu item (F5) now really drops the binding (the reader used to be a static instance, so the old address and scan state survived) and restores the normal drawing interval instead of polling once every 3 seconds. * Read cadence and defaults are intentionally unchanged: full reads still run at FullRead_Interval (20ms) while the editor is in the foreground and the mouse is moving, and at LowFreqRead_Interval otherwise. A beatmap is static, so the only moving content on screen is the object being dragged/placed, and its position is only available from memory: this interval is what makes it follow the mouse smoothly, so it must not be traded away for fewer reads. Cutting read volume should instead be done by reading only the dragged/selected objects incrementally. * Docs: describe the new status texts, the drag-follow role of the read interval, and ask for the Editor Reader log switch when reporting read problems.
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.
No description provided.