You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reading a preset without an Info chunk returns MetaInfo "" instead of null, so each read/write round trip adds an empty Info chunk #14
VstPresetFile finishes reading with new VstPreset(classId, component, controller, metaInfo ?? string.Empty, version) (EffectsHost.Plugin/VstPresetFile.cs:269).
That contradicts the documented contract of VstPreset.MetaInfo: null when the container has no such chunk, where an empty value is a different thing. It also contradicts the OptionalChunksRoundTrip test's summary ("reports their absence"). That test only asserts ControllerState is null, so the regression is not caught.
Repro
At 936acc2:
Write a preset with MetaInfo: null. The file is 77 bytes.
Read it back: MetaInfo == "".
Write it again. The file is now 97 bytes, because a zero-length Info chunk has been added.
A preset loaded and re-saved by the plugin therefore no longer matches the original bytes. A host or tool that treats "has an Info chunk" as meaningful sees a difference that the user never made.
Suggested fix
Pass metaInfo through without ?? string.Empty.
Add Assert.IsNull(restored.MetaInfo) to OptionalChunksRoundTrip.
Acceptance criteria
A preset written without meta info reads back with MetaInfo == null.
Priority: Low. A load and re-save adds a 20-byte empty Info chunk, so the file is no longer byte-identical. Audio and parameter state are unaffected, and it only matters to tools that treat the chunk's presence as meaningful.
Area / suggested assignment:EffectsHost.Plugin/VstPresetFile.cs:269, and the OptionalChunksRoundTrip test.
Notes: This is a trivial fix: drop ?? string.Empty and add Assert.IsNull(restored.MetaInfo). Also add a byte-equality round-trip assertion, so future chunk-handling changes can't regress it silently.
Activity
matt-edmondson commentedon Sep 29, 2026
Triage
Infochunk, so the file is no longer byte-identical. Audio and parameter state are unaffected, and it only matters to tools that treat the chunk's presence as meaningful.EffectsHost.Plugin/VstPresetFile.cs:269, and theOptionalChunksRoundTriptest.Notes: This is a trivial fix: drop
?? string.Emptyand addAssert.IsNull(restored.MetaInfo). Also add a byte-equality round-trip assertion, so future chunk-handling changes can't regress it silently.Generated by Claude Code