[PyQt] Bug report: multiple QApplication instances cause a segfault

David Townshend aquavitae69 at gmail.com
Wed Jun 22 12:21:24 BST 2011


On Tue, Jun 21, 2011 at 11:21 PM, Algis Kabaila <akabaila at pcug.org.au>wrote:

> On Wed, 22 Jun 2011 02:04:25 AM David Townshend wrote:
> > Hi
> >
> > I'm not sure of the appropriate place to file a PyQt bug report, so I
> hope
> > its ok to send it to this mailing list.
> >
> > The problem is that creating (and quitting) multiple QApplications in
> > succession causes a segfault.  This situation tends to occur in unit
> tests,
> > particularly in testing subclasses of QApplication.
> >
> > The following snippet illustrates the problem:
> > >>> from PyQt4 import QtGui
> > >>> app = QtGui.QApplication([])
> > >>> app.quit()
> > >>> app = QtGui.QApplication([])
> > >>> app.quit()
> > >>> app = QtGui.QApplication([])
> >
> > Segmentation fault
> >
> > Here is my python info:
> > Python 3.2 (r32:88445, Apr 15 2011, 11:09:05)
> > [GCC 4.5.2 20110127 (prerelease)] on linux2
> >
> > I'm using PyQt 4.8.4 on Arch Linux.  I have tried it on Windows XP, but
> the
> > segfault does not occur there.  I haven't tried other linux
> distributions.
> >
> > David
>
> David,
>
> There is a bug tracker for bug reports where the bugs should be reported. I
> do
> not remember its URL, however.
>
> On my  kubuntu "natty" OS  the results are somewhat different:
>
> Using GUI Bash Shell:
>
> ak at supremo:~$ python3
> Python 3.2 (r32:88445, Mar 25 2011, 19:56:22)
> [GCC 4.5.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from PyQt4 import QtGui
> >>> app = QtGui.QApplication([])
> >>> app.quit()
> >>> app = QtGui.QApplication([])
> >>> app.quit()
> >>> app = QtGui.QApplication([])
> >>> app.quit()
> >>> app = QtGui.QApplication([])
> >>> app.quit()
> >>> app = QtGui.QApplication([])
> >>> app.quit()
> >>>   [---> ctrl+D pressed to quit python3.2]
> Segmentation fault
> ak at supremo:~$
>
> Segmentation fault occured when quitting Python3.2, not when repeatedly
> creating and quitting app.
>
> Using IDLE things go strange sooner:
>
> Python 3.2 (r32:88445, Mar 25 2011, 19:56:22)
> [GCC 4.5.2] on linux2
> Type "copyright", "credits" or "license()" for more information.
> ==== No Subprocess ====
> >>> from PyQt4 import QtGui
> >>> app = QtGui.QApplication([])
> >>> app.quit()
> >>> app = QtGui.QApplication([])
> >>> app.quit()
>
> Python 3.2 IDLE shell vanishes from the screen without warning. No <Return>
> pressed after typing app.quit() !
>
> My Linux OS:
> ak at supremo:~$ lsb_release -a
> No LSB modules are available.
> Distributor ID: Ubuntu
> Description:    Ubuntu 11.04
> Release:        11.04
> Codename:       natty
> ak at supremo:~$
>
> PyQt4 and Qt versions:
>
> Python 3.2 (r32:88445, Mar 25 2011, 19:56:22)
> [GCC 4.5.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from PyQt4.QtCore import (PYQT_VERSION_STR, QT_VERSION_STR)
> >>> PYQT_VERSION_STR
> '4.8.4'
> >>> QT_VERSION_STR
> '4.7.2'
> >>>
>
> I've encountered similar problems in PySide.  I think it was considered to
> be
> a Python IDLE fault.  I know it does not shed much light on your problem,
> only
> some additional information.
>
> OldAl.
>

Thanks for the info.  If this doesn't happen in Kubuntu then perhaps it is
specific to my distro (I was working in a terminal, not idle, so its not
that).  Either way, I think I'll dig a little deeper and see if I can get a
useful traceback.

I did look around for a bug report website for quite a while, but didn't
find anything. If anyone knows where I can report a pyqt bug, please let me
know.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110622/5096c641/attachment.html>


More information about the PyQt mailing list