Bug 357572

Summary: Project with many missing clips fails to open
Product: [Applications] kdenlive Reporter: Sam Muirhead <sam>
Component: Rendering & ExportAssignee: Jean-Baptiste Mardelle <jb>
Status: RESOLVED FIXED    
Severity: grave    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
URL: http://pastebin.com/fNTXKRYa
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Sam Muirhead 2016-01-05 11:54:07 UTC
Background: I am currently open-sourcing an animation I made 18 months ago - folder structures, project names, and filenames have changed from their original state, as well as the .kdenlive file format. 

Yesterday I opened the old project, re-linked important audio and then choose 'use placeholder' for all the other clips. I used these missing clips as a guide while I re-built the project in a simpler, more logical way with new image sequences, a tidier project bin, etc. 
Today the project crashes upon opening - I see the missing clips dialog, choose to 'use placeholders for missing clips' again, click OK, and Kdenlive crashes. 

here's a pastebin of the terminal output: http://pastebin.com/fNTXKRYa
(I don't know how to get GDB working, sorry! - https://forum.kde.org/viewtopic.php?f=269&t=130252#p348574)

the relevant file (/kdenlive/FragDenStaat.kdenlive) and folder structure is in this git repository: 
https://gitlab.com/cameralibre/FragDenStaat-Animation/tree/master

the subfolders in /png/ which contain my new .png image sequences are missing though.

Note: Yesterday I was working with my installed Kdenlive 15.13.0 version, rather than the 20160102 daily build which I set up to check this week's image sequence bugfix (https://bugs.kde.org/show_bug.cgi?id=357397)
Both versions exhibit the same behaviour upon opening the file, however.

Reproducible: Always

Steps to Reproduce:
1. Open project, get 'Missing Clips' dialog
2. choose 'use placeholders'
3. click OK

Actual Results:  
Kdenlive crashes


Kdenlive 15.13.0 
Qt 5.4.2 
Kubuntu 15.10
Comment 1 Jean-Baptiste Mardelle 2016-01-06 10:32:56 UTC
I cannot reproduce, so a backtrace would be very useful. Not sure how to get it with build script though. Could you try installing the packages from our official testing PPA:

https://launchpad.net/~vpinon/+archive/ubuntu/kdenlive-testing

Steps to install:

sudo apt-get install ppa-purge
sudo apt-add-repository ppa:vpinon/kdenlive-testing
sudo apt-get update
sudo apt-get install kdenlive kdenlive-dbg

Then open your project and you should have a correct backtrace from the KCrash dialog
To remove these packages afterwards, just do:

sudo ppa-purge ppa:vpinon/kdenlive-testing
Comment 2 Sam Muirhead 2016-01-06 10:46:42 UTC
I followed your instructions but I didn't see a kcrash dialog when it crashed. There's nothing that looks relevant in /tmp. Any ideas?
Behaviour and output from the terminal is the same as opening the project with the other installs.
Comment 3 Jean-Baptiste Mardelle 2016-01-06 10:51:28 UTC
Oh no, I am sorry. I just realized that the PPA currently only contains the Applications/15.12 branch version, but the automatic KCrash dialog only shows up in the git master branch.

However, you should be able to manually get a backtrace:

In a terminal, type:

gdb kdenlive
run

Then, crash kdenlive, and go back to the terminal to type:

thread apply all bt
(type enter until all info is printed and copy / paste)
q (to quit debug)
Comment 4 Sam Muirhead 2016-01-06 10:58:33 UTC
thanks, done it: http://pastebin.com/eJJW0VEd

this time the behaviour is slightly different - the kdenlive GUI freezes on 'loading playlist' while the terminal reports a segfault.
Comment 5 Jean-Baptiste Mardelle 2016-01-06 11:38:50 UTC
Git commit ee4f4c820012d0285b83087c3455da2842c61258 by Jean-Baptiste Mardelle.
Committed on 06/01/2016 at 11:38.
Pushed by mardelle into branch 'Applications/15.12'.

Fix crash on opening project with subfolders, real issue still investigated

M  +3    -0    src/bin/bin.cpp

http://commits.kde.org/kdenlive/ee4f4c820012d0285b83087c3455da2842c61258
Comment 6 Jean-Baptiste Mardelle 2016-01-06 11:43:24 UTC
Ok, thanks I found the problem. It had nothing to do with missing clips but was related to your Bin's folder hierarchy. 
There seems to be a problem opening projects with sub-folders.
I fixed the crash but still investigating the source of the problem.
Comment 7 Sam Muirhead 2016-01-06 11:44:57 UTC
ah, ok. Thank you, and good luck!
Comment 8 Jean-Baptiste Mardelle 2016-01-06 11:53:45 UTC
Git commit 5ef3da9ac26b23f70d028a6850a9b22cc5d18f83 by Jean-Baptiste Mardelle.
Committed on 06/01/2016 at 11:53.
Pushed by mardelle into branch 'Applications/15.12'.

Fix error in subfolders loading

M  +16   -6    src/bin/bin.cpp

http://commits.kde.org/kdenlive/5ef3da9ac26b23f70d028a6850a9b22cc5d18f83