Crash on opening 0.5 project (SDL) - [Solved]

Dear Friends,

kdenlive r1649 and MLT r1019.
Another small issue, fully reproducable:

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 47361341517968 (LWP 24752)]
Qt: gdb: -nograb added to command-line options.
         Use the -dograb option to enforce grabbing.
kbuildsycoca running...
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:  + + CREATING CONSUMER WITH PROFILE: dv_pal
[New Thread 1082132816 (LWP 24770)]
[New Thread 1090525520 (LWP 24771)]
[Thread 1082132816 (LWP 24770) exited]
[Thread 1090525520 (LWP 24771) exited]
[New Thread 1090525520 (LWP 24772)]
[New Thread 1082132816 (LWP 24773)]
kdenlive: WARNING: KdenliveDoc::loadFromXML() document element has unknown tagName : kdenlivedoc
kdenlive: // DOCUMENT: /home/jmpoure/reportages/2007/20070529 - Interview de Marc Touati/projet.kdenlive, version: 0.5
kdenlive:  + + RESET CONSUMER WITH PROFILE: dv_pal
kdenlive:  + + RESET CONSUMER WITH PROFILE: dv_pal
[Thread 1090525520 (LWP 24772) exited]
[Thread 1082132816 (LWP 24773) exited]
kdenlive: Creating new document
kdenlive: deleting contents...
kdenlive: Creating new document DONE 
kdenlive: ****************  INIT DOCUMENT VIEW ***************
kdenlive:  + + CREATING CONSUMER WITH PROFILE: dv_pal
kdenlive:  + + CREATING CONSUMER WITH PROFILE: dv_pal
[New Thread 1082132816 (LWP 24788)]
[New Thread 1090525520 (LWP 24789)]
[Thread 1082132816 (LWP 24788) exited]
[Thread 1090525520 (LWP 24789) exited]
[New Thread 1090525520 (LWP 24790)]
[New Thread 1082132816 (LWP 24791)]
kdenlive: KdenliveDoc in closeDocument()
kdenlive: deleting contents...
kdenlive: WARNING:  ++++ WARNING, UNABLE TO CREATE MLT PRODUCER
kdenlive: WARNING: Got a request for a changed clip that is not in the document : marc_touati2007.05.29_11-48-25.avi
kdenlive: *** DOCUMENT adding clip: marc_touati2007.05.29_11-48-25.avi
[Thread 1090525520 (LWP 24790) exited]
[Thread 1082132816 (LWP 24791) exited]
[New Thread 1082132816 (LWP 24792)]
[New Thread 1090525520 (LWP 24793)]
[Thread 1082132816 (LWP 24792) exited]
[Thread 1090525520 (LWP 24793) exited]
kdenlive: *** DOCUMENT adding clip: generique_les_supers_heros_de_l_immobilier.png
kdenlive: *** DOCUMENT adding clip: generique001.png
kdenlive: *** DOCUMENT adding clip: generique002.png
kdenlive: *** DOCUMENT adding clip: generique003.png
kdenlive: *** DOCUMENT adding clip: generique004.png
kdenlive: *** DOCUMENT adding clip: banniere.png
kdenlive: *** DOCUMENT adding clip: generique_jmp.png
kdenlive: *** DOCUMENT adding clip: questions001.png
kdenlive: *** DOCUMENT adding clip: questions002.png
kdenlive: *** DOCUMENT adding clip: questions003.png
kdenlive: *** DOCUMENT adding clip: questions004.png
kdenlive: *** DOCUMENT adding clip: questions005.png
kdenlive: *** DOCUMENT adding clip: questions006.png
kdenlive: *** DOCUMENT adding clip: questions007.png
kdenlive: *** DOCUMENT adding clip: questions008.png
kdenlive: *** DOCUMENT adding clip: questions009.png
kdenlive: *** DOCUMENT adding clip: questions010.png
kdenlive: *** DOCUMENT adding clip: questions011.png
kdenlive: *** DOCUMENT adding clip: questions012.png
[New Thread 1090525520 (LWP 24794)]
[New Thread 1082132816 (LWP 24795)]
kdenlive:  + + +  Loading Time : 2338ms
kdenlive: **********  FREED MEM FOR: marc_touati2007.05.29_11-48-25.avi, COUNT: 0
[New Thread 1098918224 (LWP 24796)]
[New Thread 1107310928 (LWP 24797)]
kdenlive: **********  FREED MEM FOR: marc_touati2007.05.29_11-48-25.avi, COUNT: 0

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1098918224 (LWP 24796)]
producer_get_image (frame=0xea70b0, buffer=0x418020c8, format=0x418020e0, width=0x41801b90, height=0x41801b94, writable=) at producer_avformat.c:476
476             AVCodecContext *codec_context = stream->codec;
(gdb) bt
#0  producer_get_image (frame=0xea70b0, buffer=0x418020c8, format=0x418020e0, width=0x41801b90, height=0x41801b94, writable=)
    at producer_avformat.c:476
