Kdenlive   bug tracker Home page

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001761KdenliveMLTpublic2010-08-23 15:132011-06-10 10:48
ReporterGranjow 
Assigned Toj-b-m 
PrioritynormalSeveritycrashReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version0.8 
Summary0001761: Segfault in mlt_properties.c when loading project
DescriptionOn the last line here from mlt_properties.c:

/** Locate a property by name.
 *
 * \private \memberof mlt_properties_s
 * \param this a properties list
 * \param name the property to lookup by name
 * \return the property or NULL for failure
 */

static inline mlt_property mlt_properties_find( mlt_properties this, const char *name )
{
    property_list *list = this->local;


Called from here (this/name not null):
int mlt_properties_get_int( mlt_properties this, const char *name )
{
    mlt_property value = mlt_properties_find( this, name );
TagsNo tags attached.
Build/Install MethodManual build from SVN
Attached Files

- Relationships

-  Notes
(0005741)
Granjow (developer)
2010-09-01 11:31

Just got this segfault again.

Deleting the thumbnails cache solved the problem (temporarily).
(0005771)
Granjow (developer)
2010-09-04 12:19

Backtrace:
0 mlt_properties_find mlt_properties.c 348 0x00007ffff78aecd6
1 mlt_properties_get_int mlt_properties.c 720 0x00007ffff78aecd6
2 producer_set_up_video producer_avformat.c 1413 0x00007fffe3e14c88
3 producer_get_frame producer_avformat.c 2022 0x00007fffe3e14c88
4 producer_get_frame mlt_producer.c 578 0x00007ffff78b4c4f
5 mlt_service_get_frame mlt_service.c 489 0x00007ffff78b34f7
6 Mlt::Service::get_frame(int) /usr/lib/libmlt++.so.3 0 0x00007ffff7698efd
7 MyThread::run kthumb.cpp 90 0x0000000000511440
8 ?? /usr/lib/libQtCore.so.4 0 0x00007ffff421fe35
9 start_thread pthread_create.c 300 0x00007ffff25398ba
10 clone clone.S 112 0x00007ffff281e01d
11 ?? 0 0x0000000000000000


Other about 70 threads similar to 0001759.
1:
0 __lll_lock_wait lowlevellock.S 136 0x00007ffff2540be4
1 _L_lock_953 /lib/libpthread.so.0 0 0x00007ffff253c0e9
2 __pthread_mutex_lock pthread_mutex_lock.c 61 0x00007ffff253bf0b
3 mlt_cache_put mlt_cache.c 362 0x00007ffff78bd98f
4 producer_avformat_init producer_avformat.c 223 0x00007fffe3e1470b
5 mlt_factory_producer mlt_factory.c 242 0x00007ffff78bba4a
6 create_from producer_loader.c 43 0x00007fffddd05545
7 create_producer producer_loader.c 94 0x00007fffddd05545
8 producer_loader_init producer_loader.c 168 0x00007fffddd05898
9 mlt_factory_producer mlt_factory.c 242 0x00007ffff78bba4a
10 Mlt::Producer::Producer(Mlt::Profile&, char const*, char const*) /usr/lib/libmlt++.so.3 0 0x00007ffff76958ae
11 Render::getFileProperties renderer.cpp 643 0x000000000049bd93
12 Render::qt_metacall renderer.moc 148 0x000000000049e625
13 QMetaObject::activate(QObject*, QMetaObject const*, int, void**) /usr/lib/libQtCore.so.4 0 0x00007ffff4322346
14 ProjectList::getFileProperties projectlist.moc 268 0x0000000000473f28
15 ProjectList::slotProcessNextClipInQueue projectlist.cpp 987 0x0000000000478e81
16 ProjectList::qt_metacall projectlist.moc 243 0x000000000047ddca
17 QMetaObject::activate(QObject*, QMetaObject const*, int, void**) /usr/lib/libQtCore.so.4 0 0x00007ffff4322346
18 ?? /usr/lib/libQtCore.so.4 0 0x00007ffff432984f
19 QObject::event(QEvent*) /usr/lib/libQtCore.so.4 0 0x00007ffff431eba3
20 QApplicationPrivate::notify_helper(QObject*, QEvent*) /usr/lib/libQtGui.so.4 0 0x00007ffff345432c
21 QApplication::notify(QObject*, QEvent*) /usr/lib/libQtGui.so.4 0 0x00007ffff345a80b
22 KApplication::notify(QObject*, QEvent*) /usr/lib/libkdeui.so.5 0 0x00007ffff6fd9836
23 QCoreApplication::notifyInternal(QObject*, QEvent*) /usr/lib/libQtCore.so.4 0 0x00007ffff430f15c
24 ?? /usr/lib/libQtCore.so.4 0 0x00007ffff433bed2
25 ?? /usr/lib/libQtCore.so.4 0 0x00007ffff4338a48
26 g_main_context_dispatch /lib/libglib-2.0.so.0 0 0x00007fffeeb9f6c2
27 ?? /lib/libglib-2.0.so.0 0 0x00007fffeeba3538
28 g_main_context_iteration /lib/libglib-2.0.so.0 0 0x00007fffeeba36ec
29 QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) /usr/lib/libQtCore.so.4 0 0x00007ffff4338713
30 ?? /usr/lib/libQtGui.so.4 0 0x00007ffff350414e
31 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) /usr/lib/libQtCore.so.4 0 0x00007ffff430da82
32 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) /usr/lib/libQtCore.so.4 0 0x00007ffff430de5c
33 QCoreApplication::exec() /usr/lib/libQtCore.so.4 0 0x00007ffff4312aeb
34 main main.cpp 88 0x000000000044fa74
(0005886)
ddennedy (developer)
2010-09-22 05:58

you probably caught mlt at a bad time. there were problems with mlt git around this time.
(0005955)
Granjow (developer)
2010-10-09 15:32

No -- got it again today. Despairedly trying to load a project and it fails and fails and fails.
(0005956)
ddennedy (developer)
2010-10-09 21:13

Does melt play the project? (please use the appropriate -profile).
(0005958)
Granjow (developer)
2010-10-10 10:51

Yes, it does.

kdenlive crashes during the thumbnail creating process. Usually either here or in utils.c.
(0006121)
Granjow (developer)
2010-11-26 14:57

I again reached a point where I cannot open a project anymore.
Can I somehow compile MLT in debug mode?
(0006122)
ddennedy (developer)
2010-11-27 00:54

Yes. After configure, edit config.mak and remove the OPTIMIZATIONS line.
(0006123)
Granjow (developer)
2010-11-27 08:14

Thanks – looks better now.
mlt_properties_find is called by mlt_properties_get_int:
    mlt_property value = mlt_properties_find( this, name );
this = 0x0, name = "video_index"

Itself called in producer_set_up_video with properties = 0x0, producer = 0x0. this = <unavailable synchroneous data>.

I guess this does not help so much yet ... any idea how to locate the problem?
(0006135)
ddennedy (developer)
2010-11-29 06:09

mlt_properties_get_int is called with an invalid pointer. One could argue there should be checks for that, and that is a valid argument, but there would have to be many added in a total audit of the framework code to address this bug that way. So, look higher in the call stack for when the first null pointer is passes where it was assumed valid. Please post a full backtrace if you want some help with that.
(0006136)
ddennedy (developer)
2010-11-29 06:13

Both you and Mario show the bug is occurring somewhere within kthumb.cpp and that there are many threads. Is Kdenlive still completely parallelizing some thumbnailing with no bounds? Oh, I see JB made some change to QtConcurrent. From the Qt docs: "Programs written with QtConcurrent automatically adjust the number of threads used according to the number of processor cores available." Good.
(0006137)
Granjow (developer)
2010-11-29 07:14

I can confirm as well that it is working now here with a limited number of threads. Thanks Dan and JB for fixing this!
(0006138)
mariosk8s (reporter)
2010-11-29 07:59

Here's the data from when this happened to me in revision <= 5123
Thius is the excerpt of my email to the kdenlive-devel list:

Hi,
i'm new to this list. I'm also new to video editing, or developing the editor
for that matter. I'm trying to put together a video using a lot of stills and
video clips. I started by assembling all the clips i wanted to use. There are
around 270 of them. Then i started to assemble some footage.
Somewhere along the lines kdenlive started segfaulting.

So i got the source for mlt (git) and kdenlive (svn), removed the packages,
built debug versions and ran kdenlive under kdevelop.

I turned on logging for kdenlive and find that after 30 runs of MyThread::run
things segfault in mlt_properties_find
        property_list *list = this->local;
because 'this' is null. The stack looks like this:

#0 mlt_properties_find() at
/data/netlocal/foss/video/mlt/src/framework/mlt_properties.c:347
#1 mlt_properties_get_int() at
/data/netlocal/foss/video/mlt/src/framework/mlt_properties.c:719
0000002 producer_set_up_video() at
/data/netlocal/foss/video/mlt/src/modules/avformat/producer_avformat.c:1604
0000003 producer_get_frame() at
/data/netlocal/foss/video/mlt/src/modules/avformat/producer_avformat.c:2221
0000004 producer_get_frame() at
/data/netlocal/foss/video/mlt/src/framework/mlt_producer.c:577
0000005 mlt_service_get_frame() at
/data/netlocal/foss/video/mlt/src/framework/mlt_service.c:480
0000006 Mlt::Service::get_frame(int)() at /home/mario/usr/lib/libmlt++.so.3:-1
0000007 MyThread::run() at /data/netlocal/foss/video/kdenlive/src/kthumb.cpp:89
0000008 QThreadPrivate::start() at thread/qthread_unix.cpp:265
0000009 start_thread() at pthread_create.c:303
0000010 clone() at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
0000011 ??() at :-1


It's not clear to me which list is the right one for this, as it crashes in
mlt, but always does after 30 mythread runs.

I've been staring at this code for a day trying to fix it, but am currently
still rather clueless as to how a lot of it functions. I was hoping to get
some insight on why this might be happening, so that i or someone else can fix
it. Unless i'm doing something wrong, in which case i would appreciate some
cluesticks in that regard.

This all is happening on Kubuntu Maverik 64bit.

Please let me know if this is the wrong list, or more info is needed.

Mario

- Issue History
Date Modified Username Field Change
2010-08-23 15:13 Granjow New Issue
2010-08-23 15:21 Granjow Summary Segfault when loading project => Segfault in mlt_properties.c when loading project
2010-09-01 11:31 Granjow Note Added: 0005741
2010-09-04 12:19 Granjow Note Added: 0005771
2010-09-22 05:58 ddennedy Note Added: 0005886
2010-09-22 05:58 ddennedy Assigned To => ddennedy
2010-09-22 05:58 ddennedy Status new => feedback
2010-09-22 06:21 ddennedy Assigned To ddennedy =>
2010-10-09 15:32 Granjow Note Added: 0005955
2010-10-09 15:32 Granjow Status feedback => new
2010-10-09 21:13 ddennedy Note Added: 0005956
2010-10-10 10:51 Granjow Note Added: 0005958
2010-11-26 14:57 Granjow Note Added: 0006121
2010-11-27 00:54 ddennedy Note Added: 0006122
2010-11-27 08:14 Granjow Note Added: 0006123
2010-11-29 06:09 ddennedy Note Added: 0006135
2010-11-29 06:13 ddennedy Note Added: 0006136
2010-11-29 07:14 Granjow Note Added: 0006137
2010-11-29 07:59 mariosk8s Note Added: 0006138
2010-11-30 00:18 j-b-m Status new => resolved
2010-11-30 00:18 j-b-m Fixed in Version => Recent git
2010-11-30 00:18 j-b-m Resolution open => fixed
2010-11-30 00:18 j-b-m Assigned To => j-b-m
2011-04-26 21:58 j-b-m Fixed in Version Recent git => 0.8
2011-06-10 10:48 Granjow Status resolved => closed


Copyright © 2000 - 2014 MantisBT Team
Powered by Mantis Bugtracker