CNA-VGAP-006: Media paths without tests: the natural song end on SDL3_mixer, the failed visualization install and SavePicture's IOException
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 3b43bd86; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.
The song-ended callback path on the default SDL3 audio, the visualization branch where no tap can be installed and SavePicture's write-failure exception are implemented but untested.
- Identifier
CNA-VGAP-006- Category
- Verification gap
- Subsystem
- Audio & media
- Status
- Narrowed (partially fixed; describes only what survives)
- Verified against
- CNA
3b43bd86(3b43bd8687ed46523d873f9bec4b32bd8481dcb5) - Evidence basis
- Source-verified: read at TARGET, not executed
- Tests touching this area
- Yes: see Current tests
- Affected contract
- MediaPlayer::Update end-of-song handling, MediaPlayer::setIsVisualizationEnabledProperty and MediaLibrary::SavePicture
Expected behaviour
Each behaviour a game relies on has at least one test in the default configuration (SDL3 audio).
Actual behaviour at TARGET
- Natural song end on SDL3_mixer.
OnMusicTrackStoppedsets the ended flag from the audio thread and Update advances, stops or repeats. The only test that lets a song finish,MediaPlayerTest.Mp3AndFlacSongsPlayThroughCnasOwnMixerToTheirEnd, is compiled only for ALSA audio. - Visualization without a tap. The comment on
VisualizationEnabledStateStaysConsistentWithGetVisualizationDatastates that the suite always has a dummy SDL device, so the no-mixer and failed-install branches ofsetIsVisualizationEnabledPropertyare correct by construction only. SavePicturefailure.MediaLibrary::SavePicturethrowsSystem::IO::IOExceptionwhen the store returns no path. The store's name-sanitising and empty-root cases are tested at store level (SavedPictureStoreTests.cpp), but no test drives the public method into the exception.
Fixed since first recorded: MediaLibrary::Dispose now makes its properties and SavePicture throw ObjectDisposedException, as XNA does (45f704c04, CNA-DEMOS-ISSUE-098), with new MediaLibrary and collection tests.
Source locations
modules/media/src/Xna/MediaPlayer.cpp— OnMusicTrackStopped, Update, setIsVisualizationEnabledPropertymodules/media/tests/Microsoft/Xna/Framework/Media/MediaPlayerTests.cpp— Mp3AndFlacSongsPlayThroughCnasOwnMixerToTheirEnd (ALSA only); the visualization commentsmodules/media/src/Xna/MediaLibrary.cpp— MediaLibrary::Dispose; MediaLibrary::SavePicturemodules/media/tests/Microsoft/Xna/Framework/Media/MediaLibraryTests.cpp— DisposeMarksLibraryDisposed; the SavePicture casesmodules/media/tests/CNA/Internal/Media/SavedPictureStoreTests.cpp— store-level sanitising and empty-root cases
Evidence
Checked by reading the test sources at 3b43bd86; no test was run. Nothing in these paths is known to be wrong; the gap is evidence.
Independently observed as a separate finding (merged): Every media test runs with a dummy SDL audio device, so GetMixer always succeeds and the no-mixer and failed-install branches of setIsVisualizationEnabledProperty are correct only by construction.
Independent re-verification: Checked by reading the test sources at 3b43bd86; no test was run. Nothing in these paths is known to be wrong; the gap is evidence. The pure-C smoke tests under modules/c-api/tests/pure_c are registered with ctest (CApi_MediaLibrarySmoke, CApi_MediaPlayerSmoke) and were not counted by the entry; they do not let a song finish or drive SavePicture to an IOException.
Re-verified at c6dec91f: 45f704c04 guarded every MediaLibrary property and both SavePicture overloads with ThrowIfDisposed and added tests for the refusals; the song-end, visualization and SavePicture failure paths are still untested. Not executed.
Focused reproduction
No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.
Current tests
As listed above: the ALSA-only song-end case, the visualization round-trip cases with a working device, and the successful and null-stream SavePicture cases.
Regression test
A short-fixture song played with SDL_AUDIODRIVER=dummy until Update reports Stopped (and the next song with repeat on); a visualization test with a forced mixer-creation failure (the mixer's test override hooks allow it); a SavePicture test against an unwritable pictures root expecting IOException.
Blast radius
Games that rely on songs ending (playlists, repeat) on the default SDL3 audio, on visualization data on headless or audio-less machines, or on SavePicture error handling.
Workaround
No workaround is known.
Related pages
The same subject is explained at several altitudes. These are the neighbouring pages at each one.
- Tests and validation
- Test architecture: change recipes
- Known issues
- Verification gap index