[PyKDE] QPixmap problem under Windows?
Erik Åldstedt Sund
erikalds at scicraft.org
Fri Jul 22 15:35:40 BST 2005
Hi,
We've got a problem which we hope some of you have at least seen
before, or maybe even know how to solve... When we run our unittest
suite under Windows we get the following warning/error messages from
Qt:
ASSERT: "src_dc && dst_dc" in kernel\qpaintdevice_win.cpp (388)
...ASSERT: "src_dc && dst_dc" in kernel\qpaintdevice_win.cpp (388)
Somewhere else in our tests it may print something like:
...ASSERT: "hBitmap" in kernel\qpixmap_win.cpp (117)
ASSERT: "data->realAlphaBits" in kernel\qpixmap_win.cpp (118)
and segfault. If we set up our test system to ignore the test that
segfaults it gets a little longer, but now the screen gets all messed
up and the computer hangs! Before it hangs it displays something like
the following two outputs:
.QPixmap::setMask: The pixmap and the mask must have the same size
ASSERT: "src_dc && dst_dc" in kernel\qpaintdevice_win.cpp (388)
QPainter::begin: Cannot paint null pixmap
ASSERT: "src_dc && dst_dc" in kernel\qpaintdevice_win.cpp (388)
QPainter::end: Missing begin() or begin() failed
QPixmap::setMask: The pixmap and the mask must have the same size
.QPixmap::setMask: The pixmap and the mask must have the same size
ASSERT: "src_dc && dst_dc" in kernel\qpaintdevice_win.cpp (388)
QPainter::begin: Cannot paint null pixmap
.QPainter::begin: Cannot paint null pixmap
QPainter::begin: Cannot paint null pixmap
QPainter::end: Missing begin() or begin() failed
QPainter::begin: Cannot paint null pixmap
ASSERT: "src_dc && dst_dc" in kernel\qpaintdevice_win.cpp (388)
QPainter::end: Missing begin() or begin() failed
QImage::convertDepth: Image is a null image
QPixmap::convertFromImage: Cannot convert a null image
QCursor: Cannot create bitmap cursor; invalid bitmap(s)
This output is very strange as we've never seen anything like this
under Linux. Also the application itself seems to run very fine under
both platforms. To complicate things further:
* running each test-case one-by-one does not crash the computer
(though some of the warning/error messages from Qt still appears on
the screen).
* running one-by-one test in each testcase, we see no warning/error
messages from Qt at all.
If someone has seen anything like this before, or knows how to solve
this problem, we would be very grateful!
[ Some background: ]
We are developing a cross-platform application using Python 2.3 and
PyQt 3.14.1 with Qt 3.3.4.
We have written testcases that tests correct behaviour in
GUI-elements. When doing so we need to create a QApplication instance
before each test is run. This QApplication instance is then deleted
after the test is run in the following manner:
QTimer.singleShot(0, self.qapplication.quit)
self.qapplication.exec_loop()
del self.qapplication
thus starting the GUI-thread, and quitting it first thing when it has
started, before deleting it.
Greetings,
Erik.
--
_______________________________________________________________________
Erik Åldstedt Sund <erikalds at scicraft dot org>
More information about the PyQt
mailing list