openshot.developers team mailing list archive
-
openshot.developers team
-
Mailing list archive
-
Message #00210
Re: Segmentation Fault: any ideas?
With the MLt debug libraries now available I can see more detail. Here's
what I think is a clue:
-----
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f81ccdcf950 (LWP 26699)]
mlt_properties_fetch (this=0x0, name=0x7f81da0ac6df "_speed") at mlt_properties.c:348
348 mlt_properties.c: No such file or directory.
in mlt_properties.c
(gdb) bt full
#0 mlt_properties_fetch (this=0x0, name=0x7f81da0ac6df "_speed") at mlt_properties.c:348
property = <value optimized out>
#1 0x00007f81da09f3fe in mlt_properties_set_double (this=0x0, name=0x7f81da0ac6df "_speed", value=0)
at mlt_properties.c:822
error = 1
property = <value optimized out>
#2 0x00007f81da711bf6 in _wrap_Producer_set_speed () from /var/lib/python-support/python2.6/_mlt.so
No locals.
#3 0x000000000041d3bd in PyObject_Call ()
No symbol table info available.
#4 0x00000000004a1460 in PyEval_EvalFrameEx ()
No symbol table info available.
#5 0x00000000004a4649 in PyEval_EvalCodeEx ()
No symbol table info available.
#6 0x00000000004a2cb0 in PyEval_EvalFrameEx ()
No symbol table info available.
#7 0x00000000004a3dae in PyEval_EvalFrameEx ()
No symbol table info available.
#8 0x00000000004a3dae in PyEval_EvalFrameEx ()
No symbol table info available.
#9 0x00000000004a4649 in PyEval_EvalCodeEx ()
No symbol table info available.
#10 0x00000000005329ad in ?? ()
No symbol table info available.
#11 0x000000000041d3bd in PyObject_Call ()
No symbol table info available.
#12 0x0000000000424f48 in ?? ()
No symbol table info available.
#13 0x000000000041d3bd in PyObject_Call ()
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
#14 0x000000000049cd46 in PyEval_CallObjectWithKeywords ()
No symbol table info available.
#15 0x00000000004d3b3d in ?? ()
No symbol table info available.
#16 0x00007f81e658d3ba in start_thread (arg=<value optimized out>) at pthread_create.c:297
__res = <value optimized out>
pd = (struct pthread *) 0x7f81ccdcf950
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -275163334407203106, 8392704, 0, 140195896500288, 140737196575024,
229109491494442718, 229015997492778718}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {
prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = <value optimized out>
robust = <value optimized out>
#17 0x00007f81e5a55fcd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
No locals.
#18 0x0000000000000000 in ?? ()
-----
Looks like I may need to build the MLT libraries with no compiler optimisations.
"mlt/src/framework/mlt_properties.c" shows:
-----
int mlt_properties_set_double( mlt_properties this, const char *name, double value )
{
int error = 1;
// Fetch the property to work with
mlt_property property = mlt_properties_fetch( this, name );
...
static mlt_property mlt_properties_fetch( mlt_properties this, const char *name )
{
// Try to find an existing property first
mlt_property property = mlt_properties_find( this, name );
...
static inline mlt_property mlt_properties_find( mlt_properties this, const char *name )
{
property_list *list = this->local;
-----
The stack dump shows "this" is NULL which would explains the SEGFAULT at
this point.
Now to figure out why. mlt_properties_set_double() is called from
_wrap_Producer_set_speed() which in turn maps to
"/usr/share/python-support/python-mlt/mlt.py":
-----
def set_speed(*args): return _mlt.Producer_set_speed(*args)
-----
This *may* be called from openshot/classes/video.py::player.run() but as
the debug trace doesn't show a call-path in the stack it is hard to be
sure:
-----
# Start the mlt system
self.f = mlt.Factory().init( )
# set the MLT profile object... specifiec in the project properties
self.profile = profiles.mlt_profiles().get_profile(self.project.project_type)
# Create the producer
self.p = mlt.Producer( self.profile, 'xml:%s' % os.path.join(BASE_DIR, self.file_name))
if self.p:
# set speed to zero (i.e. pause)
self.p.set_speed(0)
-----
There are only three threads running at the time:
-----
(gdb) info threads
* 3 Thread 0x7f81ccdcf950 (LWP 26699) mlt_properties_fetch (this=0x0, name=0x7f81da0ac6df "_speed")
at mlt_properties.c:348
2 Thread 0x7f81d9d84950 (LWP 26698) 0x00007f81e5a4e742 in select () from /lib/libc.so.6
1 Thread 0x7f81e69986f0 (LWP 26689) sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
-----
Follow ups
References