Menu

#1571 Creating pitch bend line in matrix causes 100% CPU use

None
closed
1
2020-04-20
2019-12-24
Lorenzo
No

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.

Related

Bugs: #1573

Discussion

  • Ted Felix

    Ted Felix - 2020-01-03

    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:

    [ControllerEventsRuler] addControlLine(): intermediate value:  164
    [ControllerEventsRuler] addControlLine(): intermediate value:  187
    ...
    

    And this as well:

    [ControlRuler] addControlItem(): ControlItem added:  55ab5a6409d0
    [ControlRuler] addControlItem(): ControlItem added:  55ab5a0f5810
    ...
    

    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.

     
  • D. Michael McIntyre

    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.

     
  • Lorenzo

    Lorenzo - 2020-01-05

    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.

     
    • Ted Felix

      Ted Felix - 2020-01-08

      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
  • Ted Felix

    Ted Felix - 2020-02-10
    • status: open --> feedback
    • assigned_to: Ted Felix
     
  • Ted Felix

    Ted Felix - 2020-02-10

    Should be fixed in [r15705].

     

    Related

    Commit: [r15705]

  • Ted Felix

    Ted Felix - 2020-04-20
    • labels: --> matrix, ruler, comtroller, pitchbend
    • status: feedback --> closed
     
  • Ted Felix

    Ted Felix - 2020-04-20
    • labels: matrix, ruler, comtroller, pitchbend --> matrix, pitchbend, controller, rulers
     

Log in to post a comment.