segfault with small pyqt script

Gelonida gelonida at gmail.com
Mon Aug 16 09:22:27 CEST 2010


Hi Hans-Peter,


It seems, that my other posts did not get through.

On 08/15/2010 11:17 PM, Hans-Peter Jansen wrote:
> For a starter, tell us the versions of python-sip, and python-qt4 or however 
> they're called in Ubuntu. For the record, 
> python-sip-4.10.5-1.1
> python-qt4-4.7.4-1.1
> doesn't show this behavior.
> 
> Pete

The problem seems to be known for 4.7.2.
For simple code I managed to work around the issue.
For the real more complicated I didn't. So it seems
I'll have to avoid 4.7.2.

Please see below:

On 08/13/2010 09:11 AM, Gelonida wrote:
> > Lee,
> >
> > On 08/13/2010 12:53 AM, Lee Harr wrote:
>> >>
>>> >>> 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.
>> >>
>> >>
>> >> Looks to be a known issue:
>> >> http://www.google.com/search?q=pyqt+segfault+on+exit
>> >> https://launchpad.net/bugs/561303
>> >>
>> >> The last activity on that bug is almost 2 months ago...
>> >> Hopefully the fix will be distributed soon.
> >
> >
> >
> > This seems to be the problem.
> >
> >
> > In my case I can workaround the issue by adding one line.
> >
> > if __name__ == "__main__":
> >     app = QApplication([])
> >     myform = MyForm()
> >     myform.show()
> >     retcode = app.exec_()
> >     myform = None # <<<< THIS IS THE WORK AROUND
> >     print "last"
> >
For more complex multi widget examples it doesn't seem enough to just
destroy the main widget.
probably I had to recursively assign all widgets / dialogues sub widgets
to None.

So I'll just try to stay away from this pyqt release and stick with
older or newer ones.









More information about the Python-list mailing list