[PyQt] PyQt4.QtGui + uuid.uuid4() = segfault

Hans-Peter Jansen hpj at urpla.net
Fri Dec 10 17:27:32 GMT 2010


On Friday 10 December 2010, 18:04:08 Baz Walter wrote:
> On 10/12/10 07:57, Christopher Singley wrote:
> > Sorry, I spoke too fast.  The issue persists on my system:
> >
> > Python 2.7.1 (r271:86832, Dec  1 2010, 23:37:45)
> > [GCC 4.4.5] on linux2
> > Type "help", "copyright", "credits" or "license" for more
> > information.
> >
> >>>> from PyQt4 import QtCore, QtGui
> >>>> QtCore.PYQT_VERSION_STR
> >
> > '4.8.1'
> >
> >>>> import uuid
> >>>> uuid.uuid4()
> >
> > Segmentation fault
> >
> >
> > Python 2.7.1 (r271:86832, Dec  1 2010, 23:37:45)
> > [GCC 4.4.5] on linux2
> > Type "help", "copyright", "credits" or "license" for more
> > information.
> >
> >>>> import uuid
> >>>> from PyQt4 import QtGui
> >>>> uuid.uuid4()
> >
> > UUID('25599b3b-bc40-488f-ab9d-8beccde99def')
> >
> > The workaround here is therefore obvious, but I'd still to figure
> > out what's going on here.  I don't have much experience debugging
> > this sort of issue, any hints?
>
> sorry, but i don't have any hints. however, the problem does not
> occur on my current set-up:
>
> Python 2.7.1 (r271:86832, Dec  2 2010, 03:10:07)
> [GCC 4.5.1 20101125 (prerelease)] on linux2
> Type "help", "copyright", "credits" or "license" for more
> information.
>
>  >>> from PyQt4 import QtCore, QtGui
>  >>> QtCore.PYQT_VERSION_STR
>
> '4.8.1'
>
>  >>> import uuid
>  >>> uuid.uuid4()
>
> UUID('894b501b-5f3a-424e-a0cc-b57555fd64f3')

I guess, that Christopher is talking about the import order, but neither 
I can reproduce this in any order:

Python 2.6 (r26:66714, Mar 30 2010, 00:30:21) 
[GCC 4.3.2 [gcc-4_3-branch revision 141291]] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt4 import QtCore, QtGui
>>> QtCore.PYQT_VERSION_STR
'snapshot-4.8.2-8b918f4306e1'
>>> import uuid
>>> uuid.uuid4()
UUID('23c84815-75ab-4d01-8b72-f291da9c1dad')

Python 2.6 (r26:66714, Mar 30 2010, 00:30:21) 
[GCC 4.3.2 [gcc-4_3-branch revision 141291]] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import uuid
>>> from PyQt4 import QtGui
>>> uuid.uuid4()
UUID('235f88e9-b503-4978-803d-eb99a4a54ede')


python: 2.6
sip: 4.12-snapshot-b202f0d04ba6
qt4: 4.7.1
pyqt4: snapshot-4.8.2-8b918f4306e1

Pete


More information about the PyQt mailing list