On 03/08/2010 04:47 PM, rgheck wrote:
On 03/08/2010 10:44 AM, rgheck wrote:
On 03/08/2010 10:18 AM, Abdelrazak Younes wrote:
On 03/08/2010 03:53 PM, rgheck wrote:

(ii) Add:

Index: /cvs/lyx-devel/trunk/src/BufferList.cpp
===================================================================
--- /cvs/lyx-devel/trunk/src/BufferList.cpp    (revision 33673)
+++ /cvs/lyx-devel/trunk/src/BufferList.cpp    (working copy)
@@ -234,6 +234,7 @@

 bool BufferList::isLoaded(Buffer const * b) const
 {
+    LASSERT(!b || !b->isClone(), /* */);
     BufferStorage::const_iterator cit =
         find(bstore.begin(), bstore.end(), b);
     return cit != bstore.end();

for the time being, or else have isLoaded() return true if b is a clone. This already reveals one problem. The initUnicodeMath routine calls the latexString() method in InsetMathHull, which checks Inset::isBufferValid() which calls isLoaded(), which always returns false during export. So no encoding is ever set.

Good idea.

OK, get ready for the crash reports!

Well, looking at where this tends to get used, now I wonder if we shouldn't make BufferList aware of clones, whether that might be easier in the end. You said you thought maybe we should anyway. My only question was whether it was worth it, since we'll be adding them and removing them so quickly. Still, this might help with the crash Vincent was trying to fix. I think the problem was that sometimes child buffers get destroyed before the master does; BufferList would track that.

Still, I am not quite sure as, as you say, those have a short life... I don't want the user to be able to switch to this clone buffer...
I am uncertain...

Abdel

Reply via email to