How to reproduce:
- Open matrix editor
- Zoom in a lot (where you can distinctively see 1/64 notes)
- Open the pitch bend ruler
- Create a pitch bend point (e.g. around zero)
- In the pitch bend ruler press SHIFT
- A red line showing were a line will be created is shwn in the pitch bend ruler
- Press left mous button at the 'destination' of the line
- Screen (and Rosegarden) freezes and 100% or more CPU use is reported e.g. in top
Warning doesn't always happen... Not sure how to always reproduce, the zoom seems to be a factor but not 100% sure.
I wasn't able to get it to lock up completely, but drawing a line from 0 to 16384 or vice versa took over a minute to complete. It was quite solid when zoomed in, but wasn't an issue when zoomed out. It's as if it is generating more pitch bend events when zoomed in. Debug output seems to agree.
I'm seeing a lot of this in the debug output:
And this as well:
The super-slow scenario appeared to have the same number of addControlLine() lines, but massively more addControlItem() lines. This is probably wrong.
At the very least, we should pop up a progress dialog. We might also limit the number of events generated.
That code is just something I banged together trying to get a broken feature working again during the Qt4 rewrite. That was probably a solid 10 years ago, and I have little memory of the thought process. I do remember being aware of how crap it was. I probably put it in the fix it when somebody complains category, which would be now. I doubt the code I kludged together was very sophisticated.
Hi, thanks for looking into this and happy new year :-)
Not sure if this helps but my work around to achieve what I was trying to do and which always works flawlessly (even with other controllers) was to create a note of the desired duration selected and then do 'insert series of pitch bends' from the menu. I wonder if the same kind of behaviour could be achieved when working graphically.
That definitely helps. It looks like we should pull the PitchBendSequenceDialog functionality out into new commands that can be used by the graph. That gives us consistency and less code to maintain.
Last edit: Ted Felix 2020-01-08
Should be fixed in [r15705].
Related
Commit: [r15705]