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)?
23.10.07

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.

This issue still persists on v. 25.08.16 with Windows 11. When I have a couple of more of cuts and transitions (in the low dozens), ctrl+z / undo typically either lags (in the seconds) or freezes /crashes the program. (Same behavior via the history panel.)

Right now I’m working on trimming fat toward a 3 minute clip from 4:30 minutes of source, some 50+ cuts+transitions in total, and Shotcut freezes/crashes as a rule. Has crashed seven times now in the last 30 minutes of cutting work. Typically it behaves fine with the first couple of transitions — but as the file adds on bulk, it becomes increasingly broken. Hope we can get this fixed.

I’m finding with Shotcut version 25.11.2 that attempting to undo a trim (e.g. one created by pressing I or O) via Ctrl + Z takes much longer than expected and can leave my computer more or less responsive until the undo operation gets applied. I can undo it on my end via dragging the end of the clip, but perhaps this is a related issue? (I’m running Shotcut on Linux Mint with proxies activated and hvenc_nvenc/h264_nvenc hardware encoding.)