openshot.developers team mailing list archive
-
openshot.developers team
-
Mailing list archive
-
Message #00208
Re: Segmentation Fault: any ideas?
On Sat, 2009-08-29 at 17:38 +0100, Helen McCall wrote:
> Hi TJ,
>
> I've been running through the code I have for version 0.9.25
>
> The only thing that has occurred to me is this:
>
> When you refactored to use ~/.openhot/westley.xml the original location
> was ~/openshot/main/westley.xml
Because I've doing so many invasive changes I've not updated my local
bzr branch. I forked to 'debian-packaging' and doing all my work there
with 'git' (I find git much easier and more powerful to use than bzr).
My changes put the 'westley' file in "~/.openshot/"
> The pid.lock file goes in ~/openshot/main/pid.lock in the version I am
> using. If you have not refactored this location then it might be causing
> problems.
Likewise I use "~/.openshot/pid.lock"
> Also the access to the sub-directories that OpenShot writes to such as
> thumbnail titles etc
At start-up in openshot.main() my code checks for the presence of
"~/.openshot/" and if it doesn't exist creates it and its
sub-directories:
-----
if not os.path.exists(USER_DIR):
try:
# create with permissions for this user and user-group only (rwx r-x ---)
os.mkdir(USER_DIR, 0750)
os.mkdir(os.path.join(USER_DIR, "queue"), 0750)
os.mkdir(os.path.join(USER_DIR, "thumbnails"), 0750)
except OSError:
sys.exit("Fatal: cannot create %s" % USER_DIR)
-----
But at the point it crashes its only needed to check the "queue"
directory (which it does successfully). The SEGFAULT kills python
entirely so I'm now debugging using the GNU debugger 'gdb'.
The point at which I insert the breakpoint is in classes/project.py
before single-stepping onwards:
-----
# play the video in it's own thread
self.form.MyVideo = video.player(self, self.form, "westley.xml", mode="preview")
self.form.MyVideo.start()
-----
I've attached the first output from a 'gdb' session. I've not had chance
to investigate it fully yet but it looks like I need to install
"libmlt1-dbg" libraries to get the full symbols but the "mlt" source
package doesn't create debug libraries *sigh*.
You'll see output here that the virgin openshot won't print. I've added
a debug flag "openshot.DEBUG" which controls display of additional
information in the console.
-----
tj@hephaestion:openshot$ gdb --args python -m pdb launcher
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
(no debugging symbols found)
(gdb) start
Breakpoint 1 at 0x417bb0
Starting program: /usr/bin/python -m pdb launcher
[Thread debugging using libthread_db enabled]
[New Thread 0x7f5766be66f0 (LWP 4867)]
[Switching to Thread 0x7f5766be66f0 (LWP 4867)]
0x0000000000417bb0 in main ()
(gdb) c
Continuing.
> /usr/share/openshot/launcher(21)<module>()
-> from openshot.openshot import main
(Pdb) break /usr/share/openshot/openshot/classes/project.py:201
Breakpoint 1 at /usr/share/openshot/openshot/classes/project.py:201
(Pdb) c
__file__=openshot/openshot.pyc
BASE_DIR=/usr/share/openshot
--------------------------------
OpenShot (version 0.9.24)
base = /usr/share/openshot
user = /home/tj/.openshot
--------------------------------
project: BASE_DIR=/usr/share/openshot
project: PROJECT_DIR=/usr/share/openshot/projects
project: USER_DIR=/home/tj/.openshot
[New Thread 0x7f5759fd2950 (LWP 4978)]
SimpleGladeApp.__init__(self, /usr/share/openshot/openshot/windows/glade/Main.glade, frmMain, OpenShot)
glade_path=/usr/share/openshot/openshot/windows/glade/Main.glade
create_glade(self, /usr/share/openshot/openshot/windows/glade/Main.glade, frmMain, OpenShot)
openshot/windows/SimpleGladeApp.py:347: GtkWarning: gtk_toolbar_set_icon_size: assertion `icon_size != GTK_ICON_SIZE_INVALID' failed
return gtk.glade.XML(self.glade_path, root, domain)
A new frmMain has been created
SimpleGladeApp.__init__(self, /usr/share/openshot/openshot/windows/glade/Main.glade, mnuTrackPopup, OpenShot)
glade_path=/usr/share/openshot/openshot/windows/glade/Main.glade
create_glade(self, /usr/share/openshot/openshot/windows/glade/Main.glade, mnuTrackPopup, OpenShot)
SimpleGladeApp.__init__(self, /usr/share/openshot/openshot/windows/glade/Main.glade, mnuClipPopup, OpenShot)
glade_path=/usr/share/openshot/openshot/windows/glade/Main.glade
create_glade(self, /usr/share/openshot/openshot/windows/glade/Main.glade, mnuClipPopup, OpenShot)
SimpleGladeApp.__init__(self, /usr/share/openshot/openshot/windows/glade/Main.glade, mnuMarkerPopup, OpenShot)
glade_path=/usr/share/openshot/openshot/windows/glade/Main.glade
create_glade(self, /usr/share/openshot/openshot/windows/glade/Main.glade, mnuMarkerPopup, OpenShot)
SimpleGladeApp.__init__(self, /usr/share/openshot/openshot/windows/glade/Main.glade, mnuTransitionPopup, OpenShot)
glade_path=/usr/share/openshot/openshot/windows/glade/Main.glade
create_glade(self, /usr/share/openshot/openshot/windows/glade/Main.glade, mnuTransitionPopup, OpenShot)
SimpleGladeApp.__init__(self, /usr/share/openshot/openshot/windows/glade/Main.glade, mnuAnimateSubMenuPopup, OpenShot)
glade_path=/usr/share/openshot/openshot/windows/glade/Main.glade
create_glade(self, /usr/share/openshot/openshot/windows/glade/Main.glade, mnuAnimateSubMenuPopup, OpenShot)
SimpleGladeApp.__init__(self, /usr/share/openshot/openshot/windows/glade/Main.glade, mnuPositionSubMenuPopup, OpenShot)
glade_path=/usr/share/openshot/openshot/windows/glade/Main.glade
create_glade(self, /usr/share/openshot/openshot/windows/glade/Main.glade, mnuPositionSubMenuPopup, OpenShot)
> /usr/share/openshot/openshot/classes/project.py(201)RefreshXML()
-> self.form.MyVideo = video.player(self, self.form, "westley.xml", mode="preview")
(Pdb) n
> /usr/share/openshot/openshot/classes/project.py(202)RefreshXML()
-> self.form.MyVideo.start()
(Pdb) s
--Call--
> /usr/lib/python2.6/threading.py(461)start()
-> def start(self):
(Pdb) n
> /usr/lib/python2.6/threading.py(462)start()
-> if not self.__initialized:
(Pdb) n
> /usr/lib/python2.6/threading.py(464)start()
-> if self.__started.is_set():
(Pdb) n
> /usr/lib/python2.6/threading.py(467)start()
-> self._note("%s.start(): starting thread", self)
(Pdb) n
> /usr/lib/python2.6/threading.py(468)start()
-> _active_limbo_lock.acquire()
(Pdb) n
> /usr/lib/python2.6/threading.py(469)start()
-> _limbo[self] = self
(Pdb) n
> /usr/lib/python2.6/threading.py(470)start()
-> _active_limbo_lock.release()
(Pdb) n
> /usr/lib/python2.6/threading.py(471)start()
-> _start_new_thread(self.__bootstrap, ())
(Pdb) n
[New Thread 0x7f574d01d950 (LWP 5147)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f574d01d950 (LWP 5147)]
0x00007f575a2eb950 in ?? () from /usr/lib/libmlt.so.2
(gdb) bt
#0 0x00007f575a2eb950 in ?? () from /usr/lib/libmlt.so.2
#1 0x00007f575a2ed3fe in mlt_properties_set_double () from /usr/lib/libmlt.so.2
#2 0x00007f575a95fbf6 in ?? () from /var/lib/python-support/python2.6/_mlt.so
#3 0x000000000041d3bd in PyObject_Call ()
#4 0x00000000004a1460 in PyEval_EvalFrameEx ()
#5 0x00000000004a4649 in PyEval_EvalCodeEx ()
#6 0x00000000004a2cb0 in PyEval_EvalFrameEx ()
#7 0x00000000004a3dae in PyEval_EvalFrameEx ()
#8 0x00000000004a3dae in PyEval_EvalFrameEx ()
#9 0x00000000004a4649 in PyEval_EvalCodeEx ()
#10 0x00000000005329ad in ?? ()
#11 0x000000000041d3bd in PyObject_Call ()
#12 0x0000000000424f48 in ?? ()
#13 0x000000000041d3bd in PyObject_Call ()
#14 0x000000000049cd46 in PyEval_CallObjectWithKeywords ()
#15 0x00000000004d3b3d in ?? ()
#16 0x00007f57667db3ba in start_thread (arg=<value optimized out>) at pthread_create.c:297
#17 0x00007f5765ca3fcd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#18 0x0000000000000000 in ?? ()
(gdb)
Follow ups
References