Using undo after dragging transitions sometimes cause crashes

What is your operating system?
Windows 11 Home 22H2
Ubuntu 22.04.3 LTS (shotcut installed from from Snap Store)

What is your Shotcut version (see Help > About Shotcut)?

Can you repeat the problem? If so, what are the steps?
I sometimes get this by when dealing with transitions and using undo. I managed to reproduce it below, although it’s an unrealistic scenario I believe it’s the same bug. I’ve encountered these crashes in older versions of shotcut as well.

  1. Start a new project
  2. Add two video clips to the timeline
  3. Place the second clip so it overlaps the first one
  4. Drag the beginning of the transition all the way to the end of the timeline
  5. Drag the beginning of the transition again to the end of the timeline
  6. Click undo twice
  7. Move the clip on bottom track

First press of undo will do nothing. The second will cause a new track to appear with no title containing a video clip titled V1. The track cannot be deleted. If the video clip on bottom track is moved, the software will crash.

I confirm your bug. Even if the project is closed without saving, shotcut begins to behave inappropriately.

This is fixed for the next release.