[PyQt] Segfault with QRawFont

Kovid Goyal kovid at kovidgoyal.net
Fri Oct 19 15:08:18 BST 2012


Hi Phil,

The following snippet causes a segfault:

python -c "from PyQt4.Qt import *; app = QApplication([]); f = QRawFont.fromFont(QFont('Arial')); print f.familyName();  print 1"

However, if I explicitly delete the QRawFont first, the segfault goes
away:

python -c "from PyQt4.Qt import *; app = QApplication([]); f = QRawFont.fromFont(QFont('Arial')); print f.familyName(); del f;  print 1"

Seems to be something wrong in the object lifetime/ownership
semantics for QRawFont.

This is on linux PyQt4 4.9.4, SIP 4.14, Qt 4.8.3

I am unable to generate a backtrace at the moment as I am travelling,
let me know if you need one, and I'll try to generate it ASAP.

Kovid.


-- 
_____________________________________

Dr. Kovid Goyal 
http://www.kovidgoyal.net
http://calibre-ebook.com
_____________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20121019/64477b7a/attachment.pgp>


More information about the PyQt mailing list