KIO::PreviewJob pixmaps + Qt4.5 crashes

Maksim Orlovich mo85 at
Fri Mar 13 13:23:04 GMT 2009

> Same happens on both systems tested, both using GNU/Linux environments.
> This
> crash happens also in dolphin (when used with the information panel,
> because
> there is a thumbnail drawn inside), same arguments workaround is
> applicable
> (--graphicssystem).
> Is there any additional information needed?

#1) Well, for starters, you need to explain why in the world your
application seems to be using the raster engine and not the X11 engine.
There are absolutely no guarantees that KDE will work this way, at all, as
changing it is not behaviorally compatible.

#2) valgrind output will say a lot more than the backtrace.

#3) The other response is likely right. I bet the following accesses
deleted memory with the Raster engine:

const int w = 16, h = 16;
QRgb* data = new QRgb[w*h*4];
std::memset(data, 0, w*h*4);
QImage* i = new QImage(data, w, h, QImage::Format_ARGB32_Premultiplied);
QPixmap p = QPixmap::fromImage(*i);
delete i;
//Do stuff with p here

There seems to be no deep copy going on here (and coincidentally,
QImage::convertToFormat docs lie --- it doesn't always return a copy)

More information about the kde-core-devel mailing list