"Bad" instruments lose their data after saving ("dummy instrument")
System Information
Arch Linux x86_64
LMMS Version(s)
dff0fbd67feb18c291640e9a6640305b6a514d59, probably
Most Recent Working Version
No response
Bug Summary
Failing to load an instrument poisons a track such that all the instrument data is lost. Saving the file when that happens cements it.
Relevant discussion: bug report in discord server in respect to the Mallets plugin.
Expected Behaviour
The instrument data should be kept in case the next project load manages to load the plugin.
Steps To Reproduce
Create a LMMS project with a single instrument track (pick any plugin; I picked Sf2Player);
Save it as a
.mmpfile (for ease of editing);Open the file it and locate the instrument data inside the track; in the case of sf2player it should be something like this:
<instrument name="sf2player">
<sf2player chorusNum="0.69999999" gain="1" reverbRoomSize="0.5" chorusSpeed="0.28999999" patch="0" reverbDamping="0.5" reverbLevel="0.69999999" chorusLevel="0.60000002" reverbOn="0" src="usersoundfont:GeneralUser GS v2.0.3.sf2" chorusDepth="4.25" bank="0" reverbWidth="0.80000001" chorusOn="0">
<key/>
</sf2player>
</instrument>Change the instrument
nameattribute to something invalid - e.g.<instrument name="sf2player-bad">, then save the file.Open the project again on LMMS - it will (reasonably) error out saying the instrument wasn't found / couldn't be loaded:
The track thus will have no instrument:
Save the project and close it.
Open it again - now, it will complain about the "dummy" instrument not existing.
If you open the file in an editor again and locate the instrument tag, you will see it is now a dummy instrument, and all the instrument data has been lost:
<instrument name="dummy">
<dummyinstrument/>
</instrument>This is obviously bad - if an instrument fails to load (be it for whatever reason), and the user saves the project, all the instrument data is lost!
Logs
(Not relevant)
Screenshots / Minimum Reproducible Project
(See previous sections)
Please search the issue tracker for existing bug reports before submitting your own.
- I have searched all existing issues and confirmed that this is not a duplicate.
Source: LMMS/lmms