https://bugs.kde.org/show_bug.cgi?id=407778
Bug ID: 407778 Summary: Saved Project File Track Times Change Randomly Causing 'Invalid clip producer4 on track playlist at ...' Product: kdenlive Version: 19.04.0 Platform: Appimage OS: Linux Status: REPORTED Severity: major Priority: NOR Component: Video Display & Export Assignee: j...@kdenlive.org Reporter: rob...@robertelder.org Target Milestone: --- SUMMARY Project file corruption due to random changes in clip lengths. STEPS TO REPRODUCE 1. Create project. 2. Edit videos/clips, then save project. 3. Open project to continue editing. OBSERVED RESULT 'Invalid Clip' errors are shown and clips are removed from project. Track times have changed in project files that stop working even when no edits were performed based on last 'good' saved project file. EXPECTED RESULT No invalid clip errors. Using latest release of .appimage file... lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic plasmashell --version plasmashell 5.12.7 kf5-config --version Qt: 5.9.5 KDE Frameworks: 5.44.0 kf5-config: 1.0 Additional information about my system can be found at: https://github.com/mltframework/mlt/issues/445 ADDITIONAL INFORMATION Hi, my goal was simply to edit a quick video with kdenlive, but I've found myself chasing the source of a project corruption bug for the past week. I was using the latest appimage build and I did some tests with mlt (see below). This bug is extremely frustrating because it has happened several times after I've put a few hours into editing a real project. The version of kdenlive I used was: md5sum kdenlive-19.04.1b-x86_64.appimage f0ab2ecf3f606e1f1fc36e2a3929f9f7 kdenlive-19.04.1b-x86_64.appimage I have include a .tar archive that contains all iterations of my project files from scratch, kdenlive caches, and executable stdout and sterr outputs. I also have screenshots of the problem, and the source video files I was editing for download here at: http://www.robertelder.ca/kbugreport.tar (1.4GiB) Pay special attention to the following project files: second-kdenlive-bug/good16.kdenlive second-kdenlive-bug/bad17.kdenlive second-kdenlive-bug/bad18.kdenlive These 3 files are supposed to represent the *EXACT SAME* project (just opening in kdenlive, then immeditely 'save as' from previous), but if you diff them you'll note the track times and lengths are different. I think is causing the 'corruption' possibly due to an impossible constraint? For some reason, this change seems to happen more often if I open the project from a desktop shortcut by double clicking on the project file. The worst part is that the open will be *successful* and everything will look normal, but then saving the project will save the corruption to disk. On the next open, saved work will be lost and not importable. At one time I thought I could avoid the bug by only launching from command line then doing project open, but I lost another project file to that as well. The changes and 'corruptedness' seems to have a random component since this morning I was not able to open 'bad17.kdenlive' without errors (note that bad17 has changed times from good16.kdenlive). However, I not seem to be able to open it, but I then just re-saved it as bad18.kdenlive immediately after opening. Again, bad18.kdenlive has changed track times and is visibly corrupted with 'Invalid' tracks when opening it. I also see a difference in relative/absolute paths which I don't think causes a problem, but I'm not sure why that changes. The folder 'kdenlive-bug' is a more minimal example of the bug, but the saved files show what happens when you save the file after the 'Invalid' clips have been removed. This one is I'm less concerned about because it doesn't seem to result in a silently corrupted saved project file that you walk away from and assume it's fine till you open it. Note that the phrase 'SUSPICIOUS: we weren't expecting a producer when parsing the timeline' is found the the executable output multiple times. Related? Other things to note in save session output: qml: keyframe model changed............ qml: loaded clip: 26245 , ID: 12 , index: 3 , TYPE: AV qrc:/qml/Clip.qml:164: TypeError: Cannot call method 'reload' of null I ran kdenlive in the following different ways: # When starting a new project ./kdenlive-19.04.1b-x86_64.appimage # This is how I recored the session output for debugging purposes. ./kdenlive-19.04.1b-x86_64.appimage good1.kdenlive > session3_output.txt 2>&1 # I also used the following /usr/share/applications/kdenlive.desktop entry so I could double click on project files: [Desktop Entry] Exec=/home/robert/kdenlive-bug/kdenlive_hook.sh %F Name=kdenlive NoDisplay=false Terminal=true Type=Application # The hook script above is included in this submission. It it just a hook to log the kdenlive output. Note that both projects were located at the location '/home/robert/kdenlive-bug' when doing this experimenting. The 'second-kdenlive-bug' should be renamed to 'kdenlive-bug' if you want to reproduce my steps. I also have included: - Saved kdenlive caches before and after I encountered the error with this project. - Saved kdenlive executable output for every editing session with kdenlive. - The source video and project file history from the afflicted projects. I followed the troubleshooting guide which notes that I should check my ffplay output (which works) and test out playing a file with 'melt'. I do experience problems doing simple things like 'melt color:red' on the command line (I don't see any red), and I filed a bug in the mlt repo: https://github.com/mltframework/mlt/issues/445 I received a response from Dan Dennedy suggesting that the problem wasn't in mlt, but that I should instead look into a source of corruption in the kdenlive project saved files, which I believe I may have found. Other notes: - A couple times I saw 'No profile found for clip' when adding one of the clips. This only happens *sometimes* although most of the time it doesn't appear at all when adding to project. Related? Screenshot included. Please let me know if you'd like me to compile and test a special branch, or add some debug printf statements and return the output or something. I have been compilling different versions/combinations of mlt/kdenlive from source for the past week so I'm starting to get familiar with the process. There doesn't seem to be any good alternative video editors for Linux, so at the moment fixing this bug seems to be the only way that I'll be able to get my video editing done. -- You are receiving this mail because: You are watching all bug changes.