Why I get this segmentation fault?:
>>> import gtk
>>&g开发者_C百科t; a = gtk.Window()
>>> a.show()
>>> b = gtk.Dialog("hellooo")
>>> b.show() # here the dialog appears
>>> b.show()
Segmentation fault
Did you install from source or using your system's packages?
I would recommend a reinstall, using apt-get
, yum
or similar
I get a segmentation fault. So don't show() a dialog after it has been shown once. The object has been created and destroyed and you are trying to reuse it. Don't do that. Make a new one. Or: "Doctor, it hurts when I do this..."
You are likely running your code outside of a "graphical" environment. ie. one with a valid DISPLAY
environment variable.
精彩评论