Summary: | Crash opening old projects | ||
---|---|---|---|
Product: | [Applications] kdenlive | Reporter: | farid <snd.noise> |
Component: | User Interface & Miscellaneous | Assignee: | Jean-Baptiste Mardelle <jb> |
Status: | RESOLVED FIXED | ||
Severity: | grave | CC: | carion.nicolas, wegwerf-1-2-3 |
Priority: | NOR | ||
Version First Reported In: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
backtrace
New backtrace Newer backtrace |
Description
farid
2016-08-11 16:54:15 UTC
I probably ran into the same issue (or closely related). I post a valgrind output if this can help: ==23439== Mismatched free() / delete / delete [] ==23439== at 0x4C2AD90: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==23439== by 0x44EAE6EA: on_start_profile (producer_xml.c:348) ==23439== by 0x44EAE6EA: on_start_element (producer_xml.c:1243) ==23439== by 0x167F47BD: xmlParseStartTag (in /usr/lib/libxml2.so.2.9.4) ==23439== by 0x168001F7: xmlParseElement (in /usr/lib/libxml2.so.2.9.4) ==23439== by 0x167FF67E: xmlParseContent (in /usr/lib/libxml2.so.2.9.4) ==23439== by 0x16800062: xmlParseElement (in /usr/lib/libxml2.so.2.9.4) ==23439== by 0x1680076A: xmlParseDocument (in /usr/lib/libxml2.so.2.9.4) ==23439== by 0x44EAF7CF: producer_xml_init (producer_xml.c:1766) ==23439== by 0x5F67089: mlt_factory_producer (mlt_factory.c:315) ==23439== by 0x3EF9015B: create_producer (producer_loader.c:78) ==23439== by 0x3EF90403: producer_loader_init (producer_loader.c:220) ==23439== by 0x5F67089: mlt_factory_producer (mlt_factory.c:315) ==23439== Address 0x560753f0 is 0 bytes inside a block of size 16 alloc'd ==23439== at 0x4C2A7E9: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==23439== by 0xFC18F56: qstrdup(char const*) (in /usr/lib/libQt5Core.so.5.7.0) ==23439== by 0x7D92C3: GLWidget::resetProfile(MltVideoProfile) (glwidget.cpp:1050) ==23439== by 0x7E7951: Monitor::resetProfile(MltVideoProfile) (monitor.cpp:1351) ==23439== by 0x7EDE80: MonitorManager::resetProfiles(MltVideoProfile, Timecode const&) (monitormanager.cpp:256) ==23439== by 0x4E5E57: KdenliveDoc::updateProjectProfile(bool) (kdenlivedoc.cpp:1441) ==23439== by 0x4E5CAC: KdenliveDoc::loadDocumentProperties() (kdenlivedoc.cpp:1426) ==23439== by 0x4D8931: KdenliveDoc::KdenliveDoc(QUrl const&, QUrl const&, QUndoGroup*, QString const&, QMap<QString, QString> const&, QMap<QString, QString> const&, QPoint const&, Render*, NotesPlugin*, bool*, MainWindow*) (kdenlivedoc.cpp:251) ==23439== by 0x54CA24: ProjectManager::doOpenFile(QUrl const&, KAutoSaveFile*) (projectmanager.cpp:515) ==23439== by 0x54C2EB: ProjectManager::openFile(QUrl const&) (projectmanager.cpp:489) ==23439== by 0x96231F: ProjectManager::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_projectmanager.cpp:184) ==23439== by 0xFE1B4E8: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/libQt5Core.so.5.7.0) ==23439== On a very preliminary analysis, it seems that this patch solves the issue. diff --git a/src/monitor/glwidget.cpp b/src/monitor/glwidget.cpp index 7306980..dfe317d 100644 --- a/src/monitor/glwidget.cpp +++ b/src/monitor/glwidget.cpp @@ -1047,7 +1047,7 @@ void GLWidget::resetProfile(MltVideoProfile profile) m_consumer->stop(); m_consumer->purge(); } - m_monitorProfile->get_profile()->description = qstrdup(profile.description.toUtf8().constData()); + m_monitorProfile->get_profile()->description = strdup(profile.description.toUtf8().constData()); m_monitorProfile->set_colorspace(profile.colorspace); m_monitorProfile->set_frame_rate(profile.frame_rate_num, profile.frame_rate_den); m_monitorProfile->set_height(profile.height); Git commit b00d9175d4dfae4c0dd91f1fb5429460a7053871 by Jean-Baptiste Mardelle. Committed on 03/09/2016 at 13:28. Pushed by mardelle into branch 'Applications/16.08'. Try to fix possible crash caused by string copy M +3 -2 src/monitor/glwidget.cpp M +1 -1 src/timeline/clip.cpp M +1 -1 src/timeline/clip.h http://commits.kde.org/kdenlive/b00d9175d4dfae4c0dd91f1fb5429460a7053871 THaks for your reports. I couldn't reproduce your crashes, but pushed a change that might fix it. Can you please test & report, I would really like to fix this issue before monday's deadline (16.08.1 release) Created attachment 100910 [details]
backtrace
Unfortunately, this still seems to be crashing. Additionnal info : - The crash occurs on loading (not saving as original bug report) - The value of the p->description (before the faulty free) is "HDV 1440x1080i 25 fps" Tell me if you need anything else. Git commit 36b808f60b67cee4c182d77bb774096278a649e3 by Jean-Baptiste Mardelle. Committed on 03/09/2016 at 14:41. Pushed by mardelle into branch 'Applications/16.08'. Fix crash on audiospectrum display M +2 -1 src/audiospectrum/audiographspectrum.cpp http://commits.kde.org/kdenlive/36b808f60b67cee4c182d77bb774096278a649e3 @Jean-Baptiste: the last referenced commit is probably CCd to the wrong bug More info about the bug of this thread : the bug triggers only 50% of the time, I don't know why. Hi, the backtrace you attached is related to another bug report (crash in audiospectrum). It should be fixed now. About the profile->description crash, not sure it is related to original crash report. Can you describe precisely what you do before the crash ? Are you opening a project file ? If yes, what is your default Kdenlive project format and what is the opened project format ? Very sorry about the backtrace : I actually accidentally included both the backtrace for the audiospectrum and this one (didn't know that gdb was appending and not replacing the log file accross sessions). You can look-up "raise()" to confirm that there is also the backtrace related to this bug. I'm not 100% sure either that this is the same crash, but the backtrace is very similar. The relevant part of the original one is : Thread 36 (Thread 0x7fff537fd700 (LWP 8377)): #0 0x00007fffefdbe04f in raise () from /usr/lib/libc.so.6 #1 0x00007fffefdbf47a in abort () from /usr/lib/libc.so.6 #2 0x00007fffefdfbc50 in __libc_message () from /usr/lib/libc.so.6 #3 0x00007fffefe01fe6 in malloc_printerr () from /usr/lib/libc.so.6 #4 0x00007fffefe027de in _int_free () from /usr/lib/libc.so.6 #5 0x00007fffb15bf8da in ?? () from /usr/lib/mlt/libmltxml.so #6 0x00007fffe63667ee in xmlParseStartTag () from /usr/lib/libxml2.so.2 #7 0x00007fffe6372228 in xmlParseElement () from /usr/lib/libxml2.so.2 #8 0x00007fffe63716af in xmlParseContent () from /usr/lib/libxml2.so.2 #9 0x00007fffe6372093 in xmlParseElement () from /usr/lib/libxml2.so.2 #10 0x00007fffe637279b in xmlParseDocument () from /usr/lib/libxml2.so.2 #11 0x00007fffb15c097c in producer_xml_init () from /usr/lib/mlt/libmltxml.so #12 0x00007ffff6faf5ea in mlt_factory_producer () from /usr/lib/libmlt.so.6 #13 0x00007ffff6d80296 in Mlt::Producer::Producer(Mlt::Profile&, char const*, char const*) () from /usr/lib/libmlt++.so.3 #14 0x000000000053c2af in Clip::clone (this=this@entry=0x7fff537fcbf0) at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/kdenlive/src/timeline/clip.cpp:177 #15 0x000000000081ddd8 in ProjectClip::thumbProducer (this=this@entry=0x6300bd0) at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/kdenlive/src/bin/projectclip.cpp:404 #16 0x000000000081f0fc in ProjectClip::doExtractImage (this=0x6300bd0) at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/kdenlive/src/bin/projectclip.cpp:881 #17 0x00000000004cda1d in QtConcurrent::RunFunctionTask<void>::run (this=0x7fff3000ac50) at /usr/include/qt/QtConcurrent/qtconcurrentrunbase.h:136 #18 0x00007ffff085e01f in ?? () from /usr/lib/libQt5Core.so.5 #19 0x00007ffff0861d78 in ?? () from /usr/lib/libQt5Core.so.5 #20 0x00007fffee32b454 in start_thread () from /usr/lib/libpthread.so.0 #21 0x00007fffefe737df in clone () from /usr/lib/libc.so.6 Mine is very similar, except that my mlt lib is in debug which provides a little more info. As for triggering the crash: I start the program, open the project. Then I get a dialog regarding missing clips, I choose "Use placeholders for missing clips" and then I have the "loading playlist" dialog, and it crashes during that. As for the format : I'm not sure where to read that, but the following line gets logged when opening the project: Opening a document with version 0.95 / 0.95 Does this help ? Could you attach the crashing project file here or mail it to me? Git commit 4cee6a07366963542253afe761bf8b525da561e0 by Jean-Baptiste Mardelle. Committed on 04/09/2016 at 09:41. Pushed by mardelle into branch 'Applications/16.08'. Attempt to fix opening project crash M +3 -2 src/timeline/clip.cpp http://commits.kde.org/kdenlive/4cee6a07366963542253afe761bf8b525da561e0 I just pushed several fixes for memory leak/corruption, please try again with current git Just built latest master version. I can still trigger the bug. Created attachment 100934 [details]
New backtrace
Probably not related, but CppCheck spots a Memory Leak error: [kdenlive/src/timeline/track.cpp:436]: (error) Memory leak: audioTrackProducer Git commit 02ef71d897c613f0dc86068abad3b958f5818e55 by Jean-Baptiste Mardelle. Committed on 05/09/2016 at 14:38. Pushed by mardelle into branch 'Applications/16.08'. Fix memleak M +1 -0 src/timeline/track.cpp http://commits.kde.org/kdenlive/02ef71d897c613f0dc86068abad3b958f5818e55 Git commit 6f45db10a075349c8d2f46f28adbf88d4f368dcf by Jean-Baptiste Mardelle. Committed on 05/09/2016 at 15:34. Pushed by mardelle into branch 'Applications/16.08'. Fix memory corruption in thumb creation M +2 -2 src/doc/kthumb.cpp M +1 -2 src/mltcontroller/clipcontroller.cpp M +1 -1 src/mltcontroller/producerqueue.cpp http://commits.kde.org/kdenlive/6f45db10a075349c8d2f46f28adbf88d4f368dcf Farid, Nicolas, could you give the recent fixes a try? What's the outcome? unfortunately at the moment i am not able to test this since the files are not with me :/ It happened again today. I'm a little bit behind master (6a6ad3742f3e28d82162f83ffdc1be94fda63f1e) but apparently no relevant commit has been pushed since then. I'll attach a new backtrace in case that helps. Created attachment 101084 [details]
Newer backtrace
Nicolas, still present on recent git master? |