Bug 508576

Summary: Kdenlive crashes when creating sequence which includes audio clips
Product: [Applications] kdenlive Reporter: Bernhard <bf>
Component: Project Bin & ImportAssignee: Jean-Baptiste Mardelle <jb>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version First Reported In: 25.08.0   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Journal starting at the moment of clicking "create squence from selection"

Description Bernhard 2025-08-21 19:09:20 UTC
Created attachment 184322 [details]
Journal starting at the moment of clicking "create squence from selection"

SUMMARY
If I select several video clips, compositions and at least one audio clip from one of my audio tracks, Kdenlive will segfault. If I select the same without audio clips, it works.
I tried this several times with different clips and audio clips on different positions within the time line and the result was always the same.

STEPS TO REPRODUCE
1.  Select some video clips in the time line.
2.  Select one audio clip (e.g. some effect sound) from an audio track 
3.  Choose "Create sequence from selection" from the context menu.

OBSERVED RESULT
Some log output will generated (see attachment) and finally it segfaults.

EXPECTED RESULT
New sequence in the project bin.

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 25.04
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.3

ADDITIONAL INFORMATION
Kdenlive is compiled from source from the latest tag 25.08.0 and everything else works fine. I'm working on very large projects with 100s of clips, 22 tracks, filters, color correction and so on and everything else seems to work fine. Sequences also work btw as long as I do not include audio.
Comment 1 Jean-Baptiste Mardelle 2025-08-22 07:56:37 UTC
Thanks for your report. I cannot reproduce the issue following your steps.
Can you also reproduce with a new project having only 2-3 clips, or is it specific to your project ?
Comment 2 Bernhard 2025-08-25 16:26:30 UTC
I managed to reproduce it in a new project but I'm not sure yet what exactly causes it. I will try to work out the exact steps.
Comment 3 Bernhard 2025-08-25 16:46:31 UTC
Ok, here I did a screen recording of a simple example where you can see exactly what I did:
https://drive.google.com/drive/folders/1J9_lPSNO0adL0729QKOEejAqB5UyIRRu?usp=drive_link
Comment 4 Jean-Baptiste Mardelle 2025-08-26 09:40:58 UTC
Thanks a lot for the recording! I was able to reproduce and will work on it!
Comment 5 Jean-Baptiste Mardelle 2025-08-26 10:00:54 UTC
Git commit 7754888f9d4df1ffa00082c1a479bfe3e56affcc by Jean-Baptiste Mardelle.
Committed on 26/08/2025 at 10:00.
Pushed by mardelle into branch 'release/25.08'.

Fix crash on failed sequence creation

M  +1    -0    src/project/projectmanager.cpp

https://invent.kde.org/multimedia/kdenlive/-/commit/7754888f9d4df1ffa00082c1a479bfe3e56affcc
Comment 6 Jean-Baptiste Mardelle 2025-08-26 12:31:10 UTC
Git commit 636c0824b72a8c82da80fa781c3ebb423c89aff4 by Jean-Baptiste Mardelle.
Committed on 26/08/2025 at 12:29.
Pushed by mardelle into branch 'release/25.08'.

Fix create sequence from selection sometimes not working

M  +4    -4    src/timeline2/model/timelinefunctions.cpp

https://invent.kde.org/multimedia/kdenlive/-/commit/636c0824b72a8c82da80fa781c3ebb423c89aff4