|Anonymous | Login||2016-07-31 09:22 CEST|
|My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003240||Kdenlive||User Interface||public||2014-03-29 09:29||2015-01-21 23:04|
|Assigned To||Steve Guilford|
|Platform||64 bit||OS||Gentoo Linux||OS Version|
|Target Version||Recent git||Fixed in Version||Recent git|
|Summary||0003240: Fast undo/redo actions crash kdenlive|
|Description||Now undo/redo must be used with some patience, because if you do it to fast kdenlive may crash.|
|Steps To Reproduce||Add some clip(s) on timeline,|
make some changes,
try undo/redo by _fast_ clicking toolbar buttons until kdenlive crashes.
|Tags||No tags attached.|
|Attached Files|| gdb-kdenlive.txt [^] (12,095 bytes) 2014-03-29 14:23 [Show Content]
gdb-kdenlive-symbols.txt [^] (13,300 bytes) 2014-03-29 15:16 [Show Content]
bug3240.diff [^] (1,444 bytes) 2014-09-04 07:36 [Show Content]
A back trace would be useful, I cannot reproduce...
See instructions here (under step 3):
Recompiled kdenlive & MLT with "debug" use flags, crashed it by undo/redo, and attached the execution log and backtrace from run under gdb.
$ kdenlive -v
KDE Development Platform: 4.11.5
$ melt -version
Copyright (C) 2002-2013 Ushodaya Enterprises Limited
My steps before crash was: adding 6 clips to project tree and timeline (one video h264/mkv no audio and 5 ppm bitmaps) rearange them, changing duration of some of them end then fast undo/redo clicking. Before crush a couple of errors on the status bar appears, with messages like "error removing clip at 00:00:04:00 on track 0".
If I can provide some any additional info please tell me about it.
|Working on it..|
|Good luck and thank you! Good to know that kdenlive alive.|
|I just committed some improvements. Not 100% crash free but it is much better for me now. Can you please test?|
Tested with Kdenlive: 0.9.7 (rev. v0.9.4-357-g3869054).
Yes, still possible to crash in this way but much harder. This time no error messages was seen before crash.
Note that I tested with toolbar undo/redo buttons only. With shortcuts things may differ. But I can't try. Just discovered that shortcuts in all Qt applications stop working...
|Hello, can you check if problem persist with recent versions? Some fixes on multi-threading might have solved the problem...|
Steve Guilford (developer)
edited on: 2014-09-04 07:28
I've tracked this down. I was able to create a dependable test case that crashed Kdenlive within a couple of keystrokes/operations. From there, after a bunch of time wasted being stubborn, I was able to find the problem relatively quickly with Valgrind.
What it all boiled down to was a read of memory upon an object that had gone out-of-scope and thus been freed. The read took place within the AddEffect logic, specifically triggered as the UndoStack was traversed.
I can not say for certain that this solves every undo/redo crash. Time will tell in that regard.
Solving memory errors is quite difficult and depends upon being able to reproduce a test case dependably. That said, what I did in my environment may not work for you. Therefore, if you are able to produce a undo/redo crash dependably, be sure to note down your sequence of operations.
Here's my test-case:
Build Kdenlive using the Dan's build script.
Start Kdenlive and use the following as the default profile setting:
HDV 1440x1080i 25Fps
Enable the Undo View via View->Undo History
Load a HD 720P 25Fps clip.
Confirm the request to update the current project settings to match the clip.
Move the clip to the timeline at the beginning of 'Video 1'.
Open the Effects List tab.
Navigate to Fade.
Open the Fade list.
Drag 'Fade From Black' to the clip within the timeline.
Ctrl-Z to undo.
Shift-Ctrl-Z to redo --> Crash !!!
So, with a test case I ran valgrind --leak-check=yes. It reported several invalid read operations upon hitting Shift-Ctrl-Z. Here's one...
==20875== Invalid read of size 8
==20875== at 0x79E9698: ??? (in /usr/lib/x86_64-linux-gnu/libQtXml.so.4.8.6)
==20875== by 0x79E8F5C: ??? (in /usr/lib/x86_64-linux-gnu/libQtXml.so.4.8.6)
==20875== by 0x79F0F63: ??? (in /usr/lib/x86_64-linux-gnu/libQtXml.so.4.8.6)
==20875== by 0x79F0FC5: ??? (in /usr/lib/x86_64-linux-gnu/libQtXml.so.4.8.6)
==20875== by 0x79E8F4E: ??? (in /usr/lib/x86_64-linux-gnu/libQtXml.so.4.8.6)
==20875== by 0x79F0F63: ??? (in /usr/lib/x86_64-linux-gnu/libQtXml.so.4.8.6)
==20875== by 0x79F108B: ??? (in /usr/lib/x86_64-linux-gnu/libQtXml.so.4.8.6)
==20875== by 0x79F1288: QDomDocument::importNode(QDomNode const&, bool) (in /usr/lib/x86_64-linux-gnu/libQtXml.so.4.8.6)
==20875== by 0x673FDA: EffectsList::append(QDomElement) (effectslist.cpp:308)
==20875== by 0x53DF1D: ClipItem::addEffect(QDomElement, bool) (clipitem.cpp:1557)
==20875== by 0x55E1F1: CustomTrackView::addEffect(int, GenTime, QDomElement) (customtrackview.cpp:1880)
==20875== by 0x5A4808: AddEffectCommand::redo() (timelinecommands.cpp:59)
==20875== Address 0x1d034068 is 120 bytes inside a block of size 128 free'd
==20875== at 0x4C2C2BC: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20875== by 0x5411B9: ClipItem::dropEvent(QGraphicsSceneDragDropEvent*) (clipitem.cpp:1795)
==20875== by 0x721B717: QGraphicsItem::sceneEvent(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
From there I was able to determine the problem to be due to the m_effect item in the AddEffectCommand class going out of scope and being freed. The m_effect item was being set in the class constructor w/ m_effect(effect.cloneNode().toElement()) which for reasons I have yet to understand, does not create a persistent item. The fix is to use m_effect(effect).
Since this logic path sat in the middle of any effect that was added to a clip in the timeline, it has the potential to be a prevalent and insidious bug. Once an effect was added and the user traversed though the effect on the undo/redo stack, the memory bug was enabled and Kdenlive could crash at any point thereafter.
recently got a crash anfter an undo of shift+r
hope this helps:
#0 0x00007ffff5b9aef5 in QGraphicsItemPrivate::invalidateParentGraphicsEffectsRecursively() () from /usr/lib/libQtGui.so.4
#1 0x00007ffff5ba70b7 in QGraphicsItem::update(QRectF const&) ()
0000002 0x0000000000562cc3 in _start ()
I have this same issue on Ubuntu 14.04.1 (64 bit) running Kdenlive 0.9.10 and KDE Development Framework 4.13.3.
I'll submit a new bug report next time it happens. I just thought I'd post here to put myself in to say it also applies to me.
|2014-03-29 09:29||varchar||New Issue|
|2014-03-29 13:19||j-b-m||Note Added: 0009819|
|2014-03-29 13:19||j-b-m||Assigned To||=> j-b-m|
|2014-03-29 13:19||j-b-m||Status||new => feedback|
|2014-03-29 14:23||varchar||File Added: 0003240-gdb-kdenlive.txt|
|2014-03-29 14:24||varchar||Note Added: 0009820|
|2014-03-29 14:24||varchar||Status||feedback => assigned|
|2014-03-29 15:16||varchar||File Added: 0003240-gdb-kdenlive-symbols.txt|
|2014-03-29 23:09||j-b-m||Note Added: 0009828|
|2014-03-29 23:09||j-b-m||Status||assigned => acknowledged|
|2014-03-29 23:55||varchar||Note Added: 0009830|
|2014-03-30 01:56||j-b-m||Note Added: 0009831|
|2014-03-31 23:51||varchar||Note Added: 0009871|
|2014-08-05 23:36||vpinon||Note Added: 0010188|
|2014-08-05 23:36||vpinon||Assigned To||j-b-m => vpinon|
|2014-08-05 23:36||vpinon||Status||acknowledged => assigned|
|2014-08-15 01:00||vpinon||Status||assigned => feedback|
|2014-09-04 07:10||Steve Guilford||Note Added: 0010313|
|2014-09-04 07:28||Steve Guilford||Note Edited: 0010313||View Revisions|
|2014-09-04 07:34||Steve Guilford||Assigned To||vpinon => Steve Guilford|
|2014-09-04 07:34||Steve Guilford||Status||feedback => resolved|
|2014-09-04 07:34||Steve Guilford||Resolution||open => fixed|
|2014-09-04 07:34||Steve Guilford||Fixed in Version||=> Recent git|
|2014-09-04 07:34||Steve Guilford||Target Version||=> Recent git|
|2014-09-04 07:35||Steve Guilford||Status||resolved => feedback|
|2014-09-04 07:36||Steve Guilford||File Added: bug3240.diff|
|2014-09-26 22:52||farid||Note Added: 0010397|
|2014-10-07 17:14||farid||Relationship added||related to 0003382|
|2015-01-21 23:04||RPiAwesomeness||Note Added: 0010571|
|Copyright © 2000 - 2016 MantisBT Team|