Created attachment 165210 [details] crash-project-and-record-screen SUMMARY If there's overlaying subtitles in timeline, Kdenlive crashes when cutting at the position. (Watch the screen recording video in attachment) STEPS TO REPRODUCE 1. Create project and add a video clip to timeline 2. Add some subtitles. Make two overlays each other 3. Select all subtitles, group them 4. Select everything in timeline (the grouped subtitles and the video clip), group them again 5. Select the video and set time point at where the overlaying is 6. Right-click video clip and click "Cut Clip" Download the project file in attachment to reproduce. Notice: if you want to reproduce, remember to delete cache folder everytime before opening the project, because cache will make subtitle timeline looks different OBSERVED RESULT Crash EXPECTED RESULT SOFTWARE/OS VERSIONS Tested with: 1. Kdenlive latest git branch 23.08 ci build AppImage 2. Kdenlive git master ci build AppImage ADDITIONAL INFORMATION Terminal log: Editing existing subtitle in model srt/vtt/sbv file import Saving subtitle filter: "/tmp/1706185988931.srt" Deleting subtitle in model No Subtitle at pos in model Segment fault
Thanks for the report. This happens because the way subtitles are implemented, two subtitles cannot start at the same position (not sure it is even allowed in the srt specs). Cutting overlapping subtitles creates 2 subtitles starting at the same position, causing the crash. Not sure what is the best fix here: don't allow the cut, cut only one of the subtitles.. WIll think about it, ideas welcome.
Git commit 281972a5c12d808aa3664c5273b32ec3462c090e by Jean-Baptiste Mardelle. Committed on 26/01/2024 at 06:30. Pushed by mardelle into branch 'release/24.02'. Fix crash cutting grouped overlapping subtitles. Don't allow the cut anymore, add test Fix cut clips on all tracks not cutting subtitles M +34 -7 src/timeline2/model/timelinefunctions.cpp M +2 -10 src/timeline2/view/timelinecontroller.cpp M +15 -0 tests/subtitlestest.cpp https://invent.kde.org/multimedia/kdenlive/-/commit/281972a5c12d808aa3664c5273b32ec3462c090e
Git commit aa64e82c9e6d652f7581f37da800ee38df3a696f by Jean-Baptiste Mardelle. Committed on 26/01/2024 at 06:33. Pushed by mardelle into branch 'release/23.08'. Fix crash cutting grouped overlapping subtitles. Don't allow the cut anymore, add test Fix cut clips on all tracks not cutting subtitles M +34 -7 src/timeline2/model/timelinefunctions.cpp M +2 -10 src/timeline2/view/timelinecontroller.cpp M +15 -0 tests/subtitlestest.cpp https://invent.kde.org/multimedia/kdenlive/-/commit/aa64e82c9e6d652f7581f37da800ee38df3a696f