CNA-BUG-085: GameTime.IsRunningSlowly follows FNA's lag counter, not XNA 4.0's rule
Evidence basis: source-verified at the pinned commit. Claims on this page were checked by reading the CNA source at commit 009d40f5; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.
CNA sets IsRunningSlowly after five accumulated extra steps and clears it when the lag counter returns to zero; XNA 4.0 reports it when two multi-step ticks occur within 20 ticks and assigns it before each Update, so the flag differs tick by tick.
- Identifier
CNA-BUG-085- Category
- Bug
- Subsystem
- Core & runtime
- Status
- Open
- Verified against
- CNA
009d40f5(009d40f5dd085c4e674d3479675fac84b12b3e0a) - Severity
- Low (a triage suggestion, not a project priority)
- Evidence basis
- Source-verified: read at TARGET, not executed
- Tests touching this area
- None
- Affected contract
- Microsoft::Xna::Framework::GameTime::IsRunningSlowly as set by Game::Tick
Expected behaviour
XNA 4.0's Game.Tick (IL) keeps updatesSinceRunningSlowly1/2: a tick that needs more than one step shifts counter 1 into counter 2 and zeroes counter 1; drawRunningSlowly = updatesSinceRunningSlowly2 < 20; and the value is written to GameTime.IsRunningSlowly before every Update of the tick.
Actual behaviour at TARGET
CNA's fixed-step branch in Game.cpp uses FNA's updateFrameLag_: it adds stepCount - 1 per tick, sets the flag when the lag reaches 5, clears it only when the lag is back to 0, decrements the lag after single-step ticks, and assigns the flag after the tick's updates. A single two-step hitch never sets the flag in CNA; two hitches 15 ticks apart set it in XNA and not in CNA; and CNA's flag can stay set long after XNA's has cleared.
Source locations
modules/runtime/src/Game.cpp— Game::Tick fixed-step branch (updateFrameLag_ and setIsRunningSlowlyProperty)modules/runtime/tests/Microsoft/Xna/Framework/GameTimeTests.cpp— GameTime property tests only
Evidence
Checked by reading the named sources at 009d40f5; nothing was built or executed for this entry. XNA rule read from the genuine XNA 4.0 Game IL; no oracle run compares the two tick by tick.
Focused reproduction
No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.
Current tests
GameTimeTests.cpp checks the property's storage only; nothing drives Tick through slow frames.
Regression test
A fake-clock Game test with a scripted sequence of frame durations that asserts XNA's IsRunningSlowly value at each Update (derived from the IL rule).
Blast radius
Games that adapt quality or skip work when IsRunningSlowly is set. Games that ignore the flag are unaffected.
Workaround
No workaround is known.
Related pages
The same subject is explained at several altitudes. These are the neighbouring pages at each one.
- Internals
- Runtime frame: XNA time
- Deep dives
- IsRunningSlowly: how XNA differs
- Known issues
- Bug index