Project file wiped, no auto-saves

What is your operating system?
Pop!_OS 22.04 LTS

What is your Shotcut version (see Help > About Shotcut)? Is it 32-bit?
22.09.23, Snap

Can you repeat the problem? If so, what are the steps?
I opened and closed shotcut a few times in denial hoping that the auto-save dialogue would come up, to no avail. So i’m not positive the log would be of much use.
Nonetheless, here is my log file: https://files.catbox.moe/a9sx9e
And (what’s left of the) project file: https://files.catbox.moe/emzwym.mlt

While editing a project that began to get a bit large and intricate, i had played back a portion of the video which got very intense with the zoom effect (~1000%), shotcut gave a warning that it was running out of memory as the playback began to chug. Shotcut was in the process of crashing before i could click any of the dialogue options. I went to close other processes so that i could free up some memory, and then save the project. Unfortunately, even after doing this, Shotcut refused to respond. I unfortunately do not recall if i was able to click the save dialogue option or not, and I’m fairly certain i force closed shotcut after waiting to see if the freeze would resolve. I took this as a sign to take a break and come back later.
Coming back maybe an hour later, there was no auto-save restore dialogue upon opening shotcut, and clicking on the project from my recents list gave me a project which was completely blank. I couldn’t get shotcut to show the app data directory (the option for this under the settings menu does nothing), but if it’s ~/.local/share/Meltytech/shotcut, there was nothing at all in the auto-save folder.
Inspecting the .mlt that shotcut did leave behind, it says the project is a bit over 4 minutes in length, which I think is odd as in reality the project was closer to ~20 minutes in length with all the leftover clips at the end, and even highly edited past the 10m mark. Edit: I believe the time the project file has for the total length is where it was playing back the video when it crashed. I found a screenshot of the timeline from about an hour earlier and the asset with the extreme zoom gag is just about at that mark.

Needless to say, this is a bit devastating as I’ve spent the past 3 days working on this video, only to find that not only was the main project file wiped, but that shotcut’s auto-save cache was empty, let alone that i was hoping it had left a trail of several auto-saves in it’s cache.

If there is any way i can recover my project file, it would be extremely appreciated. Consider this a bug report either way though, as it’s not expected that shotcut would both wipe my project file and the auto-save folder as well.

omg this literally happened to me yesterday, and ive tried using every data recovery software i could find, and when i finally got the autosave file back it wont let me open it (whenever i click on it it just brings me to the page where you select a project, and the project doesnt appear there)

how were you able to recover the autosave file?

i used a program called winfrGUI and ran a deep scan on the hard drive the video was on, and i think it found the autosave file, but whenever i try to open it it just brings me to the project select page and it doesnt appear there. ive tried inserting it into a new project as well but it just fails to load

I know it may not help in this instance, but have a look at this post:

2 Likes

thanks. I’ll keep that in mind for the future.
I may be ignorant to the technicalities of how saving on shotcut works, but what would stop shotcut from, when saving, creating a second save file when a project is saved? then after the program confirms it’s finished writing to the new file, deletes the original project file, and renames the new file to be the same as the old one? Rather than what i assume shotcut does in directly editing the existing file? I feel like that could save people a lot of headaches if this happens a lot. Not that it’s a replacement for good backup practices or anything.

My understanding is that this is what Shotcut does. It does not edit the project file itself directly. It uses the QSaveFile feature of Qt:

  • Call QSaveFile (this creates a temporary file);
  • Open the file;
  • Write to the file throughout the editing process - then when you press save
  • Call commit() - which renames the file to the name of the original file.

Yes, it uses QSaveFile, which does the temp rename thing, but it does not keep the project file open continuously while working. Rather, upon a save operation, it serializes to XML, checks that the XML is well-formed, and then writes to the file using QSaveFile.

Shotcut supports multiple auto-saved files including an un-named one. It only shows the restore dialog upon launch for the un-named one. Otherwise, you need to try to open the project file, which you already did. An auto-save file is removed after the real file was saved successfully.

I suspect that something catastrophic occurred (difficult to recreate or simulate) such that it saved something wrong under stress. But it thought everything was successful when doing it. It does require some memory to save, but it sounds like you could not even click that option on the low memory warning dialog.

I’ve spent the past 3 days working on this

There is a popular GNOME backup program called Deja Dup. I think it is preinstalled on some GNOME desktops but not for me on Pop!_OS 22.04, but it is in the Pop Shop. In any case, it makes automatic daily backup to another storage location (file server, USB, data drive) very easy.

1 Like

Thank you for the response, it’s good to hear that shotcut does actually save in the way you described.
I actually already use deja dup, and it does come bundled with pop_os, system76 just repackages it as a generic program called “backups”. I have it set to run for backups weekly, but i’ll see if i can’t configure a way to better protect stuff like this in the future, either with deja or another program. But thank you for the recommendation.
My only other comment at this point would be to maybe consider adding an option for shotcut to keep x auto-saves for a project, on a per-project basis, where x is a user set parameter that’s made during project creation with something like 1 as it’s default, and then if the number of autosaves passes x, to throw out the oldest, but i can imagine a lot of reasons why that may not be such a great idea too.
Either way, thank you for your work here and on shotcut it’s self, you’ve helped to build a great piece of software.

1 Like