This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Crash on startup latest Mlt/Kdenlive [solved]

Tags: None
(comma "," separated)
jmpoure_drupal
Registered Member
Posts
735
Karma
0

The crash is reproducable:



Kdenlive: SVN 1640

MLT: SVN 1018



(gdb) run
Starting program: /usr/bin/kdenlive
[Thread debugging using libthread_db enabled]
[New Thread 47762413469840 (LWP 18082)]
Qt: gdb: -nograb added to command-line options.
Use the -dograb option to enforce grabbing.
kdenlive: Mlt inited
kdenlive: Creating new document
kdenlive: deleting contents...
kdenlive: Creating new document DONE
kdenlive: **************** INIT DOCUMENT VIEW ***************
kdenlive: Mlt inited
[New Thread 1082132816 (LWP 18089)]
[New Thread 1090525520 (LWP 18090)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1082132816 (LWP 18089)]
mlt_properties_get_double (this=0x7, name=0x58fb19 "_speed") at mlt_properties.c:280
280 if ( i >= 0 )
(gdb) bt
#0 mlt_properties_get_double (this=0x7, name=0x58fb19 "_speed") at mlt_properties.c:280
#1 0x00000000004e86cd in consumer_frame_show ()
#2 0x00002b7087058f9b in mlt_events_fire (this=, id=) at mlt_events.c:175
#3 0x00002b70870586d7 in mlt_properties_set_int (this=0xcc94b0, name=0x2b708f2fb384 "rect_x", value=124) at mlt_properties.c:590
#4 0x00002b708f2fa4cb in consumer_thread (arg=) at consumer_sdl_still.c:489
#5 0x00002b708bc7b205 in start_thread () from /lib/libpthread.so.0
#6 0x00002b708ce3014d in clone () from /lib/libc.so.6
jmpoure_drupal
Registered Member
Posts
735
Karma
0

Okay, I uninstalled previous version of MLT and made clean, make install from SVN.

Further testing.



gdb kdenlive
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /usr/bin/kdenlive
[Thread debugging using libthread_db enabled]
[New Thread 47302775373968 (LWP 29285)]
Qt: gdb: -nograb added to command-line options.
Use the -dograb option to enforce grabbing.
kdenlive: Mlt inited
kdenlive: Creating new document
kdenlive: deleting contents...
kdenlive: Creating new document DONE
kdenlive: **************** INIT DOCUMENT VIEW ***************
kdenlive: + + CREATING CONSUMER WITH PROFILE: dv_pal
kdenlive: Mlt inited
kdenlive: + + CREATING CONSUMER WITH PROFILE: dv_pal
[New Thread 1082132816 (LWP 29292)]
[New Thread 1090525520 (LWP 29293)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1082132816 (LWP 29292)]
mlt_properties_get_double (this=0x7, name=0x591b59 "_speed") at mlt_properties.c:280
280 if ( i >= 0 )
(gdb) bt
#0 mlt_properties_get_double (this=0x7, name=0x591b59 "_speed") at mlt_properties.c:280
#1 0x00000000004e91ed in consumer_frame_show ()
#2 0x00002b058244af9b in mlt_events_fire (this=, id=) at mlt_events.c:175
#3 0x00002b058244a6d7 in mlt_properties_set_int (this=0xcd1aa0, name=0x2b058a9f3384 "rect_x", value=148) at mlt_properties.c:590
#4 0x00002b058a9f24cb in consumer_thread (arg=) at consumer_sdl_still.c:489
#5 0x00002b058726e205 in start_thread () from /lib/libpthread.so.0
#6 0x00002b058842314d in clone () from /lib/libc.so.6
(gdb)
jmpoure_drupal
Registered Member
Posts
735
Karma
0

Error on exit:



Starting program: /usr/bin/kdenlive 
[Thread debugging using libthread_db enabled]
[New Thread 47251764670608 (LWP 29477)]
Qt: gdb: -nograb added to command-line options.
Use the -dograb option to enforce grabbing.
kdenlive: Mlt inited
kdenlive: Creating new document
kdenlive: deleting contents...
kdenlive: Creating new document DONE
kdenlive: **************** INIT DOCUMENT VIEW ***************
kdenlive: + + CREATING CONSUMER WITH PROFILE: dv_pal
kdenlive: Mlt inited
kdenlive: + + CREATING CONSUMER WITH PROFILE: dv_pal
[New Thread 1082132816 (LWP 29482)]
[New Thread 1090525520 (LWP 29483)]
[Thread 1082132816 (LWP 29482) exited]
[Thread 1090525520 (LWP 29483) exited]
[New Thread 1090525520 (LWP 29484)]
[New Thread 1082132816 (LWP 29485)]
kdenlive: Closing[Gui::KdenliveApp pointer (0x882e60) to widget kdenlive-mainwindow#1, geometry=1400x946+0+0]
kdenlive: Done
[Thread 1090525520 (LWP 29484) exited]
[Thread 1082132816 (LWP 29485) exited]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47251764670608 (LWP 29477)]
0x0000000000000040 in ?? ()
(gdb) bt
#0 0x0000000000000040 in ?? ()
#1 0x00002af9a483bb84 in QWidget::deleteExtra () from /usr/lib/libqt-mt.so.3
#2 0x00002af9a483eafa in QWidget::~QWidget () from /usr/lib/libqt-mt.so.3
#3 0x00000000004ddb18 in Gui::KFixedRuler::~KFixedRuler ()
#4 0x00002af9a483ea6e in QWidget::~QWidget () from /usr/lib/libqt-mt.so.3
#5 0x00000000004ded0f in Gui::KMMEditPanel::~KMMEditPanel ()
#6 0x00000000004e0205 in Gui::KMMMonitor::~KMMMonitor ()
#7 0x00000000004c648d in Gui::KdenliveApp::~KdenliveApp ()
#8 0x00002af9a4803bf3 in QObject::event () from /usr/lib/libqt-mt.so.3
#9 0x00002af9a4838a8d in QWidget::event () from /usr/lib/libqt-mt.so.3
#10 0x00002af9a490a83c in QMainWindow::event () from /usr/lib/libqt-mt.so.3
#11 0x00002af9a479f842 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#12 0x00002af9a47a20ff in QApplication::notify () from /usr/lib/libqt-mt.so.3
#13 0x00002af9a3615438 in KApplication::notify () from /usr/lib/libkdecore.so.4
#14 0x00002af9a47327f2 in QApplication::sendEvent () from /usr/lib/libqt-mt.so.3
#15 0x00002af9a47a0859 in QApplication::sendPostedEvents () from /usr/lib/libqt-mt.so.3
#16 0x00002af9a47b8f28 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#17 0x00002af9a47b8c2f in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#18 0x00002af9a47a1324 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#19 0x0000000000508453 in main ()
(gdb)
jmpoure_drupal
Registered Member
Posts
735
Karma
0

On startup:



Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 47273686491280 (LWP 29957)]
[KCrash handler]
#5 0x0000000000c72730 in ?? ()
#6 0x00002afebc6f8f9b in mlt_events_fire (this=,
id=) at mlt_events.c:175
#7 0x00002afebc6f7f58 in mlt_properties_set_data (this=0xc6a330,
name=0x2afec4ca1359 "transport_producer", value=0x0, length=0, destroy=0,
serialise=0) at mlt_properties.c:711
#8 0x00002afec4c9f63c in consumer_start (parent=0xc59110)
at consumer_sdl_preview.c:182
#9 0x00002afebc917bdc in Mlt::Consumer::start ()
from /usr/lib/libmlt++.so.0.2.4
#10 0x00000000004ec779 in KRender::start ()
#11 0x00000000004b0b8c in Gui::KdenliveApp::activateWorkspaceMonitor ()
#12 0x00000000004b1086 in Gui::KdenliveApp::initMonitors ()
#13 0x00000000004d0ed3 in Gui::KdenliveApp::KdenliveApp ()
#14 0x00000000005084ae in main ()
jmpoure_drupal
Registered Member
Posts
735
Karma
0

