Recently in one of my programs I got a segmentation fault problem. I managed to find the line that its is causing the problem but I haven't find the way of fixing it.
the line:
self.window_player.add(self.vlc)
where self.vlc
is a widget and self.window_player
is an empty Gtk.Window()
created in glade.
The line is at the __init__
of my program, so actually this problem only happen when launching the program. The weird fact is that the error only appears like 1 of 10 times (of launching the program)
the error:
Segmentation fault
is the only output that I get from the terminal
So I tried:
while True:
try:
self.window_player.add(self.vlc)
break
except:
print "segmentation"
The problem is that the segmentation fault don't seems to be excepted by the try
!