I've been looking into the crash reported by Andrew Parsloe a few days ago, and seem to have uncovered a general issue with Buffer renaming and the BufferList. So far as I can see, when we rename a Buffer, we do not update the BufferList at all. So, if the Buffer was originally named c.lyx, and you save it as d.lyx, and then you call BufferList::getBuffer() to find d.lyx, you do not find it, whereas if you try to find c.lyx, then you do. If I'm right about this, it's kind of amazing we've never seen problems here.

The question is what to do about it. Is it right just to add a routine to BufferList that will do the renaming?

As far as Parsloe's crash goes, I think it will be enough to reload the Buffer after we rename it, once that issue is sorted out. We should probably do this anyway, since e.g. the connection to graphics or to child buffers, or whatever, may have been broken, if you saved it to a different directory, or maybe other files with the same name should now be the children.

Thoughts?

Richard

Reply via email to