CNA-BUG-209: Inspector ServerHello.graphicsRenderer reports the compile-time default renderer, not the one GraphicsRendererSelection actually created

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 Inspector session names the build's default renderer identity, so in a multi-renderer build where a preference, the environment variable or a fallback selects another renderer, the Session view shows the wrong one.

Identifier
CNA-BUG-209
Category
Bug
Subsystem
Diagnostics & Inspector
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
CNA::Inspector::HelloResponse::graphicsRenderer (the Session view's renderer) versus CNA::GraphicsRendererSelection::GetActive()

Expected behaviour

The Session view's renderer is the one the application runs on: GraphicsRendererSelection::GetActive() once a device exists (GetSelected() before, since GetActive() throws until the selection is latched).

Actual behaviour at TARGET

Agent::Impl::HandleClient sets hello.graphicsRenderer = CNA::getCurrentGraphicsRendererName(), a compile-time constant derived from the CNA_RENDERER_* macro that cmake/RendererSelection.cmake defines project-wide for the default identity only. In a multi-renderer build (CNA_MULTI_RENDERER), GraphicsRendererSelection::SetPreferred, the CNA_GRAPHICS_RENDERER environment variable or an enabled fallback chain can make the created renderer differ, and the Session view still shows the default. Single-renderer builds report correctly.

Source locations

Evidence

Checked by reading Agent.cpp, GraphicsRendererType.hpp, GraphicsRendererSelection.hpp and RendererSelection.cmake at 009d40f5. Not executed.

Focused reproduction

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

Current tests

NegotiatesProviderVersionAndCapabilities checks the provider version and capabilities, not graphicsRenderer; no Inspector test runs in a multi-renderer configuration.

Regression test

In a multi-renderer build: prefer a non-default identity, create a device, start the agent, connect, and expect the session renderer to equal GraphicsRendererSelection::GetActive().

Blast radius

Multi-renderer builds that use the Inspector, where the Session view misstates the renderer (for example after a fallback); metrics, events and resources are unaffected.

Workaround

Start the agent after the device exists and add the name of GraphicsRendererSelection::GetActive() to AgentConfiguration::metadata.

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

Known issues
Bug index