Bug 504103

Summary: Extract Clip (shift + delete) on the last clip of the timeline leads to freeze
Product: [Applications] kdenlive Reporter: Ciro Santilli <ciro.santilli>
Component: Timeline & EditingAssignee: Jean-Baptiste Mardelle <jb>
Status: REPORTED ---    
Severity: normal CC: ciro.santilli
Priority: NOR    
Version First Reported In: 25.04.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Ciro Santilli 2025-05-12 14:54:48 UTC
STEPS TO REPRODUCE
1.  start new project, add a any clip to timeline (has to have found apprarently) E.g. I tested with this extremely minimal counter:

ffmpeg -lavfi "
color=white:480x480:d=3,
format=rgb24,
drawtext=
  fontcolor=black:
  fontsize=600:
  text='%{eif\:t\:d}':
  x=(w-text_w)/2:
  y=(h-text_h)/2[v];
sine=f=500:d=1[a1];
sine=f=1000:d=1[a2];
sine=f=2000:d=1[a3];
[a1][a2][a3]concat=n=3:v=0:a=1[a];
" -map '[v]' -map '[a]' count.mp4

2. Cut the clip in two with razor (shift + r) anywhere
3. Select the second (and here last) clip and shift + delete it

Doing just Delete without shift works fine, but I use the awesome shift + delete so often that sometimes I forget and freeze myself again and again.

OBSERVED RESULT

The clip remains on timeline, and after a few seconds kdenlive freezes and Ubuntu says "Kdenlive" is not responding.

EXPECTED RESULT

It gets deleted, no freeze.

SOFTWARE/OS VERSIONS
Ubuntu 24.10 with flatpack.
Comment 1 Ciro Santilli 2025-05-12 14:55:46 UTC
* 1. has to have Sound I meant
Comment 2 Ciro Santilli 2025-05-12 14:57:39 UTC
Terminal logs that show up after shift + delete:

-----
// SHOW KEYFRAMES:  true
-----
// SHOW KEYFRAMES:  true
// SETTING CLIP PROPERTIES:  QMap(("kdenlive:duration", "00:00:01:09")("kdenlive:maxduration", "34")("length", "34")("out", "34"))
==== ERROR INSERT ON NEGATIVE POS:  -7
clip insertion failed
// SETTING CLIP PROPERTIES:  QMap(("kdenlive:duration", "00:00:03:00")("kdenlive:maxduration", "75")("length", "75")("out", "75"))
REGISTRATION  11 ptr count 6
qml: loaded clip:  34 , ID:  11 , index:  1 , TYPE: 3
qml: loaded clip with Astream:  1
-----
// SHOW KEYFRAMES:  true
// SETTING CLIP PROPERTIES:  QMap(("kdenlive:duration", "00:00:01:09")("kdenlive:maxduration", "34")("length", "34")("out", "34"))
==== ERROR INSERT ON NEGATIVE POS:  -7
clip insertion failed
// SETTING CLIP PROPERTIES:  QMap(("kdenlive:duration", "00:00:03:00")("kdenlive:maxduration", "75")("length", "75")("out", "75"))
REGISTRATION  12 ptr count 6
qml: loaded clip:  34 , ID:  12 , index:  2 , TYPE: 3
qml: loaded clip with Astream:  1
REGISTRATION  11 ptr count 6
qml: loaded clip:  34 , ID:  11 , index:  1 , TYPE: 3
qml: loaded clip with Astream:  1