#1  0x00002b132514b6c1 in mlt_frame_get_image (this=0xea70b0, buffer=0x418020c8, format=0x418020e0, width=0x41801b90, height=0x41801b94, writable=1) at mlt_frame.c:257
#2  0x00002aaab0546abd in filter_get_image (this=0xea70b0, image=0x418020c8, format=0x418020e0, width=0x41801b90, height=0x41801b94, writable=1) at filter_deinterlace.c:45
#3  0x00002b132514b6c1 in mlt_frame_get_image (this=0xea70b0, buffer=0x418020c8, format=0x418020e0, width=0x41801b90, height=0x41801b94, writable=0) at mlt_frame.c:257
#4  0x00002b132cc9399c in filter_get_image (this=0xea70b0, image=0x418020c8, format=0x418020e0, width=0x41801c9c, height=0x41801c98, writable=0) at filter_rescale.c:212
#5  0x00002b132514b6c1 in mlt_frame_get_image (this=0xea70b0, buffer=0x418020c8, format=0x418020e0, width=0x41801c9c, height=0x41801c98, writable=0) at mlt_frame.c:257
#6  0x00002b132cc93d65 in filter_get_image (this=0xea70b0, image=0x418020c8, format=0x418020e0, width=0x418020d8, height=0x418020dc, writable=0) at filter_resize.c:114
#7  0x00002b132514b6c1 in mlt_frame_get_image (this=0xea70b0, buffer=0x418020c8, format=0x418020e0, width=0x418020d8, height=0x418020dc, writable=0) at mlt_frame.c:257
#8  0x00002b132e674a04 in filter_get_image (this=0xea70b0, image=0x418020c8, format=0x418020e0, width=0x418020d8, height=0x418020dc, writable=)
    at filter_avcolour_space.c:100
#9  0x00002b132514b6c1 in mlt_frame_get_image (this=0xea70b0, buffer=0x418020c8, format=0x418020e0, width=0x418020d8, height=0x418020dc, writable=0) at mlt_frame.c:257
#10 0x00002b132d6f93c3 in consumer_thread (arg=) at consumer_sdl_still.c:457
#11 0x00002b1329f74317 in I��H�T$0��uH�r�  () from /lib/libpthread.so.0
#12 0x00002b132b129aad in  () from /lib/libc.so.6

Project file:

Now testing using Valgrind:

valgrind --leak-check=full --log-file-exactly=log.txt -v kdenlive
kbuildsycoca running...
DCOP Cleaning up dead connections.
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:  + + CREATING CONSUMER WITH PROFILE: dv_pal
kdenlive: WARNING: KdenliveDoc::loadFromXML() document element has unknown tagName : kdenlivedoc
kdenlive: // DOCUMENT: /home/jmpoure/reportages/2007/20070529 - Interview de Marc Touati/projet.kdenlive, version: 0.5
kdenlive:  + + RESET CONSUMER WITH PROFILE: dv_pal
kdenlive:  + + RESET CONSUMER WITH PROFILE: dv_pal
kdenlive: Creating new document
kdenlive: deleting contents...
kdenlive: Creating new document DONE 
kdenlive: ****************  INIT DOCUMENT VIEW ***************
kdenlive:  + + CREATING CONSUMER WITH PROFILE: dv_pal
kdenlive:  + + CREATING CONSUMER WITH PROFILE: dv_pal
kdenlive: KdenliveDoc in closeDocument()
kdenlive: deleting contents...
kdenlive: WARNING:  ++++ WARNING, UNABLE TO CREATE MLT PRODUCER
kdenlive: WARNING: Got a request for a changed clip that is not in the document : marc_touati2007.05.29_11-48-25.avi
kdenlive: *** DOCUMENT adding clip: marc_touati2007.05.29_11-48-25.avi
kdenlive: *** DOCUMENT adding clip: generique_les_supers_heros_de_l_immobilier.png
kdenlive: *** DOCUMENT adding clip: generique001.png
kdenlive: *** DOCUMENT adding clip: generique002.png
kdenlive: *** DOCUMENT adding clip: generique003.png
kdenlive: *** DOCUMENT adding clip: generique004.png
kdenlive: *** DOCUMENT adding clip: banniere.png
kdenlive: *** DOCUMENT adding clip: generique_jmp.png
kdenlive: *** DOCUMENT adding clip: questions001.png
kdenlive: *** DOCUMENT adding clip: questions002.png
kdenlive: *** DOCUMENT adding clip: questions003.png
kdenlive: *** DOCUMENT adding clip: questions004.png
kdenlive: *** DOCUMENT adding clip: questions005.png
kdenlive: *** DOCUMENT adding clip: questions006.png
kdenlive: *** DOCUMENT adding clip: questions007.png
kdenlive: *** DOCUMENT adding clip: questions008.png
kdenlive: *** DOCUMENT adding clip: questions009.png
kdenlive: *** DOCUMENT adding clip: questions010.png
kdenlive: *** DOCUMENT adding clip: questions011.png
kdenlive: *** DOCUMENT adding clip: questions012.png
kdenlive:  + + +  Loading Time : 68097ms
kdenlive: **********  FREED MEM FOR: marc_touati2007.05.29_11-48-25.avi, COUNT: 0
kdenlive: **********  FREED MEM FOR: marc_touati2007.05.29_11-48-25.avi, COUNT: 0
KCrash: Application 'kdenlive' crashing...
kdenlive: Fatal IO error: client killed
ICE default IO error handler doing an exit(), pid = 25009, errno = 9
kdenlive: WARNING:  ++++ WARNING, UNABLE TO CREATE MLT PRODUCER

