<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Currently I'm running the latest PyQT 4.3 snapshot with the offical 4.3
release of Sip and Qt 4.3.1, although the problem is still there with
PyQt 4.3 official release.<br>
<br>
What I have is a QWidget which is basically my own type of progress bar
embedded in a QTreeWidgetItem.<br>
<br>
progressBar = jobProgressBar.JobProgressBar(cjob,self)<br>
self.setItemWidget(item, self.columnCount() -1, progressBar)<br>
<br>
in jobProgressBar.JobProgressBar I override paintEvent to draw my
custom progress bar.<br>
<br>
I'm getting two types of crashes, one where the qpainter pointer is
freed but its already null, and one where the qpainter pointer address
changes during destruction.&nbsp; Its basically the same stack trace except
isActive shows a different memory address than the previous line.<br>
<br>
Program received signal SIGSEGV, Segmentation fault.<br>
[Switching to Thread -1217782864 (LWP 20039)]<br>
0x024bfbd8 in QPainter::isActive (this=0x0) at
painting/qpainter.cpp:1092<br>
1092&nbsp;&nbsp;&nbsp; painting/qpainter.cpp: No such file or directory.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in painting/qpainter.cpp<br>
Current language:&nbsp; auto; currently c++<br>
(gdb) where<br>
#0&nbsp; 0x024bfbd8 in QPainter::isActive (this=0x0) at
painting/qpainter.cpp:1092<br>
#1&nbsp; 0x024c359f in ~QPainter (this=0xa6a8fd0) at
painting/qpainter.cpp:1064<br>
#2&nbsp; 0x013b8ab7 in release_QPainter (ptr=0xa6a8fd0) at
sipQtGuiQPainter.cpp:4583<br>
#3&nbsp; 0x013b8b00 in dealloc_QPainter (sipSelf=0xb314aa6c) at
sipQtGuiQPainter.cpp:4594<br>
#4&nbsp; 0x001a90e6 in initsip () from
/usr/local/lib/python2.4/pyqt-4.3/sip.so<br>
#5&nbsp; 0x00255e2f in subtype_dealloc (self=0xb314aa6c) at
Objects/typeobject.c:703<br>
<br>
The funny thing is, this happens just by getting a reference to a
QPainter, I don't actually have to paint anything.&nbsp; For example, this
is enough to do it:<br>
<br>
def paintEvent(self,e):<br>
&nbsp;&nbsp;&nbsp; p = QtGui.QPainter(self)<br>
<br>
<div class="moz-signature">-- <br>
-Matt<br>
<br>
<span style="font-size: 11px;"><a
 href="http://twiki.spimageworks.com/twiki/bin/view/Software/CueDevelopment"></a></span></div>
</body>
</html>