On Sun, Sep 15, 2013 at 12:33 PM, Janne Liljeblad
<janne.liljeb...@gmail.com> wrote:
> Hi Dan,
>
> I found out that Frei0r plugins with F0R_PARAM_STRING parameters
> crashed when clips with these plugins were displayed.  Both Flowblade
> and Kdenlive crashed with identical backtraces.
>
> This did not affect "Curves" in Kdenlive which I assume uses
> "frei0r.curves" plugin which also has a F0R_PARAM_STRING parameter.
>
>
>
> After "frei0r.cairoaffineblend" compositor was added in Flowblade I
> got this backtrace
> every time a composited frame was displayed:
>
> (gdb) backtrace
> #0  0x00007ffff7012d9f in ?? () from /lib/x86_64-linux-gnu/libc.so.6
> #1  0x00007fff883d987b in f0r_set_param_value (instance=0x7fff9472d820,
>     param=<optimized out>, param_index=<optimized out>)
>     at 
> /home/janne/codes/frei0r-repository/frei0r/src/mixer2/cairoaffineblend/cairoaffineblend.c:175
> #2  0x00007fffdae4bd8e in process_frei0r_item ()
>    from /usr/lib/x86_64-linux-gnu/mlt/libmltfrei0r.so
> #3  0x00007fffdae4b9fd in ?? ()
>    from /usr/lib/x86_64-linux-gnu/mlt/libmltfrei0r.so
> #4  0x00007ffff602ad9a in mlt_frame_get_image ()
>    from /usr/lib/x86_64-linux-gnu/libmlt.so.5
> #5  0x00007ffff603dc2d in ?? () from /usr/lib/x86_64-linux-gnu/libmlt.so.5
> #6  0x00007ffff602ad9a in mlt_frame_get_image ()
>    from /usr/lib/x86_64-linux-gnu/libmlt.so.5
> #7  0x00007ffff603ac4d in ?? () from /usr/lib/x86_64-linux-gnu/libmlt.so.5
> #8  0x00007ffff7bc4f8e in start_thread ()
>    from /lib/x86_64-linux-gnu/libpthread.so.0
> #9  0x00007ffff6fcbe1d in clone () from /lib/x86_64-linux-gnu/libc.so.6
>
> This is code from cairoaffineblend.c
>
> case 6:
>     sval = (*(char**)param);
>     inst->blend_mode = (char*) realloc (inst->blend_mode, strlen(sval) + 1);
>     strcpy (inst->blend_mode, sval);
>
>
>
> Adding "frei0r.medians" filter in Kdenlive produces this backtrace
> when any frame of clip was displayed:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7fffc14c1700 (LWP 16126)]
> 0x00007ffff29d0d9f in ?? () from /lib/x86_64-linux-gnu/libc.so.6
> (gdb) backtrace
> #0  0x00007ffff29d0d9f in ?? () from /lib/x86_64-linux-gnu/libc.so.6
> #1  0x00007fffb9df9544 in f0r_set_param_value (instance=0x7fffb42bfba0,
>     parm=<optimized out>, param_index=<optimized out>)
>     at 
> /home/janne/codes/frei0r-repository/frei0r/src/filter/medians/medians.c:502
> #2  0x00007fffcf97ed8e in process_frei0r_item ()
>    from /usr/lib/x86_64-linux-gnu/mlt/libmltfrei0r.so
> #3  0x00007fffcf97e87e in ?? ()
>    from /usr/lib/x86_64-linux-gnu/mlt/libmltfrei0r.so
> #4  0x00007ffff4931d9a in mlt_frame_get_image ()
>    from /usr/lib/x86_64-linux-gnu/libmlt.so.5
> #5  0x00007ffff4944c2d in ?? () from /usr/lib/x86_64-linux-gnu/libmlt.so.5
> #6  0x00007ffff4931d9a in mlt_frame_get_image ()
>    from /usr/lib/x86_64-linux-gnu/libmlt.so.5
> #7  0x00007fffc6b35cb0 in ?? () from 
> /usr/lib/x86_64-linux-gnu/mlt/libmltsdl.so
> #8  0x00007ffff44f6f8e in start_thread ()
>    from /lib/x86_64-linux-gnu/libpthread.so.0
> #9  0x00007ffff2989e1d in clone () from /lib/x86_64-linux-gnu/libc.so.6
>
> This is the code in medians.c
>
> case 0:        //(string based list)
>     tmpch = (*(char**)parm);
>     p->liststr = (char*)realloc( p->liststr, strlen(tmpch) + 1 );
> THIS IS LINE 502
>     strcpy( p->liststr, tmpch );
>     p->type=0;
>     while ((strcmp(p->liststr,list1[p->type])!=0)&&(p->type<10)) p->type++;
>     break;
>
> Assuming Kdenlive uses "frei0r.curves" I discovered that this plugin
> did not crash.
>
> Corresponding code from "frei0r.curves".
> case 5:
>   bspline = *((f0r_param_string *)param);
>   if (strcmp(inst->bspline, bspline) != 0) {
>       free(inst->bspline);
>       inst->bspline = strdup(bspline);
>       updateBsplineMap(instance);
>   }
>
>
> Do you have any Idea what is going on?
>

I have not reproduced this yet, and from a brief code review, it looks
ok. I tried to reproduce it in Kdenlive on both Linux and OS X. I
tested applying the medians filter to the top/"B" clip transitioned
using cairoaffineblend. I also tested making parameter changes while
playing. Can you tell from your backtrace (using "thread apply all
bt") if another thread is changing the mlt property that backs the
frei0r string param while the crashed thread is inside
f0r_set_param_value? That could be a problem.

-- 
+-DRD-+

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to