Forums:

I just made a commit (revision 1650) that fixes frequent crashes on project opening.
Does it fix your issue ?

Thank you very much Jean-Baptiste for handling this bug so quickly.
Unfortunately, this did not solve the crash on this project.

I will post a complete log tonight.

Kind regards, Jean-Michel

kdenlive 1650
MLT 1019

Updated traces:

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 46953468838032 (LWP 8550)]
Qt: gdb: -nograb added to command-line options.
         Use the -dograb option to enforce grabbing.
kbuildsycoca running...
DCOP Cleaning up dead connections.
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:  + + CREATING CONSUMER WITH PROFILE: dv_pal
[New Thread 1082132816 (LWP 8568)]
[New Thread 1090525520 (LWP 8569)]
[Thread 1082132816 (LWP 8568) exited]
[Thread 1090525520 (LWP 8569) exited]
[New Thread 1090525520 (LWP 8570)]
[New Thread 1082132816 (LWP 8571)]
kdenlive: WARNING: KdenliveDoc::loadFromXML() document element has unknown tagName : kdenlivedoc
kdenlive: // DOCUMENT: /home/jmpoure/reportages/2007/20070529 - Interview de Marc Touati/projet.kdenlive, version: 0.5
kdenlive:  + + RESET CONSUMER WITH PROFILE: dv_pal
kdenlive:  + + RESET CONSUMER WITH PROFILE: dv_pal
[Thread 1090525520 (LWP 8570) exited]
[Thread 1082132816 (LWP 8571) exited]
kdenlive: Creating new document
kdenlive: deleting contents...
kdenlive: Creating new document DONE 
kdenlive: ****************  INIT DOCUMENT VIEW ***************
kdenlive:  + + CREATING CONSUMER WITH PROFILE: dv_pal
kdenlive:  + + CREATING CONSUMER WITH PROFILE: dv_pal
[New Thread 1082132816 (LWP 8589)]
[New Thread 1090525520 (LWP 8590)]
[Thread 1082132816 (LWP 8589) exited]
[Thread 1090525520 (LWP 8590) exited]
[New Thread 1090525520 (LWP 8591)]
[New Thread 1082132816 (LWP 8592)]
kdenlive: KdenliveDoc in closeDocument()
kdenlive: deleting contents...
kdenlive: WARNING: Got a request for a changed clip that is not in the document : marc_touati2007.05.29_11-48-25.avi
kdenlive: *** DOCUMENT adding clip: marc_touati2007.05.29_11-48-25.avi
[Thread 1090525520 (LWP 8591) exited]
[Thread 1082132816 (LWP 8592) exited]
[New Thread 1082132816 (LWP 8593)]
[New Thread 1090525520 (LWP 8594)]
[Thread 1082132816 (LWP 8593) exited]
[Thread 1090525520 (LWP 8594) exited]
kdenlive: *** DOCUMENT adding clip: generique_les_supers_heros_de_l_immobilier.png
kdenlive: *** DOCUMENT adding clip: generique001.png
kdenlive: *** DOCUMENT adding clip: generique002.png
kdenlive: *** DOCUMENT adding clip: generique003.png
kdenlive: *** DOCUMENT adding clip: generique004.png
kdenlive: *** DOCUMENT adding clip: banniere.png
kdenlive: *** DOCUMENT adding clip: generique_jmp.png
kdenlive: *** DOCUMENT adding clip: questions001.png
kdenlive: *** DOCUMENT adding clip: questions002.png
kdenlive: *** DOCUMENT adding clip: questions003.png
kdenlive: *** DOCUMENT adding clip: questions004.png
kdenlive: *** DOCUMENT adding clip: questions005.png
kdenlive: *** DOCUMENT adding clip: questions006.png
kdenlive: *** DOCUMENT adding clip: questions007.png
kdenlive: *** DOCUMENT adding clip: questions008.png
kdenlive: *** DOCUMENT adding clip: questions009.png
kdenlive: *** DOCUMENT adding clip: questions010.png
kdenlive: *** DOCUMENT adding clip: questions011.png
kdenlive: *** DOCUMENT adding clip: questions012.png
[New Thread 1090525520 (LWP 8598)]
[New Thread 1082132816 (LWP 8599)]
kdenlive:  + + +  Loading Time : 3006ms
kdenlive: **********  FREED MEM FOR: marc_touati2007.05.29_11-48-25.avi, COUNT: 0
kdenlive: **********  FREED MEM FOR: marc_touati2007.05.29_11-48-25.avi, COUNT: 0
[New Thread 1098918224 (LWP 8600)]
[New Thread 1107310928 (LWP 8601)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1098918224 (LWP 8600)]
0x00002ab433f1cc70 in ���� () from /lib/libc.so.6
(gdb) bt
#0  0x00002ab433f1cc70 in ���� () from /lib/libc.so.6
#1  0x00002ab436546738 in consumer_thread (arg=)
    at consumer_sdl_still.c:497
