Bug 369505

Summary: Audio and video clips randomly moves in the timeline after mysterius duplication of clips.
Product: [Applications] kdenlive Reporter: emanuel
Component: User Interface & MiscellaneousAssignee: Jean-Baptiste Mardelle <jb>
Status: RESOLVED WORKSFORME    
Severity: critical CC: clintonthegeek, fritzibaby, kde-bugs, kolloom, OfficialJTanzanite, robert, terrajeanweaver, wegwerf-1-2-3
Priority: NOR Flags: fritzibaby: timeline_corruption+
Version First Reported In: 16.08.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: jumbled timeline

Description emanuel 2016-09-28 21:19:34 UTC
While editing in the timeline of Kdenlive with ungrouped and splitt audio and video channels (this is needed for complex edits), some clips will not move while being manipulated with the selection tool. The clips can not be moved before either cuted by the razor tool, then an undo comand and then use the select tool, or a save and restart of Kdenlive.

On restart, sometimes kdenlive will create a duplicate clip on the timeline, and sometimes the duplicates will move large cunks of clips on the timeline on the track the duplication have occured. This will lead other clips, behind the duplicate, to be out of sync. If one tries to manually sync the unsynced clips, often, the same problem ocurres again. I.e. the clips are not moveable with the selection tool. After a save and restart of Kdenlive, large amount of clips will be out of place on the timeline.

On other ocations, after a manual resync, the clips will seem to be in the correct place. But they will not appare synced on playback in the project monitor. On save and restart, the clips will have moved alot, duplicated themselvs in varius places, creating complete mayham on the timeline.

This problem will apeare frequently, but without any forshadowing. It might occure two times or more a day, with a working day of several houres. It can occure at the start of a working day, with plenty of ram avaliable or after houres of work. The problem also apears on small and large projects.

Reproducible: Sometimes

Steps to Reproduce:
1. Splitt several audio and video on a clip on the timeline.
2. Ungroup the video and audio clips, 
3. Rearange them into a sceen
4. At some point a clip will be unwilling to move.
5. Save and restart kdenlive.
6. The clip will have moved to the place designated before the restart. However there is a duplicate on the original place. The dublicate might have moved other clips that occupy space behind it on the timeline.
7. Delete the duplicated clip, and move unsynced clips into place. This might make one undo and move the clips alot inorder to sync the video and audio.
8. Sometimes after syncing the clips, audio and video will not be synced in playback on the project monitor.
9. Save and restart kdenlive.

Actual Results:  
On reopening kdenlive clips in the timeline are duplicated, unsynced and a complete mess. 

Expected Results:  
In order for kdenlive to be a semi- or full professional video editor, integrity of the timeline is an absolute must. No  unwarrented duplications should occure and clips should be on the place designated for them.

Kdenlive config: Mostly stock configuration. GPU acceleration not enabled. Using 4 cores for playback, multithreading not enabled. In other words, noen of the experimental features are enabled. Preview playback is used for the timeline.
Comment 1 Wegwerf 2016-10-08 16:46:47 UTC
Emanual, this kind of bug is ugly, and as I experienced it myself I can understand your sentiment. In order to track down such timeline corruption issues, we need a (minimized) example project, together with a concise description of the steps required to reproduce. There is no other way we can help you. I know from experience, as I sent in several such bug reports over time, where only the clear step list together with an example project helped the developers to fix those bugs. Thank you very much for your cooperation!
Comment 2 Clinton 2017-11-26 22:07:57 UTC
Created attachment 109068 [details]
jumbled timeline
Comment 3 Clinton 2017-11-26 22:13:25 UTC
I have the same issue, but figured it was an edge-case beacuse I've a 16 hours timeline. I assumed I was pushing the scalability limitations of the software with a 1 megabyte project file.

Loading and saving usually jumbles up some arbitrary section.

I've decided to use Kdenlive as a "sandbox" for my project, and then edit together what I piece together into smaller project files with a more traditional workflow.

If the problem is reproducible on a small scale, I'll submit the project file. But if the issue is a matter of scale and only large projects are vulnerable, then I'm happy to set up a Syncthing folder to transfer my project to any dev who wants a 19 gigabyte project with 306 files to reproduce the problem. My project is bigger now, but that's an older revision in which the problem still crops up.
Comment 4 Andrew Crouthamel 2018-09-28 02:37:21 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 emohr 2018-10-08 19:33:15 UTC
set to reported as it seems a matter of a big project
Comment 6 Clinton 2018-10-08 19:44:38 UTC
For what it's worth I am unable to load the large (16 hour) project into any of the test binaries for the 18.08 release, although one hasn't been released in a number of months.
Comment 7 Adam Spiers 2018-11-06 11:55:54 UTC
I have experienced similar weirdness which is hard to explain or describe.  I'm not sure if it will help you, but one thing which helped me a lot was to analyze my project in this great project analyzer tool:

    https://thediveo.github.io/kdenlive-project-analyzer/kdenlive-project-analyzer.html

It can warn if there are orphaned components or other inconsistencies within the project, and this can sometimes result in incorrect behaviour which is otherwise very hard to explain.  Coupled with this series of blog posts on project internals, I was able to fix some serious issues by hand-editing the project file's XML:

    https://thediveo-e.blogspot.com/2016/07/inside-kdenlive-projects.html
Comment 8 thompson 2019-03-05 00:44:42 UTC
This happended to me twice during editing videos in 18.12.1 under ubuntu.

But reproducing this would be pretty difficult, I can only confirm the duplication only happens upon restarting kdenlive and loading the project. 

My project was about 2 - 4 minutes during edit with about 80 clips, so I'd say the project length is irrelevant.
Comment 9 Robert 2019-05-21 20:00:24 UTC
Hi, Just an FYI, I've observed (and documented) a similar issue where the length in time of a clip seems to slowly 'drift' over time if you open/save as a project multiple times without making any project changes at all:

https://bugs.kde.org/show_bug.cgi?id=407778

This issue causes obvious changes to the placement of clips in the timeline and allows blank spots to creep in.  I think it might be related to 'clip profiles'?
Comment 10 Jean-Baptiste Mardelle 2020-05-01 08:22:29 UTC
This bug is outdated, all the timeline code was rewritten to avoid exactly this kind of issue.