[PyQt] Crash when adding a QRegion to a QPainterPath

Jeremy Sanders jeremy at jeremysanders.net
Tue Jun 8 17:45:59 BST 2010

Hi - I have an example program here which used to work in earlier sip/PyQt 
releases. Now it causes a core dump:

#0  QRegion::QRegion (this=0x8f72c0, r=...) at painting/qregion.cpp:3895
#1  0x0000003ea5ce12ad in QPaintEngineState::clipRegion (this=<value 
optimized out>)
    at painting/qpainter.cpp:8470
#2  0x00007ffff1040157 in meth_QPaintEngineState_clipRegion 
(sipSelf=0x8c36d0, sipArgs=<value optimized out>)
    at sipQtGuiQPaintEngineState.cpp:385
#3  0x0000003eb78dcaba in call_function (f=<value optimized out>, 
throwflag=<value optimized out>)
    at Python/ceval.c:3706

This fails under Fedora 12 x86-64 and on a own-built SIP/PyQt4 under linux 
i386. I'm using Qt-4.6.2.

Please download the example program:

If you uncomment the print statements on lines 175 and 177 the program no 
longer crashes, but state.clipOperation() looks like garbage.




More information about the PyQt mailing list