CNA-BUG-072: BoundingBox::ToString and Ray::ToString emit literal doubled braces ({{Min:... }}) where XNA 4.0 prints single braces

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.

Both copy FNA's string concatenation of '{{' and '}}'; XNA builds the same text with string.Format, whose escaped '{{' yields one brace. BoundingBoxTest.ToStringMatchesFNAFormat pins the FNA form.

Identifier
CNA-BUG-072
Category
Bug
Subsystem
Math & geometry
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::BoundingBox::ToString(), Ray::ToString()

Expected behaviour

XNA 4.0 (IL) formats BoundingBox.ToString with String.Format("{{Min:{0} Max:{1}}}", ...) and Ray.ToString with "{{Position:{0} Direction:{1}}}"; the format escapes produce {Min:{X:1 Y:2 Z:3} Max:{X:4 Y:5 Z:6}}. CNA's own rule is that XNA wins where XNA and FNA disagree.

Actual behaviour at TARGET

BoundingBox.cpp streams "{{Min:{X:" ... "}}" and Ray.cpp streams "{{Position:" ... "}}" literally, giving {{Min:{X:1 Y:2 Z:3} Max:{X:4 Y:5 Z:6}}}.

Source locations

Evidence

Checked by reading the named sources at 009d40f5; nothing was built or executed for this entry. XNA format strings read from the genuine XNA 4.0 IL.

Focused reproduction

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

Current tests

BoundingBoxTest.ToStringMatchesFNAFormat asserts the doubled leading braces; Ray's format is untested.

Regression test

Change the test to the XNA string and add one for Ray.

Blast radius

Logs, debug overlays and any tooling that parses these strings.

Workaround

No workaround is known.

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

Known issues
Bug index