CNA-VGAP-006: Media paths without tests: the natural song end on SDL3_mixer, the failed visualization install, MediaLibrary accessors after Dispose 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 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 song-ended callback path on the default SDL3 audio, the visualization branch where no tap can be installed, MediaLibrary disposal semantics and SavePicture's write-failure exception are implemented but untested.
- Identifier
CNA-VGAP-006- Category
- Verification gap
- Subsystem
- Audio & media
- Status
- Open
- Verified against
- CNA
009d40f5(009d40f5dd085c4e674d3479675fac84b12b3e0a) - 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, MediaLibrary::Dispose 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. MediaLibrary::Dispose. It only setsisDisposed_; the collection accessors do not consult it.MediaLibraryTestFixture.DisposeMarksLibraryDisposedchecks the flag and nothing else; the pure-CCApi_MediaLibrarySmokeadditionally pins a repeated dispose and thatcna_media_library_get_songsstill succeeds on a disposed library, but no test pins the other accessors.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.
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 009d40f5; no test was run. Nothing in these paths is known to be wrong; the gap is evidence. MediaLibrary::Dispose not guarding its accessors is recorded as observed, not judged against XNA here.
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 009d40f5; 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. MediaLibrary::Dispose not guarding its accessors is recorded as observed, not judged against XNA here.
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, the dispose-flag case 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 MediaLibrary test that pins what accessors do after Dispose; 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, on MediaLibrary disposal, 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