#2  0x00002ab432dc1317 in I��H�T$0��uH�r�  () from /lib/libpthread.so.0
#3  0x00002ab433f76aad in  () from /lib/libc.so.6
(gdb) 

valgrind log:

valgrind --leak-check=full --log-file-exactly=log.txt -v kdenlive
kbuildsycoca running...
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:  + + CREATING CONSUMER WITH PROFILE: dv_pal
kdenlive: WARNING: KdenliveDoc::loadFromXML() document element has unknown tagName : kdenlivedoc
kdenlive: // DOCUMENT: /home/jmpoure/reportages/2007/20070529 - Interview de Marc Touati/projet.kdenlive, version: 0.5
kdenlive:  + + RESET CONSUMER WITH PROFILE: dv_pal
kdenlive:  + + RESET CONSUMER WITH PROFILE: dv_pal
kdenlive: Creating new document
kdenlive: deleting contents...
kdenlive: Creating new document DONE 
kdenlive: ****************  INIT DOCUMENT VIEW ***************
kdenlive:  + + CREATING CONSUMER WITH PROFILE: dv_pal
kdenlive:  + + CREATING CONSUMER WITH PROFILE: dv_pal
kdenlive: KdenliveDoc in closeDocument()
kdenlive: deleting contents...
kdenlive: WARNING: Got a request for a changed clip that is not in the document : marc_touati2007.05.29_11-48-25.avi
kdenlive: *** DOCUMENT adding clip: marc_touati2007.05.29_11-48-25.avi
kdenlive: *** DOCUMENT adding clip: generique_les_supers_heros_de_l_immobilier.png
kdenlive: *** DOCUMENT adding clip: generique001.png
kdenlive: *** DOCUMENT adding clip: generique002.png
kdenlive: *** DOCUMENT adding clip: generique003.png
kdenlive: *** DOCUMENT adding clip: generique004.png
kdenlive: *** DOCUMENT adding clip: banniere.png
kdenlive: *** DOCUMENT adding clip: generique_jmp.png
kdenlive: *** DOCUMENT adding clip: questions001.png
kdenlive: *** DOCUMENT adding clip: questions002.png
kdenlive: *** DOCUMENT adding clip: questions003.png
kdenlive: *** DOCUMENT adding clip: questions004.png
kdenlive: *** DOCUMENT adding clip: questions005.png
kdenlive: *** DOCUMENT adding clip: questions006.png
kdenlive: *** DOCUMENT adding clip: questions007.png
kdenlive: *** DOCUMENT adding clip: questions010.png
kdenlive: *** DOCUMENT adding clip: questions011.png
kdenlive: *** DOCUMENT adding clip: questions012.png
kdenlive:  + + +  Loading Time : 60240ms
kdenlive: **********  FREED MEM FOR: marc_touati2007.05.29_11-48-25.avi, COUNT: 0
kdenlive: **********  FREED MEM FOR: marc_touati2007.05.29_11-48-25.avi, COUNT: 0
KCrash: Application 'kdenlive' crashing...
kdenlive: Fatal IO error: client killed
Unable to start Dr. Konqi

When opening the project, the error now is:

Quote:
KCrash: Application 'kdenlive' crashing...
QSocketNotifier: invalid socket 15 and type 'Read', disabling...
QSocketNotifier: invalid socket 13 and type 'Read', disabling...
QSocketNotifier: invalid socket 7 and type 'Read', disabling...
kdenlive: Fatal IO error: client killed
ICE default IO error handler doing an exit(), pid = 20382, errno = 9

This problem was fixed by SDL patch proposed by Ryan.