From kde-core-devel Fri Mar 13 13:23:04 2009 From: "Maksim Orlovich" Date: Fri, 13 Mar 2009 13:23:04 +0000 To: kde-core-devel Subject: Re: KIO::PreviewJob pixmaps + Qt4.5 crashes Message-Id: <10497.24.58.22.184.1236950584.squirrel () webmail ! cornell ! edu> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=123695062921916 > 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)