On Wednesday 27 February 2002 2:55 pm, Juergen Vigna wrote:
> On 27-Feb-2002 Angus Leeming wrote:
> 
> > void InsetGraphics::updateInset() const
> > {
> >       grfx::GCache & gc = grfx::GCache::get();
> >       gc.update(*this);
> > +     setCache();
> > +     if (cached_status_ == grfx::WaitingToLoad) {
> > +             gc.startLoading(*this);
> > +     }
> > }
> 
> As much as I can see this seems right.

So you need to add a lyxrc variable
        bool use_lazy_rendering;
add it to the preferences dialog (look&feel->misc) and use it in 
InsetGraphics::updateInset() (only in updateInset I think).

> > Looks like I've introduced one in the new graphics stuff. Find that 
> > and I'll implement the lazy toggle for you.
> 
> ??? I don't get what you mean here? What should I find? Is that a secret?

You reported a crash on exit from LyX if you had displayed a graphics file. 
Does it not happen any more? I can't make much sense of Edwin's reports.

At the moment the d-tor (GraphicsImageXPM.C) is:

GImageXPM::Data::~Data()
{
        // Introduce temporary memory leak to fix crash.
//     if (colorTable_.unique())
//             free_color_table(colorTable_.get(), ncolors_);
}

So, if you're not getting crashes anymore then the bug is in 
free_color_table. If you uncomment this code above do the crashes occur? If 
so, can you show me what I've done wrong.

I ask because I DO NOT get crashes, so debugging is quite hard!

Quick test: if you are now getting crashes and you delete the last line of 
free_color_table, 
        free(table);
does that cure the problem?

Angus (who feels like he's hunting in the dark and he's not a bat).

Reply via email to