[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: KIO::PreviewJob pixmaps + Qt4.5 crashes
From:       Aleix Pol <aleixpol () kde ! org>
Date:       2009-03-13 14:14:33
Message-ID: 757d9a550903130714g63507fcj5e1dcd5c46829d4a () mail ! gmail ! com
[Download RAW message or body]

On Fri, Mar 13, 2009 at 2:23 PM, Maksim Orlovich <mo85@cornell.edu> wrote:

> > 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.

My Qt was installed using the configure command proposed by README.qt-copy.
I don't have any special interest on raster in this application.


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

I checked that, I didn't see anything relevant. I'll recheck later and send
later on in case i think it is needed.


>
>
> #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)
>
>
Yes it is possible, but I don't know where this copy happens at all.

[Attachment #3 (text/html)]

<br><br><div class="gmail_quote">On Fri, Mar 13, 2009 at 2:23 PM, Maksim Orlovich \
<span dir="ltr">&lt;<a href="mailto:mo85@cornell.edu">mo85@cornell.edu</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div class="im">&gt; Same \
happens on both systems tested, both using GNU/Linux environments.<br> &gt; This<br>
&gt; crash happens also in dolphin (when used with the information panel,<br>
&gt; because<br>
&gt; there is a thumbnail drawn inside), same arguments workaround is<br>
&gt; applicable<br>
&gt; (--graphicssystem).<br>
&gt;<br>
&gt; Is there any additional information needed?<br>
<br>
</div>#1) Well, for starters, you need to explain why in the world your<br>
application seems to be using the raster engine and not the X11 engine.<br>
There are absolutely no guarantees that KDE will work this way, at all, as<br>
changing it is not behaviorally compatible.</blockquote><div>My Qt was installed \
using the configure command proposed by README.qt-copy. I don&#39;t have any special \
interest on raster in this application.<br>  <br></div> <blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"><br> <br>
#2) valgrind output will say a lot more than the backtrace.</blockquote><div>I \
checked that, I didn&#39;t see anything relevant. I&#39;ll recheck later and send \
later on in case i think it is needed.<br>  </div><blockquote class="gmail_quote" \
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; \
padding-left: 1ex;"> <br>
<br>
#3) The other response is likely right. I bet the following accesses<br>
deleted memory with the Raster engine:<br>
<br>
const int w = 16, h = 16;<br>
QRgb* data = new QRgb[w*h*4];<br>
std::memset(data, 0, w*h*4);<br>
QImage* i = new QImage(data, w, h, QImage::Format_ARGB32_Premultiplied);<br>
QPixmap p = QPixmap::fromImage(*i);<br>
delete i;<br>
//Do stuff with p here<br>
<br>
There seems to be no deep copy going on here (and coincidentally,<br>
QImage::convertToFormat docs lie --- it doesn&#39;t always return a copy)<br>
<br></blockquote></div><br>Yes it is possible, but I don&#39;t know where this copy \
happens at all.<br>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic