Bug 368836 - git master:2016-09-15: Possible data loss when applying clip job to multiple clips
Summary: git master:2016-09-15: Possible data loss when applying clip job to multiple ...
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR critical
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-15 08:57 UTC by Evert Vorster
Modified: 2016-09-16 07:50 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Evert Vorster 2016-09-15 08:57:46 UTC
So, I have this bunch of clips that I want to slow down by exactly the same amount. 
I highlight all the clips I want to slow down, right-click and select the speed clip job. 
This method worked fine for adding proxies of the .mlt files I made before, so why not?

Anyways, a dialog pops up, saying that the intended output files exist, and as I had been creating .mlt files for some of the clips I did not read the dialog all that closely, and I just blindly clicked "overwrite". After several dialogs pops up, I realize I did not make that many .mlt files, and re-read the dialog that pops up. 

Apparently, rather than making an .mlt file as output, the clip job was overwriting the original clips. This does not happen when just one clip is selected. 

So, my own boneheadedness caused me some data loss, but I had the source files backed up anyways, so not too bad. 
However, the clip job should be making .mlt files and not be trying to overwrite the originals in all cases.

Reproducible: Always

Steps to Reproduce:
1.Select multiple clips in project bin
2.Right click and select clip jobs and "duplicate and change speed"
3.Set the desired speed. 
4. Dialog pops up, saying that the files already exist

Actual Results:  
By selecting multiple clip jobs the default output is not an .mlt file anymore, but the source file. 
If clicking overwrite on the dialog the original file is overwritten by a .mlt file that points to itself. 

Expected Results:  
Multiple .mlt files to be created with the effect applied inside. 

It's a bit of a corner case, but should be an easy fix.
Comment 1 Jean-Baptiste Mardelle 2016-09-15 09:08:55 UTC
Ouch, too bad. I will fix it tonight. Fortunately it's not such a widely used feature so let's hope not too many people use it. I will also add a safeguard to prevent such issue in the future
Comment 2 Evert Vorster 2016-09-15 09:17:21 UTC
No problem on my side, I have learned the hard way that backups are the way to go, and I am patient. At least with the speed clip job it is now possible to actually apply speed to clips in a consistent manner, and corruptions on the timeline is a thing of the past. Also, I get audio support which is an unexpected but welcome benefit. 

Poking at the issue a little more, it looks like when just one file is selected the clip job puts in a suggested filename with the .mlt extension, which is the proper thing to do. 

When having more than one file selected it just specifies the directory, and I have tried to add a .mlt extension in that directory, but then it just says that the .mlt files are invalid and removes them from the project. 

Thanks for implementing this feature. I'm sure I'll find more ways to break it in the future, I hope you don't mind too much!

-Evert-
Comment 3 Jean-Baptiste Mardelle 2016-09-15 16:59:49 UTC
Git commit 6883a671792763da469dd08531378031b05f13da by Jean-Baptiste Mardelle.
Committed on 15/09/2016 at 16:59.
Pushed by mardelle into branch 'master'.

Fix deletion of source clip when using new speed clip job, add safeguard

M  +4    -10   src/project/jobs/filterjob.cpp
M  +9    -3    src/project/jobs/meltjob.cpp

http://commits.kde.org/kdenlive/6883a671792763da469dd08531378031b05f13da
Comment 4 Evert Vorster 2016-09-16 07:50:30 UTC
Works perfectly, thanks for the quick fix.