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
Describe the bug
While experimenting with custom instruments for a song I'm working on, I noticed a weird bug when deleting them. It completely bypasses the confirm dialog when deleting a custom instrument, which is very odd even by itself; it also makes all the instances of that instrument invisible, and performing any action on the selection (besides moving it) causes NBS to crash.
To Reproduce
Steps to reproduce the behavior:
Make a new song (this definitely can be done on an existing song, but with a bug, this isn't the best idea!)
Go to the instrument settings and make a new custom instrument
Click OK to dismiss the menu, and make a new note in the new custom instrument
Select the note you just created, and without deselecting the note go to the instrument settings and delete the custom instrument
Observe how the warning is bypassed and how any action (including deselecting it and playing it) will crash NBS
Expected behavior
I would expect NBS to clear the selection of the deleted notes and to warn about deleting notes contained in the current selection. Most importantly, to not crash too :D
Additional context
I highly suspect the reason this is happening is that the check for deleting a custom instrument isn't taking into account notes within the user's selection; this also explains why it isn't displaying the warning about deleting notes since there aren't any other notes in that instrument outside the selection.
Of course, since the crash doesn't occur until it tries to "save" the deleted notes into memory (save as in commit the selection changes into the memory song copy) if you delete the selection with the right-click context menu or the delete key NBS won't crash because the deleted notes actually get removed. However, I wouldn't consider this a complete workaround since the selection could contain not deleted notes, which would be removed as well.
The text was updated successfully, but these errors were encountered:
Related to #181, which was fixed by showing a confirmation dialog and deleting the notes with that instrument.
But notes in the selection are not deleted, apparently :)
Thanks for reporting!
Related to #181, which was fixed by showing a confirmation dialog and deleting the notes with that instrument. But notes in the selection are not deleted, apparently :)
ah, I missed that issue, I definitely would have referenced that!
Thanks for reporting!
no problem, happy to help :D
Describe the bug
While experimenting with custom instruments for a song I'm working on, I noticed a weird bug when deleting them. It completely bypasses the confirm dialog when deleting a custom instrument, which is very odd even by itself; it also makes all the instances of that instrument invisible, and performing any action on the selection (besides moving it) causes NBS to crash.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect NBS to clear the selection of the deleted notes and to warn about deleting notes contained in the current selection. Most importantly, to not crash too :D
Additional context
I highly suspect the reason this is happening is that the check for deleting a custom instrument isn't taking into account notes within the user's selection; this also explains why it isn't displaying the warning about deleting notes since there aren't any other notes in that instrument outside the selection.
Of course, since the crash doesn't occur until it tries to "save" the deleted notes into memory (save as in commit the selection changes into the memory song copy) if you delete the selection with the right-click context menu or the delete key NBS won't crash because the deleted notes actually get removed. However, I wouldn't consider this a complete workaround since the selection could contain not deleted notes, which would be removed as well.
The text was updated successfully, but these errors were encountered: