On Wed, Oct 3, 2012 at 11:41 AM, Janne Liljeblad
<[email protected]> wrote:
> Hi,
>
> This is not a new issue, I've had similar issues before with GTK
> dialogs and MLT, but I found a way to reproduce crash reliably, so
> I'll report it now.
>
> The code path involved starts from "Save Title" button callback in my
> new titler:
> http://code.google.com/p/flowblade/source/browse/flowblade-trunk/Flowblade/tools/titler.py#422
>
> the important lines here are 430 - 432. If I comment these out, I'll
> get the crash:
> http://code.google.com/p/flowblade/source/browse/flowblade-trunk/Flowblade/tools/titler.py#430
> 430 while(gtk.events_pending()):
> 431 #print "iter"
> 432 gtk.main_iteration()
>
> ...then a Thread is started:
> http://code.google.com/p/flowblade/source/browse/flowblade-trunk/Flowblade/tools/titler.py#855
>
> ...media file is added to project:
>
> http://code.google.com/p/flowblade/source/browse/flowblade-trunk/Flowblade/projectdata.py#91
>
> ...using another thread object:
> http://code.google.com/p/flowblade/source/browse/flowblade-trunk/Flowblade/projectdata.py#276
>
> ...and the crashing line is:
> http://code.google.com/p/flowblade/source/browse/flowblade-trunk/Flowblade/projectdata.py#293
>
> gdb python backtrace attached.
#2 0x00007ffff5d32d72 in mlt_properties_get_position (self=0x0, name=
0x7ffff5d44fd0 "length") at mlt_properties.c:1010
Not all the C functions check all of its args. This situation is
analogous to calling a method on a python object reference set to None
- you shouldn't do that! In C++ constructors cannot return null, and
we do not use exceptions in mlt++, so you need to check if the
producer is_valid() before using it, which you did not. I did not read
all of the code you referenced to understand why the producer failed
to load, but perhaps the file is being generated immediately preceding
this point and is not actually ready.
> So unless I wait until all pending GTK events are handled in loop in
> titler.py lines 430 - 432, I'll always get a crash (unless actually I
> have confirmed overwrite which seems to handle all pending events
> too).
> http://code.google.com/p/flowblade/source/browse/flowblade-trunk/Flowblade/tools/titler.py#430
>
> If I do wait for all pending events, I never get crash.
>
> I'm not sure what should be done about this, but I hope this helps
> making MLT better and more stable.
>
>
>
> Janne
--
+-DRD-+
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Mlt-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mlt-devel