[Panel-devel] A source of quite some "Cannot paint on a null pixmap" msgs

Dmitry Suzdalev dimsuz at gmail.com
Fri Oct 26 19:45:27 CEST 2007


Hi guys!

Having some free minutes I checked what causes a bunch of

QPainter::begin: Cannot paint on a null pixmap
QPainter::setWorldTransform: Painter not active
QPainter::setWorldTransform: Painter not active
QPainter::setWorldTransform: Painter not active
QPainter::setCompositionMode: Painter not active
QPainter::setCompositionMode: Painter not active
QPainter::end: Painter not active, aborted
QPixmap: Invalid pixmap parameters
QPainter::begin: Cannot paint on a null pixmap
QPainter::setCompositionMode: Painter not active
QPainter::end: Painter not active, aborted

Plasma::Widget::paint() has this code:

    QPixmap pix;
    QPixmapCache::find(d->cacheKey, pix);

gdb reports that pix is null after this - i.e. not found in cache.
Later comes "if (d->cachePaintMode == ItemCoordinateCacheMode)" which isn't 
taken, program takes the route of:

    if (d->cachePaintMode == DeviceCoordinateCacheMode) {
 		....
		QPainter pixmapPainter(&pix);
		....
        }

Voila, the pix is null here.

I don't know plasma code at all, so just reporting the case. Please could 
someone look into this? :)
This happens right on the plasma startup.
Later paints seem to be ok, but the first ones are trying to paint on nothing 
:)

Hope this little bit helps.

Cheers,
Dmitry.


More information about the Panel-devel mailing list