开发者

Pygtk and segmentation fault

开发者 https://www.devze.com 2023-01-22 17:16 出处:网络
Why I get this segmentation fault?: >>> import gtk >>&g开发者_C百科t; a = gtk.Window()

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消