CNA-BUG-260: ExitingEventArgs is documented as the data of Game.Exiting but nothing delivers it, and this non-XNA type carries no CNAEXT marker

CNA snapshot 009d40f5  ·  Known Issues › Current bugs  ·  source links pinned to 009d40f5

✓

Evidence basis: source-verified at the pinned commit; tests exist (not executed for this page). 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.

The header says ExitingEventArgs provides data for Game.Exiting, yet Game::Exiting is typed with plain EventArgs, nothing constructs the type, and it is not tagged CNAEXT although XNA 4.0 has no such class.

Identifier
CNA-BUG-260
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
Yes: see Current tests
Affected contract
Microsoft::Xna::Framework::ExitingEventArgs (ExitingEventArgs.hpp) and Game::Exiting

Expected behaviour

A type that is not part of XNA 4.0 and lives in the Microsoft::Xna namespace is wrapped with CNAEXT (CLAUDE.md, “Code Generation Rules”), so that non-XNA extensions are visibly tagged, and its documentation says what it is for. XNA 4.0's Game.Exiting is EventHandler<EventArgs>, and no ExitingEventArgs exists in the XNA 4.0 assemblies.

Actual behaviour at TARGET

ExitingEventArgs.hpp declares an empty class in Microsoft::Xna::Framework without CNAEXT and documents it as “Provides data for the Game.Exiting event”. Game::Exiting and Game::OnExiting use System::EventArgs, so nothing in CNA constructs or raises an ExitingEventArgs; CNA's own C API coverage mapping records that as a finding, and the type's only tests construct it for its own sake. The typing of Game::Exiting is the XNA-faithful part; the comment and the missing marker are the defect.

Source locations

Evidence

Read at 009d40f5: the header, the Game raising path, the CNAEXT definition and its use on sibling CNA-only classes, the C API mapping text and the XNA comparison record; nothing was executed. The published deep dive on the game class already records that the type is a CNA-specific addition that nothing uses; this entry records the two contract violations. Reported as a narrow restore by the D2 dismissal reviewer and re-verified by the orchestrator.

Focused reproduction

No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.

Current tests

ExitingEventArgsTest.DefaultConstructible and ExitingEventArgsTest.IsInstanceOfEventArgs only construct the type.

Regression test

Either wrap the class in CNAEXT and correct its Doxygen comment to say that nothing raises it, or remove it; no runtime test is needed for a comment change.

Blast radius

Documentation and API hygiene only: a reader of the header is told the type carries the Exiting event's data, and a strict reader of the XNA surface finds an untagged non-XNA class. No runtime behaviour is affected.

Workaround

Write Exiting handlers against System::EventArgs, as XNA does; do not use ExitingEventArgs.

The same subject is explained at several altitudes. These are the neighbouring pages at each one.

User guide
Game loop
Known issues
Bug index