Re: [PyQt] Segfault with QRawFont

2012-11-11 Thread Phil Thompson
On Sun, 28 Oct 2012 23:12:35 +0530, Kovid Goyal wrote: > Blanket not calling dtors would be problematic, there's no way to be > sure what side effects that would have. One solution would be to > specialize the dealloc function for QRawFont objects to check if the > application is exiting and abort

Re: [PyQt] Segfault with QRawFont

2012-10-28 Thread Kovid Goyal
Blanket not calling dtors would be problematic, there's no way to be sure what side effects that would have. One solution would be to specialize the dealloc function for QRawFont objects to check if the application is exiting and abort. Another might be to register a cleanup function using the at

Re: [PyQt] Segfault with QRawFont

2012-10-28 Thread Phil Thompson
On Sun, 28 Oct 2012 15:38:59 +0530, Kovid Goyal wrote: > The backtrace is below. Looks to me like the QRawFont object is being > released after Qt has already released the FreeType library, leading to > the segfault. The workaround is to ensure that all QRawFont objects are > deleted before Py_Fin

Re: [PyQt] Segfault with QRawFont

2012-10-28 Thread Kovid Goyal
The backtrace is below. Looks to me like the QRawFont object is being released after Qt has already released the FreeType library, leading to the segfault. The workaround is to ensure that all QRawFont objects are deleted before Py_Finalize() is called. I dont know if there is more elegant way to f

[PyQt] Segfault with QRawFont

2012-10-19 Thread Kovid Goyal
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