Bennett Helm wrote: > Patrick De Visschere noted on the User's list that: > >> If you change the environment of a blanco line (from Standard) to >> Paragraph and then type text on the line LyX crashes. > > I can confirm this on current svn. Here's the backtrace:
Here too, (Windows). Attached patch fixes it. Could you test it on the Mac? > > Program received signal EXC_BAD_INSTRUCTION, Illegal instruction/operand. > 0x9074e938 in __FUNCTION__.79572 () > (gdb) bt > #0 0x9074e938 in __FUNCTION__.79572 () > #1 0xbfffd088 in ?? () > #2 0x000ac37b in lyx::ParConstIterator::operator-> (this=0x1ab95950) at > ParIterator.cpp:160 > #3 0x000d6106 in lyx::TocBackend::updateItem (this=0xea87890, > [EMAIL PROTECTED]) at TocBackend.cpp:135 > #4 0x000179ae in lyx::checkBufferStructure ([EMAIL PROTECTED], > [EMAIL PROTECTED]) at buffer_funcs.cpp:707 > #5 0x000bd2f9 in lyx::Text::insertChar (this=0xea8777c, [EMAIL PROTECTED], > c=97) at Text.cpp:746 > #6 0x000d8b22 in lyx::TransManager::insert (this=0xd3be4f0, > [EMAIL PROTECTED], text=0xea8777c, [EMAIL PROTECTED]) at Trans.cpp:684 > #7 0x000d92d1 in lyx::TransManager::translateAndInsert (this=0xd3be4f0, > c=97, text=0xea8777c, [EMAIL PROTECTED]) at Trans.cpp:676 > #8 0x000c9cd1 in lyx::Text::dispatch (this=0xea8777c, [EMAIL PROTECTED], > [EMAIL PROTECTED]) at Text3.cpp:1145 > #9 0x00038f21 in lyx::Cursor::dispatch (this=0xd3be114, > [EMAIL PROTECTED]) at Cursor.cpp:311 > #10 0x00084fd0 in lyx::LyXFunc::dispatch (this=0xd31c840, > [EMAIL PROTECTED]) at LyXFunc.cpp:1748 > #11 0x000862ab in lyx::LyXFunc::processKeySym (this=0xd31c840, > [EMAIL PROTECTED], state=none) at LyXFunc.cpp:371 > #12 0x001cf1e1 in lyx::frontend::WorkArea::processKeySym > (this=0xd3b2764, [EMAIL PROTECTED], state=none) at WorkArea.cpp:175 > #13 0x0038be14 in lyx::frontend::GuiWorkArea::keyPressEvent > (this=0xd3b2750, e=0xbfffedb0) at GuiWorkArea.cpp:426 > #14 0x00207bf6 in QWidget::event () at QLImage.cpp:173 > #15 0x002ae791 in QFrame::event () at InsetMathPar.cpp:28 > #16 0x002948e6 in QAbstractScrollArea::event () at InsetMathPar.cpp:28 > #17 0x001946b8 in QApplicationPrivate::notify_helper () at > MathParser.cpp:1472 > #18 0x00199154 in QApplication::notify () at MathParser.cpp:1472 > #19 0x001621d6 in lyx::frontend::GuiApplication::notify (this=0xe817e00, > receiver=0xd3b2750, event=0xbfffedb0) at GuiApplication.cpp:238 > #20 0x001e16e3 in QCoreApplication::notifyInternal () at QKeySymbol.cpp:105 > #21 0x001d88ae in qt_sendSpontaneousEvent () at QKeySymbol.cpp:105 > #22 0x00353c38 in QKeyMapper::sendKeyEvent () at cregex.cpp:428 > #23 0x00354d36 in QKeyMapperPrivate::translateKeyEvent () at cregex.cpp:428 > #24 0x001db762 in QApplicationPrivate::globalEventProcessor () at > QKeySymbol.cpp:105 > #25 0x92dd6537 in DispatchEventToHandlers () > #26 0x92dd5bdc in SendEventToEventTargetInternal () > #27 0x92dd5aa1 in SendEventToEventTargetWithOptions () > #28 0x92ddd624 in ToolboxEventDispatcherHandler () > #29 0x92dd68ee in DispatchEventToHandlers () > #30 0x92dd5bdc in SendEventToEventTargetInternal () > #31 0x92ddcfbc in SendEventToEventTarget () > #32 0x001d7b5c in qt_mac_send_event () at QKeySymbol.cpp:105 > #33 0x0035fefa in QEventDispatcherMac::processEvents () at cregex.cpp:428 > #34 0x00378564 in QEventLoop::processEvents () at cregex.cpp:428 > #35 0x003786e7 in QEventLoop::exec () at cregex.cpp:428 > #36 0x001e31d1 in QCoreApplication::exec () at QKeySymbol.cpp:105 > #37 0x000761f1 in lyx::LyX::exec (this=0xbffffa24, [EMAIL PROTECTED], > argv=0xbffffaac) at LyX.cpp:463 > #38 0x00003023 in main (argc=1, argv=0xbffffaac) at main.cpp:48 > > > Bennett > -- Peter Kümmel
Index: TocBackend.cpp =================================================================== --- TocBackend.cpp (revision 18243) +++ TocBackend.cpp (working copy) @@ -128,6 +128,9 @@ TocIterator toc_item = item("tableofcontents", par_it); + if (toc_item == toc("tableofcontents").end()) + return; + docstring tocstring; // For each paragraph, traverse its insets and let them add