On Mon, Feb 11, 2008 at 08:51:53AM +0100, Abdelrazak Younes wrote: > Dominik Böhm wrote: >> Hello again, >> bug that makes lyx crash. >> I was able to reproduce one critical >> Create a new file, insert one section at the beginning and then a formula >> with a matrix (it doesn't matter if it's an inline formula or a display >> one). Then toggle the outline view. If the cursor is still in the formula, >> lyx should crash immediately. If not, click into the formula to make lyx >> crash. That makes the outline view pretty unusful for me. > > This is fixed in svn. Andre', JMarc, the problem was in > DocIterator::backwardPos(): > > void DocIterator::backwardPos() > { > //this dog bites his tail > if (empty()) { > push_back(CursorSlice(*inset_)); > top().idx() = lastidx(); > top().pit() = lastpit(); > top().pos() = lastpos(); > return; > } > > if (top().at_begin()) { > pop_back(); > return; > } > > top().backwardPos(); > > // move into an inset to the left if possible > Inset * n = 0; > > if (inMathed()) > n = (top().cell().begin() + top().pos())->nucleus(); > > Here 'top().cell().begin() + top().pos()' is out of range for the pointed > cell. So I guess pos() is not set correctly within a math matrix.
This is the kind of problem 'fixIfBroken()' should catch... [But then, of course, fixIfBroken() ideally should not be triggered...] Andre'