Well, i haven&#39;t tried to put qFatal there, but i&#39;ll try it later. Strangely, reverting the patch helps.<br><br><div class="gmail_quote">On Tue, Feb 2, 2010 at 2:46 PM, Cyrille Berger <span dir="ltr"></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">On Tuesday 02 February 2010, Boudewijn Rempt wrote:<br>
&gt; On Monday 01 February 2010, Dmitry Kazakov wrote:<br>
&gt; &gt; <a href="http://dimula73.narod.ru/walkers_singlepatch_v5.diff" target="_blank">http://dimula73.narod.ru/walkers_singlepatch_v5.diff</a>&lt;http://dimula73.naro<br>
&gt; &gt;d. ru/walkers_singlepatch_v4.diff&gt;<br>
&gt; &gt;<br>
&gt; &gt; o Fixed undo after Flatten Image.<br>
&gt; &gt; o Fixed refresh after creation of the layer<br>
&gt; &gt;<br>
&gt; &gt; o Reverted Cyrille&#39;s commit r1083565 to eliminate crash<br>
&gt;<br>
&gt; For this, I think you should open a bug: &quot;memory leak on document<br>
&gt;  destruction&quot; with the history of this patch. We should fix the memory<br>
&gt;  leak, but that might be hard.<br>
&gt;<br>
Yes and I am really sceptical that that change has anything to do. The<br>
destructor is only deleted by the document. To make sure of that I added a<br>
qFatal in the destructor, and did:<br>
* open krita<br>
* close krita<br>
* qFatal triggered<br>
<br>
And then I did<br>
* open krita<br>
* add layer<br>
* flaten image<br>
* undo (twice, not sure why flatten image is not grouped anymore)<br>
* assert somewhere else<br>
<br>
So in my case the destructor of KisShapeController (which is the only thing<br>
changed by r1083565) is only called on document destruction at krita exit, and<br>
not during flaten image. So can someone that can reproduce the flatten image bug<br>
with change r1083565 and not r1083565, add a qFatal(&quot;something&quot;);, in<br>
KisShapeController::~KisShapeController, and send me the backtrace that goes<br>
to the destructor ? (alternatively, you can use a break point in gdb, but I do<br>
tend to not find them trustworthy).<font color="#888888"><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Dmitry Kazakov<br>