When creating new HDV 1080 50i project:



Quote:
Using host libthread_db library "/lib/libthread_db.so.1".

[Thread debugging using libthread_db enabled]

[New Thread 47165404962960 (LWP 30078)]

[New Thread 1082132816 (LWP 30112)]

[New Thread 1090525520 (LWP 30111)]

0x00002ae58b3cd576 in pthread_join () from /lib/libpthread.so.0

#0 0x00002ae58b3cd576 in pthread_join () from /lib/libpthread.so.0

#1 0x00002ae58eb4f3fb in consumer_stop (parent=)

at consumer_sdl_preview.c:242

#2 0x00002ae5865aed8a in mlt_consumer_stop (this=0x408009e0)

at mlt_consumer.c:683

#3 0x00002ae5867c7b88 in Mlt::Consumer::stop ()

from /usr/lib/libmlt++.so.0.2.4

#4 0x00000000004e8d69 in KRender::stop ()

#5 0x000000000050872e in Gui::MonitorManager::activateMonitor ()

#6 0x00000000004b0b8c in Gui::KdenliveApp::activateWorkspaceMonitor ()

#7 0x00000000004b1086 in Gui::KdenliveApp::initMonitors ()

#8 0x00000000004d03a3 in Gui::KdenliveApp::slotFileNew ()

#9 0x000000000057e19c in Gui::KdenliveApp::qt_invoke ()

#10 0x00002ae5890fb4ee in QObject::activate_signal ()

from /usr/lib/libqt-mt.so.3

#11 0x00002ae5890fc088 in QObject::activate_signal ()

from /usr/lib/libqt-mt.so.3

#12 0x00002ae5875f6bad in KAction::slotPopupActivated ()

from /usr/lib/libkdeui.so.4

#13 0x00002ae5875f6e53 in KAction::qt_invoke () from /usr/lib/libkdeui.so.4

#14 0x00002ae5890fb4ee in QObject::activate_signal ()

from /usr/lib/libqt-mt.so.3

#15 0x00002ae58946980d in QSignal::signal () from /usr/lib/libqt-mt.so.3

#16 0x00002ae58911a697 in QSignal::activate () from /usr/lib/libqt-mt.so.3

#17 0x00002ae58921a244 in QPopupMenu::mouseReleaseEvent ()

from /usr/lib/libqt-mt.so.3

#18 0x00002ae58912fb9c in QWidget::event () from /usr/lib/libqt-mt.so.3

#19 0x00002ae589096842 in QApplication::internalNotify ()

from /usr/lib/libqt-mt.so.3

#20 0x00002ae5890989c5 in QApplication::notify () from /usr/lib/libqt-mt.so.3

#21 0x00002ae587f0c438 in KApplication::notify ()

from /usr/lib/libkdecore.so.4

#22 0x00002ae589029864 in QApplication::sendSpontaneousEvent ()

from /usr/lib/libqt-mt.so.3

#23 0x00002ae589028204 in QETWidget::translateMouseEvent ()

from /usr/lib/libqt-mt.so.3

#24 0x00002ae5890267e7 in QApplication::x11ProcessEvent ()

from /usr/lib/libqt-mt.so.3

#25 0x00002ae58903c93f in QEventLoop::processEvents ()

from /usr/lib/libqt-mt.so.3

#26 0x00002ae5890afe27 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3

#27 0x00002ae5890afc2f in QEventLoop::exec () from /usr/lib/libqt-mt.so.3

#28 0x00002ae589098324 in QApplication::exec () from /usr/lib/libqt-mt.so.3

