segfault with small pyqt script
hpj at urpla.net
Sun Aug 15 23:17:13 CEST 2010
On Thursday 12 August 2010, 01:07:25 Gelonida wrote:
> Hi Guys,
> I'm desperate. I'm having a real application, which fails rather often
> when finishing it. I'm not sure, whether any serious problem could be
> hidden behind it
> The script is a pyqt script, which segfaults most of the time on my
> ubuntu 10.4 linux 64 bit and I'm having trouble to understand why.
> Trying to create the smallest possible test case I ended up with
> following script, which I named dodo.py and which i made executable with
> chmod +x ./dodo.py
> #!/usr/bin/env python
> from PyQt4.QtGui import
> a = "one"
> b = "unused"
> c = "also unused"
> d= "ans also unused"
> e = "another var"
> f = "something"
> class MyForm(QDialog):
> def __init__(self,parent=None,config=None,ini_info=None):
> grid = QGridLayout()
> quit_btn = QPushButton("Quit")
> name = "a_name"
> vals_box = QComboBox()
> def quit(self):
> if __name__ == "__main__":
> app = QApplication()
> myform = MyForm()
> retcode = app.exec_()
> print "last"
> In order to perform the test several times I typed on the command line:
> a="" ; while [ "$a" = "" ] ; do ./dodo.py ; read -t 1 a ; done
> As soon as the window shows up
> I click twice (slowly ) on 'one' and then on quit.
For a starter, tell us the versions of python-sip, and python-qt4 or however
they're called in Ubuntu. For the record,
doesn't show this behavior.
More information about the Python-list