On Thu, 29 Nov 2001, John Levon wrote: > Start a new doc, insert a footnote, go to Documents and select the same doc -> crash. > > Because colapsable::edit() doesn't consider that the inset may be already locked, it >ends > up trying to lock an inset at pos 0 *inside* the footnote, thinking that >bv->theLockingInset() > exists inside the footnote. > > Patch to "fix" the crash is below, but first some questions.
This patch also "fixes" the crash I reported the other day triggered by being inside an inset and opening/closing another document. An interesting point here is that the cursor is always placed at the start of the inset irrespective of where it was when I changed buffers (even if it was inside an inset in an inset). > 1) shouldn't ::buffer() check to see if we are really switching buffers : > > if (buffer == b) { > return; > } Isn't this what it used to do at some stage? > 2) how does the slept inset stay locked between the insetSleep and the insetWakeup ? >I can't > see why the inset doesn't unlock properly in insetSleep ... > > 3) insettext and insettabular also have this problem (turn on -dbg insets to see !), >but the > locking_inset stuff there is FAR too confusing for me to understand. I think they >survive by > "the skin of their teeth". Good questions. I know less about this stuff than you do. Allan. (ARRae)