Abdelrazak Younes wrote:
1) Open Intro.lyx
2) PagesDown 5 times

The following assertion is triggered in text2.C:994 (LyXText::editXY()):

    // This should be just before or just behind the
    // cursor position set above.
    BOOST_ASSERT((pos != 0 && inset == pars_[pit].getInset(pos - 1))
             || inset == pars_[pit].getInset(pos));


The problem is that at pit=13 and pos-1=317 we have
  inset != pars_[pit].getInset(pos - 1)

Anybody understand the problem?

I still see this crash, the attach patch will reveal that inset2=inset3=0. If this normal?

pit 24  pos -1 332
inset 022C6250
inset2 00000000
pit 24  pos 333
inset 022C6250
inset3 00000000

Abdel.
Index: text2.C
===================================================================
--- text2.C     (revision 15426)
+++ text2.C     (working copy)
@@ -980,10 +980,33 @@
                return 0;
        }
 
+       int i=0;
+       InsetBase * inset2 = pars_[pit].getInset(pos - 1);
+       InsetBase * inset3 = pars_[pit].getInset(pos);
+       if (inset != pars_[pit].getInset(pos - 1))
+       {
+               i++;            
+               std::cout << "pit " << pit 
+               << "  pos -1 " << pos - 1
+               << "\ninset " << inset
+               << "\ninset2 " << inset2
+               << endl;
+       }
+
+       if (inset != pars_[pit].getInset(pos))
+       {               
+               i++;
+               std::cout << "pit " << pit 
+               << "  pos " << pos
+               << "\ninset " << inset
+               << "\ninset3 " << inset3
+               << endl;
+       }
+       if (i == 2)
+               std::cout << endl;
+
        // This should be just before or just behind the
        // cursor position set above.
-        InsetBase * inset2 = pars_[pit].getInset(pos - 1);
-        InsetBase * inset3 = pars_[pit].getInset(pos);
         
        BOOST_ASSERT((pos != 0 && inset == inset2)
                     || inset == inset3);

Reply via email to