LMMS / LMMS/lmms

Undo in Song Editor Fails After Duplicating Multiple Midi Reigions

Open
#5,885 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C++
Stars
10.4k
Forks
1.3k
Avg merge
2d 13h
Merged PRs (30d)
7

Description

### Bug Summary
LMMS fails to to properly undo an operation where midi regions from two separate instrument tracks are duplicated.
This has also randomly caused crashes or instability.

#### Steps to reproduce
1. Create two instrument tracks next to each other in the song editor.
2. Create a Midi regions in each track and populate them with notes.
3. Select the multiple Midi regions simultaneously.
4. Use Ctrl+drag to duplicate the selected reigions to other positions in the tracks
5. Use Ctrl + Z to attempt an Undo

#### Expected behavior
The two duplicates are deleted.

#### Actual behavior
Only the duplicates in one of the instrument tracks are deleted.
A crash may occur depending on the instrument and project.

#### Screenshot
![bug1](https://user-images.githubusercontent.com/7609579/104942887-da6a1680-5a19-11eb-8eb7-c046998f8474.png)
![bug2](https://user-images.githubusercontent.com/7609579/104942886-d9d18000-5a19-11eb-8cc2-26f24a05ecf8.png)
![bug3](https://user-images.githubusercontent.com/7609579/104942884-d938e980-5a19-11eb-9e68-30c1a91379c3.png)
![bug4](https://user-images.githubusercontent.com/7609579/104942879-d807bc80-5a19-11eb-9160-345cc8d4ff95.png)

#### Affected LMMS versions
1.3.0 Alpha

#### Logs

Click to expand

Carla appears to be installed on this system at /usr/lib[64]/carla so we'll use it.

Jack appears to be installed on this system, so we'll use it.
Lv2 plugin SUMMARY: 95 of 192 loaded in 1550 msecs.
For details about not loaded plugins, please set
environment variable "LMMS_LV2_DEBUG" to nonempty.
Lv2 Plugins blacklisted: 2 of 192
If you want to ignore the blacklist (dangerous!), please set
environment variable "LMMS_IGNORE_BLACKLIST" to nonempty.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the Song Editor flow for selecting and Ctrl-dragging multiple MIDI regions, then trace how Ctrl+Z handles duplicates across two instrument tracks. Reproduce the issue with two adjacent instrument tracks and verify that undo removes both duplicates without a crash or instability.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.