Registered Member
|
The most bizarre thing in all this is that kdenlive_renderer doesn't crash if I run it from shell. I use "ps xuwa" to extract the full command line of kdenlive_renderer immediately after beginning export from KDEnlive before renderer crashes. I also make a copy of the temporary kdenliveXXXXXX.westley file that's placed in /tmp during export. Then I run:
The result is a rendered DVD-quality VOB in test1_out.vob. The crossfade is rendered successfully and there's no crash. Maybe something in the environment confuses kdenlive_renderer when it's run from KDEnlive? |
Registered Member
|
Are you sure that you know which kdenlive_renderer is called by kdenlive you have just tested? |
Registered Member
|
olo wrote:
??
olo wrote:
... and removed some configure options because those libs in my system aren't accepted by configure (wrong versions, probably). OK, but you will miss some Kdenlive capacities. You will not be able to edit movies with mp3 audio codec for example and many more. Please, post any problems, alterations, recommendations, etc to this separate thread: |
Registered Member
|
espinosa_cz wrote:
Are you sure that you know which kdenlive_renderer is called by kdenlive you have just tested? The system-wide installed in /usr, build from SVN - there's currently no other, since in this case the point was to make it crash. And it didn't. |
Registered Member
|
I had a problem exporting to Mpeg2. On the first transition, the export stops. I added qscale=1 and it succeeded. |
Registered Member
|
I've tried building MLT and KDEnlive with all the debug symbols, and linked with Electric Fence (http://en.wikipedia.org/wiki/Electric_Fence) in order to catch where exactly does it crash. The build is performed using a modified version of espinosa_cz's build script (see attachment). I have aproblem, however. Electric Fence detects a zero-size malloc when KDEnlive displays its splash screen on startup. The cause seems to be in QT libraries:
Anyone tried debugging KDE apps with Electric Fence? Do they always bomb out prematurely because of some non harmful allocation error in QT? What to try instead of Electric Fence, then? |
Registered Member
|
espinosa_cz wrote:
Are you sure that you know which kdenlive_renderer is called by kdenlive you have just tested? After trying to debug using Valgrind (too slow for me and lots of unrelated errors I didn't have time to sift through :( ), I've got back to fiddling with paths and linking. I've discovered that indeed kdenlive renderer was using the system-wide version of mlt, and as a result the system-wide libavformat. It was also posssible that kdenlive_renderer was called from /usr/bin, not your script's build directory. So I've written a shell script that initialies environment accordingly before it launches kdenlive:
Now I've verified that it launches proper kdenlive_renderer and that renderer loads the proper libraries:
After running kdenlive and launching timeline export to DVD format, I quickly check that it launches the proper kdenlive_renderer binary:
So now everything should be fine, right? But it still crashes when reaches the transition. Here's the gdb backtrace, as can be seen, the version of libavcodec that was built from SVN by your script is involved (/home/olo/misc/soft/Graphics/KDEnlive/SVN/espinosa/build/lib/libavcodec.so.51):
But when I run the same kdenlive_renderer job with the same arguments (extracted from /proc/PID/) from command line, it finishes its job successfully! The environments of the kdenlive-launched job and manually-launched job are nearly identical - here's the diff between them:
I've also tried setting the missing environment options manually then run the manual job:
BTW, espinosa_cz, would it be possible to link all the libs built by your script statically into the binaries? In order to make sure that no wrong version of FFMPEG or MLT gets linked dynamically by kdenlive or kdenlive_renderer. |
Registered Member
|
jmpoure, could you try the attached scripts to capture a testcase? First, you have to build KDEnlive using the modified espinosa_script-olo.sh script attached here. Change the DEST_DIR variable in the script to your preferred directory. Then, modify the the second script, kdenlive-espinosa.sh, (set the build_dir variable to the same value as DEST_DIR in espinosa's script) to launch KDEnlive. Then take the third script, catch_testcase.sh, set build_dir variable in that script too, then make yourself ready. In KDEnlive, launch an export of your project, then immediately launch catch_testcase.sh - it will collect some data for a test case (make a copy of your temporary .westley file, all used temporary .PNG files and process the .westley file to use those copies, capture some data about kdenlive_renderer's running environment and generate a script that lets you launch kdenlive_renderer manually). Then take a look at the generated testcase script - e.g. 2007-06-29_12_38_29_test_run.sh. If its contents look OK, run it. It should output a .VOB file containing the exported video. Note if it finishes its work or will it crash. Analyse the other files generated by catch_testcase.sh. In my case, despite nearly identical environments, kdenlive_renderer doesn't crash and finishes export successfully when run manually, but it crashes when launched by kdenlive. All scripts are gzipped, otherwise the forum won't let me attach them. |
Registered Member
|
|
Registered Member
|
I just wanted to add a "me too" to the "export/rendering fails strangely" thread. I did some exploring and found that the rendering is crashing in libavcodec assert(q>0.0); If I comment out that assert and the next one (line 768) but not the last one (line 774). |
Registered Member
|
neilbrown, do you mean such changes?
I've rebuilt using this modified FFMPEG, but kdenlive_renderer still crashes (and still in ff_rate_estimate_qscale (), too):
Maybe I should eliminate all the assertions from this function not only those two? |
Registered Member
|
There are a lot of asserts there, aren't there! I doubt this is really the "right" solution, but for me it works until something |
Registered Member
|
You were right, now my diff between FFMPEG SVN and working copy looks like this and I don't experience crashes of kdenlive_renderer in this situation:
But it's still intriguing, if those asserts weren't satisfied, then something goes against FFMPEG developers' expectations here. Possibly the rate estimation may work incorrectly. Any ideas how to test that? I'll also try reducing the number of commented out asserts to determine the minimum count that "fixes" our problem. |
Registered Member
|
Here's the minimal changes that eliminate crashing (2 asserts need to be disabled):
|
Registered Member
|
Bug |
Registered users: bancha, Bing [Bot], daret, Evergrowing, Google [Bot], lockheed, sandyvee, Sogou [Bot]