On 10/08/2009 21:39, Abdelrazak Younes wrote:
On 10/08/2009 21:34, Pavel Sanda wrote:
hi,
for the third time my system get frozen because of
bug http://www.lyx.org/trac/ticket/5002.

it seems when we load eg. jpg image to cache and rescale it, the
original image is not forgoten so even small scale is of no help
and more print-ready image are able to knock system down.

the code looks like as we intend to free this memory, but it
wont happen:

@@ -108,9 +108,12 @@ bool GuiImage::setPixmap(Params const&  params)
    // Clear the pixmap to save some memory.
    if (is_transformed_)
        original_ = QImage();

this code should work? if i manually add original_.~QImage(); memory is
rescued and no swapping happens. however i get some crash in lyx quit then;
aparently graphics cache is more intricated stuff...

Very intricate!

The problem is not coming from Qt but from our own caching mechanism which is heavy and is redundant with Qt own caching system. Last time I tried to clean up this mess I stopped at this issue with a big headache... The only sane solution is to get rid of this complicated caching engine and to rewrite everything with Qt only.

Now that I read my comments in the bug, I see that I reached to the same conclusion one year ago :-)

Abdel.

Reply via email to