Crash via deleting dragged keypoints in NumberSequence and ColorSequence widgets

I think this is just a nullptr issue, otherwise worst-case a double-free.
It’s possible to crash Studio with NumberSequence and ColorSequence widgets by doing the following:

Reproduction steps

  • Open a NumberSequence or ColorSequence widget.
  • Create a keypoint and drag it around.
    • For the ColorSequence widget, you must assign a non-white color to cause the crash.
  • Without releasing the mouse button while dragging the keypoint, move the mouse outside of the plotting area.
  • While still dragging the keypoint, right click outside of the plotting area without releasing the left mouse button (Eg. on the viewport, on a widget button, on empty space in the widget).
    • Your mouse should be stuck to the keypoint now, and you don’t need to hold down left mouse button anymore.
  • Click on the Delete button to delete the keypoint stuck to your mouse.

For the NumberSequence widget:

  • Attempt to close the widget, Studio will crash.

For the ColorSequence widget:

  • Notice that the starting keypoint will now snap to your mouse if you move your mouse back over the plotting area.
  • Do not click into the plotting area.
  • Click Reset and close the widget, Studio will crash.
    • If Studio did not crash, you didn’t set a color for the keypoint that was deleted.

Demonstration of issue for NumberSequence widget:

https://gfycat.com/EqualOnlyIvorybackedwoodswallow

Demonstration of issue for ColorSequence widget:

https://gfycat.com/PertinentSecondHuman

Other Notes

If you click into the plotting area on a ColorSequence widget after the starting keypoint has snapped to your mouse, you will set the keypoint there. You can then create new keypoints behind the starting keypoint that you can drag to negative time points.

This doesn’t seem to have any repercussions, and doesn’t set the property.

image

2 Likes