Vincent van Ravesteijn - TNW wrote:
As Guenter mentioned, he has a master with childs. Doing a cut and paste
in a child document does crash LyX 1.6.1. I have no current branch or
svn to test with.

OK, now I have it. Note that you get an infinite loop through emergencyWriteAll() when this happens, so you need to set a breakpoint there to get anything useful.

I think this must be related to the FIXME at line 300 of CutAndPaste.cpp. The call to updateLabels() sends us to loadIfNeeded eventually because we're in a child, and we end up calling InsetBranch::buffer() before the buffer is actually set, which I think happens later in updateLabels().

rh

=====

gdb /cvs/lyx-devel/trunk/src/lyx --interpreter=mi2 -quiet
Using host libthread_db library "/lib64/libthread_db.so.1".
(gdb) bt
bt
#0 lyx::BufferList::emergencyWrite (this=0x3076878, buf=0x36c2920) at BufferList.cpp:236 #1 0x00000000004eab89 in std::for_each<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<lyx::Buffer**, __gnu_norm::vector<lyx::Buffer*, std::allocator<lyx::Buffer*> > >, __gnu_debug_def::vector<lyx::Buffer*, std::allocator<lyx::Buffer*> > >, boost::_bi::bind_t<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, boost::_mfi::mf1<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, lyx::BufferList, lyx::Buffer*>, boost::_bi::list2<boost::_bi::value<lyx::BufferList*>, boost::arg<1> > > > (__fir...@0x7fff78ea63d0, __la...@0x7fff78ea63a0, __f={f_ = {f_ = &lyx::BufferList::emergencyWrite(lyx::Buffer*)}, l_ = {<boost::_bi::storage2<boost::_bi::value<lyx::BufferList*>,boost::arg<1> >> = {<boost::_bi::storage1<boost::_bi::value<lyx::BufferList*> >> = {a1_ = {t_ = 0x3076878}}, <No data fields>}, <No data fields>}}) at ../boost/boost/bind/mem_fn_template.hpp:162 #2 0x00000000004e49fb in lyx::BufferList::emergencyWriteAll (this=0x3076878) at BufferList.cpp:223
#3 0x000000000061aaa7 in lyx::emergencyCleanup () at LyX.cpp:799
#4 0x000000000061adc5 in lyx::lyx_exit (exit_code=2028626656) at LyX.cpp:196
#5 0x0000000000470b3e in boost::assertion_failed (expr=0xe68068 "false", function=0xfc5340 "void lyx::doAssert(const char*, const char*, long int)", file=0xfc5308 "lassert.cpp", line=23) at boost.cpp:47 #6 0x0000000000dea51f in lyx::doAssert (expr=0xe68068 "false", file=0xee11a6 "insets/Inset.cpp", line=138) at lassert.cpp:23 #7 0x000000000095a47e in lyx::Inset::buffer (this=<value optimized out>) at insets/Inset.cpp:138 #8 0x00000000009580f0 in lyx::Inset::buffer (this=0x7fff78ea62e0) at insets/Inset.cpp:148 #9 0x0000000000980532 in lyx::InsetBranch::isBranchSelected (this=0x7fff78ea62e0) at insets/InsetBranch.cpp:199 #10 0x000000000098057b in lyx::InsetBranch::isMacroScope (this=0x7fff78ea62e0) at insets/InsetBranch.cpp:252 #11 0x0000000000481b1a in lyx::Buffer::updateMacros (this=0x36b7250, i...@0x7fff78ea70a0, sco...@0x7fff78ea7050) at Buffer.cpp:1934 #12 0x0000000000484184 in lyx::Buffer::updateMacros (this=0x36b7250) at Buffer.cpp:2017 #13 0x00000000004846cf in lyx::Buffer::setParent (this=0x7fff78ea62e0, buffer=0x3076878) at Buffer.cpp:1707 #14 0x00000000009d99ad in lyx::InsetInclude::loadIfNeeded (this=0x36cb520, pare...@0x36c2920) at insets/InsetInclude.cpp:417 #15 0x0000000000481c7f in lyx::Buffer::updateMacros (this=0x36c2920, i...@0x7fff78ea7bb0, scope=<value optimized out>) at Buffer.cpp:1953 #16 0x0000000000484184 in lyx::Buffer::updateMacros (this=0x36c2920) at Buffer.cpp:2017 #17 0x000000000048460c in lyx::Buffer::updateLabels (this=0x36c2920, childonly=false) at Buffer.cpp:2748 #18 0x0000000000484411 in lyx::Buffer::updateLabels (this=0x36b7250, childonly=false) at Buffer.cpp:2727 #19 0x00000000007e7d98 in lyx::cap::pasteParagraphList (c...@0x3789cd8, parli...@0x3792188, docclass=0x36c88b0, errorli...@0x138d0a0) at CutAndPaste.cpp:840 #20 0x00000000007e7f55 in lyx::cap::pasteFromStack (c...@0x3789cd8, errorli...@0x138d0a0, sel_index=0) at CutAndPaste.cpp:858 #21 0x000000000070db5d in lyx::Text::dispatch (this=0x372b010, c...@0x3789cd8, c...@0x7fff78eae840) at Text3.cpp:1025 #22 0x0000000000a9fe34 in lyx::InsetText::doDispatch (this=0x372aff0, c...@0x3789cd8, c...@0x7fff78eae840) at insets/InsetText.cpp:254 #23 0x000000000095887e in lyx::Inset::dispatch (this=0x372aff0, c...@0x3789cd8, c...@0x7fff78eae840) at insets/Inset.cpp:216 #24 0x00000000007de9a3 in lyx::Cursor::dispatch (this=0x3789cd8, cm...@0x7fff78eb01d0) at Cursor.cpp:315 #25 0x000000000064e204 in lyx::LyXFunc::dispatch (this=0x3076740, c...@0x7fff78eb01d0) at LyXFunc.cpp:1712 #26 0x000000000064fb85 in lyx::LyXFunc::processKeySym (this=0x3076740, keys...@0x7fff78eb0330, state=lyx::ControlModifier) at LyXFunc.cpp:389 #27 0x0000000000b33304 in lyx::frontend::GuiWorkArea::processKeySym (this=<value optimized out>, k...@0x7fff78eb0330, mod=lyx::ControlModifier) at GuiWorkArea.cpp:462 #28 0x0000000000b385bc in lyx::frontend::GuiWorkArea::keyPressEvent (this=0x3781280, ev=0x7fff78eb0b90) at GuiWorkArea.cpp:919
#29 0x0000003ae35d5f15 in QWidget::event () from /usr/lib64/libQtGui.so.4
#30 0x0000003ae38cdd86 in QFrame::event () from /usr/lib64/libQtGui.so.4
#31 0x0000003ae39538ad in QAbstractScrollArea::event () from /usr/lib64/libQtGui.so.4 #32 0x0000000000b36d94 in lyx::frontend::GuiWorkArea::event (this=0x3781280, e=0x3076878) at GuiWorkArea.cpp:667 #33 0x0000003ae3584c3f in QApplicationPrivate::notify_helper () from /usr/lib64/libQtGui.so.4 #34 0x0000003ae3589e64 in QApplication::notify () from /usr/lib64/libQtGui.so.4 #35 0x0000000000ae61e4 in lyx::frontend::GuiApplication::notify (this=0x7fff78ea62e0, receiver=0x3076878, event=0x36c2920) at GuiApplication.cpp:1258 #36 0x0000003748537b39 in QCoreApplication::notifyInternal () from /usr/lib64/libQtCore.so.4 #37 0x0000003ae35da40c in QAbstractItemModel::sort () from /usr/lib64/libQtGui.so.4 #38 0x0000003ae360859d in QAbstractItemModel::sort () from /usr/lib64/libQtGui.so.4 #39 0x0000003ae360a636 in QAbstractItemModel::sort () from /usr/lib64/libQtGui.so.4 #40 0x0000003ae35e68d3 in QApplication::x11ProcessEvent () from /usr/lib64/libQtGui.so.4 #41 0x0000003ae360bb08 in QAbstractItemModel::sort () from /usr/lib64/libQtGui.so.4 #42 0x00000038e902ef53 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0 #43 0x00000038e903224d in QAbstractItemModel::sort () from /lib64/libglib-2.0.so.0 #44 0x00000038e903277e in g_main_context_iteration () from /lib64/libglib-2.0.so.0 #45 0x000000374856048e in QEventDispatcherGlib::processEvents () from /usr/lib64/libQtCore.so.4 #46 0x0000003ae360b90f in QAbstractItemModel::sort () from /usr/lib64/libQtGui.so.4 #47 0x0000003748536f55 in QEventLoop::processEvents () from /usr/lib64/libQtCore.so.4
#48 0x00000037485370ba in QEventLoop::exec () from /usr/lib64/libQtCore.so.4
#49 0x00000037485390f9 in QCoreApplication::exec () from /usr/lib64/libQtCore.so.4 #50 0x0000000000ae100f in lyx::frontend::GuiApplication::exec (this=<value optimized out>) at GuiApplication.cpp:1073 #51 0x0000000000624596 in lyx::LyX::exec (this=0x7fff78eb3090, ar...@0x7fff78eb308c, argv=<value optimized out>) at LyX.cpp:343
#52 0x0000000000435458 in main (argc=1, argv=0x7fff78eb3198) at main.cpp:46
^done

Vincent


Reply via email to