Crash after ~10 undo operations

  • What is your operating system?

Linux/EndeavourOS/KDE Plasma
Shotcut installed via system package manager (pacman)

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

26.2.26

(additionally tested with .appImage official Shotcut download)

  • Can you repeat the problem? If so, what are the steps?

Create a new project. Drag ~20 clips into it. Create short transitions between the clips by dragging each clip over it’s neighbouring clip so they overlap by a short amount. Once all clips have transitions, undo it all by pressing CTRL-z repeatedly. The crash usually can occur within 10 undo operations, although sometimes takes more. Running within gdb, and after downloading a lot of debug info, I counted around 20 undo operations before it crashed.

edit: project info
Project is 2560x1440p 50fps, same as clips, 720p proxy. Clips pre-cropped using LosslessCut from recordings taken from a GoPro Hero 9.

In this backtrace, I opened a ‘test’ project, containing 20 clips, which I then overlaped to create the transitions before proceeding to undo. It crashed on the 2nd or 3rd undo.

(gdb) bt
#0  QAbstractItemModelPrivate::invalidatePersistentIndexes (this=this@entry=0x5555571606a0) at /usr/src/debug/qt6-base/qtbase/src/corelib/itemmodels/qabstractitemmodel.cpp:726
#1  0x00007ffff4ff6d4e in QAbstractItemModel::endResetModel (this=this@entry=0x55555722ae20) at /usr/src/debug/qt6-base/qtbase/src/corelib/itemmodels/qabstractitemmodel.cpp:3441
#2  0x00005555558ce8cb in MultitrackModel::reload (asynchronous=<optimized out>, this=0x55555722ae20) at /usr/src/debug/shotcut/shotcut/src/models/multitrackmodel.cpp:3609
#3  MultitrackModel::reload (this=0x55555722ae20, asynchronous=<optimized out>) at /usr/src/debug/shotcut/shotcut/src/models/multitrackmodel.cpp:3601
#4  0x00007ffff4dd4614 in QObject::event (this=<optimized out>, e=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:1478
#5  0x00007ffff7302450 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55555722ae20, e=0x55556773bec0) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3276
#6  0x00007ffff4d76c98 in QCoreApplication::notifyInternal2 (receiver=0x55555722ae20, event=event@entry=0x55556773bec0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1109
#7  0x00007ffff4d77070 in QCoreApplication::sendEvent (receiver=<optimized out>, event=0x55556773bec0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1549
#8  QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x555555c26b40) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1904
#9  0x00007ffff5075d98 in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1757
#10 postEventSourceDispatch (s=0x555555c32270) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246
#11 0x00007ffff4515f4d in g_main_dispatch (context=0x7fffe8000f00) at ../glib/glib/gmain.c:3565
#12 0x00007ffff4517617 in g_main_context_dispatch_unlocked (context=0x7fffe8000f00) at ../glib/glib/gmain.c:4425
#13 g_main_context_iterate_unlocked (context=context@entry=0x7fffe8000f00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4490
#14 0x00007ffff4517825 in g_main_context_iteration (context=0x7fffe8000f00, may_block=1) at ../glib/glib/gmain.c:4556
#15 0x00007ffff5072222 in QEventDispatcherGlib::processEvents (this=0x555555c32200, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
#16 0x00007ffff4d845d6 in QEventLoop::processEvents (this=0x7fffffffde90, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:108
#17 QEventLoop::exec (this=0x7fffffffde90, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:197
#18 0x00007ffff4d7a311 in QCoreApplication::exec () at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1452
#19 0x00007ffff72fea6a in QApplication::exec () at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:2546
#20 0x0000555555648cd8 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/shotcut/shotcut/src/main.cpp:482

In this backtrace, I opened an existing project I had been working on, but only created 10 transitions before hitting undo. Crashed again on 2nd or 3rd undo. Notably different to above with reference to undo handling code

(gdb) bt
#0  0x00007ffff4feb4ce in QAbstractItemModelPrivate::rowsAboutToBeInserted (this=0x55555705e1f0, parent=..., first=<optimized out>, last=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/itemmodels/qabstractitemmodel.cpp:873
#1  0x00007ffff4ff5d68 in QAbstractItemModel::beginInsertRows (this=<optimized out>, parent=<optimized out>, first=<optimized out>, last=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/itemmodels/qabstractitemmodel.cpp:2906
#2  0x00005555556f9d4d in UndoHelper::undoChanges (this=0x55556741ff90) at /usr/src/debug/shotcut/shotcut/src/commands/undohelper.cpp:216
#3  0x00005555556deb9d in Timeline::AddTransitionCommand::undo (this=0x55556741ff50) at /usr/src/debug/shotcut/shotcut/src/commands/timelinecommands.cpp:1298
#4  0x00007ffff62b216c in QUndoStack::undo (this=0x555556792c30) at /usr/src/debug/qt6-base/qtbase/src/gui/util/qundostack.cpp:761
#5  0x00007ffff4ddc9c2 in QtPrivate::QSlotObjectBase::call (this=0x55555606e860, r=<optimized out>, a=0x7fffffffd760, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
#6  doActivate<false> (sender=0x5555561deb70, signal_index=7, argv=0x7fffffffd760) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4371
#7  0x00007ffff622111d in QMetaObject::activate<void, bool> (sender=<optimized out>, mo=<optimized out>, local_signal_index=<optimized out>, ret=<optimized out>, sender=<optimized out>, mo=<optimized out>, local_signal_index=<optimized out>, ret=<optimized out>)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs.h:319
#8  QAction::triggered (this=<optimized out>, _t1=<optimized out>) at /usr/src/debug/qt6-base/build/src/gui/Gui_autogen/include/moc_qaction.cpp:374
#9  QAction::activate (this=0x5555561deb70, event=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qaction.cpp:1106
#10 0x00007ffff6224cfa in QAction::event (this=0x5555561deb70, e=0x7fffffffd980) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qaction.cpp:1048
#11 QAction::event (this=0x5555561deb70, e=0x7fffffffd980) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qaction.cpp:1031
#12 0x00007ffff7302450 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x5555561deb70, e=0x7fffffffd980) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3276
#13 0x00007ffff4d76c98 in QCoreApplication::notifyInternal2 (receiver=0x5555561deb70, event=0x7fffffffd980) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1109
#14 0x00007ffff4d76cdd in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1549
#15 0x00007ffff62345e1 in QShortcutMap::dispatchEvent (this=<optimized out>, e=0x7fffffffda30) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qshortcutmap.cpp:606
#16 0x00007ffff5e28094 in QShortcutMap::tryShortcut (this=0x555555c30920, e=0x7fffffffda30) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qshortcutmap.cpp:310
#17 QWindowSystemInterface::handleShortcutEvent (window=<optimized out>, timestamp=<optimized out>, keyCode=90, modifiers=..., nativeScanCode=52, nativeVirtualKey=122, nativeModifiers=4, text=..., autorepeat=false, count=1)
    at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:453
#18 0x00007ffff5daab82 in QGuiApplicationPrivate::processKeyEvent (e=0x555567181d10) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qguiapplication.cpp:2613
#19 0x00007ffff5e3528c in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1117
#20 0x00007ffff63378f4 in userEventSourceDispatch (source=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:39
#21 0x00007ffff4515f4d in g_main_dispatch (context=0x7fffe8000f00) at ../glib/glib/gmain.c:3565
#22 0x00007ffff4517617 in g_main_context_dispatch_unlocked (context=0x7fffe8000f00) at ../glib/glib/gmain.c:4425
#23 g_main_context_iterate_unlocked (context=context@entry=0x7fffe8000f00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4490
#24 0x00007ffff4517825 in g_main_context_iteration (context=0x7fffe8000f00, may_block=1) at ../glib/glib/gmain.c:4556
#25 0x00007ffff5072222 in QEventDispatcherGlib::processEvents (this=0x555555c32200, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
#26 0x00007ffff4d845d6 in QEventLoop::processEvents (this=0x7fffffffde90, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:108
#27 QEventLoop::exec (this=0x7fffffffde90, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:197
#28 0x00007ffff4d7a311 in QCoreApplication::exec () at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1452
#29 0x00007ffff72fea6a in QApplication::exec () at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:2546
#30 0x0000555555648cd8 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/shotcut/shotcut/src/main.cpp:482
(gdb) 


Let me know if there’s any other information I can provide of help or other actions to perform.