#29 0x0000000000508453 in main ()
jmpoure_drupal
Registered Member
Posts
735
Karma
0

It is really a bad bug.

Look at my Kdenliverc:



Quote:


[General Options]

FirstRun=true

[KNewStuff]

ProvidersUrl=http://download.kde.org/khotnewstuff/kdenlive-providers.xml

~

neilbrown
Registered Member
Posts
43
Karma
0

It seems to be some sort of malloc/free problem.



If I remove my kdenliverc, run

valgrind kdenlive



and once it comes up (which it does eventually) exit.



Then I have a fleshed out kdenliverc, and subsequently kdenlive will start with no problem.



No idea what the malloc/free problem is though.



jmpoure_drupal
Registered Member
Posts
735
Karma
0

Thanks for the tip.

I was able to start Kdenlive using Valgrind and create a kdenliverc.

But then, if I restart kdenlive, it still crashes.

Kind regards, Jean-Michel

jmpoure_drupal
Registered Member
Posts
735
Karma
0

Please find attached a trace file.

valgrind --leak-check=full --log-file-exactly=log.txt -v kdenlive



Please tell me how can I help to provide a suitable trace file.

neilbrown
Registered Member
Posts
43
Karma
0

Reviewing the errors that valgrind reports (many of which are problems in libraries beyond our control)



1/



mlt_profile mlt_profile_select( const char *name )
{
const char *prefix = PREFIX;
char *filename = calloc( 1, strlen( prefix ) + strlen( PROFILES_DIR ) + strlen( name ) + 1 );
strcpy( filename, prefix );
if ( filename[ strlen( filename ) - 1 ] != '/' )
filename[ strlen( filename ) ] = '/';
strcat( filename, PROFILES_DIR );
strcat( filename, name );
return mlt_profile_load_file( filename );
}


in mlt_profile.c.

The length that is allocated doesn't account for the extra '/' that might be added. We really need another "+1" in there.

That is the only one I can make out so far. I'm not sure fixing it will have a big effect, but it naturally should be fixed.



neilbrown
Registered Member
Posts
43
Karma
0

I've figured out another warning.



In krender.cpp, values returned by decodedString should be deleted with

delete[] tmp;

not

delete tmp;



Also, on the last call to decodedString in the file. the value is never deleted.



Again, I doubt this is causing the crash.



neilbrown
Registered Member
Posts
43
Karma
0

... and I have half-decoded the more significant alloc/free problem.



mlt registers a 'listener' for the 'profile' property, so that when someone changes

the profile, someone gets notified.



This function that is called on a notify is mlt_consumer_property_changed in mlt_consumer.c



This function calls mlt_event_close presumably to discard the event. But the event is still in use

somewhere and when another consumer starts, the event fires again, and the freed memory

gets referenced.



I don't know what is suppose to happen here exactly, but if I comment out


mlt_event_close( g_event_listener );
g_event_listener = NULL;


at around line 120 of mlt/src/framework/mlt_consumer.c

then I can start kdenlive and load an old project.



Hopefully someone who knows what mlt is trying to do in this case can have a look and fix it .....



jmpoure_drupal
Registered Member
Posts
735
Karma
0

Sorry, here is the correct trace file:

ddennedy
Registered Member
Posts
1315
Karma
1

Thanks for your feedback, Neil. I will fix this up including the string length bug.



olo
Registered Member
Posts
72
Karma
0

I were experiencing crashes too, but today KDEnlive simply refuses to start up, just states in a dialog it cannot locate MLT and asks for a path to it.



Contrary to that, linker debug log (LD_DEBUG=libs) shows that it has successfully linked with libmlt and libmlt++.



There's talk on the KDEnlive developers mailing list about a new MLT profiles system and KDEnlive being ported to it - maybe we're seeing bugs related to this effort?





Bookmarks



Who is online

Registered users: bancha, Bing [Bot], daret, Evergrowing, Google [Bot], lockheed, sandyvee, Sogou [Bot]