Richard Heck wrote:
Abdelrazak Younes wrote:
I won't be able to commit it this week-end so could anyone show a
little bit of interest please?
I've patched and am compiling now.
This patch does fix that crash, but I'm seeing some other odd behavior,
and I'm getting another crash. I don't know to what extent those are
related to this.
I've got a master document with several included child documents. If I
open the master document and scroll down in it a ways, then at some
point the child documents open due to calls to
InsetInclude::fillWithBibKeys(). Or you can make this happen by
generating DVI. Anyway, when they do get opened this way, the TOC does
not recognize them, and nothing I can do makes it do so. That is: The
TOC of the main document doesn't show them, and they don't even have
their own TOCs.
Second problem: Now, with the TOC open, close the master document. BOOM.
Backtrace below. I'm guessing that the problem here is related to the
first problem. This bug may have been revealed by my "don't close buffer
dependent dialogs" patch:
http://www.lyx.org/trac/changeset/18651
I don't think the patch is responsible.
Diagnosis: When child docs are automatically opened,
LyXView::loadLyXFile() is not called. Rather, loadLyXFile() in
buffer_funcs.cpp is called directly from InsetInclude::loadIfNeeded().
As a result, none of the stuff Abdel just added to LyXView.cpp to handle
the case where a child doc is MANUALLY loaded deals with the case where
one is AUTOMATICALLY loaded.
Idea for fix: Since the buffer_func.cpp version of loadLyXFile() is
called from LyXView::loadLyXFile(), anyway, all the child doc stuff
could be moved there. But I don't know this code terribly well. Abdel?
More to come if I can figure this out later. Right now, it's off to the
grocery store....
Richard
gdb /home/rgheck/dev/bin/lyx --interpreter=mi2 -quiet
<font color="blue">(gdb) bt</font>
bt
#0 0x00f17402 in __kernel_vsyscall () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#1 0x0023dd40 in raise () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#2 0x0023f591 in abort () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#3 0x006128a5 in __gnu_debug::_Error_formatter::_M_error () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#4 0x0890406a in lyx::frontend::ControlToc::canOutline (this=0xaa4b9e0,
type=0) at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/debug/vector:199
#5 0x0885e8d4 in lyx::frontend::QToc::canOutline (this=0xaa4b9d8,
type=6) at QToc.cpp:47
#6 0x08859a9f in lyx::frontend::TocWidget::enableControls
(this=0xa3eaa90, enable=false) at TocWidget.cpp:220
#7 0x0885a6af in lyx::frontend::TocWidget::updateGui (this=0xa3eaa90)
at TocWidget.cpp:244
#8 0x0885ac95 in lyx::frontend::TocWidget::qt_metacall (this=0xa3eaa90,
_c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbf884b14) at
TocWidget_moc.cpp:84
#9 0x008a782f in QMetaObject::activate () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#10 0x008a801a in QMetaObject::activate () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#11 0x0885e7dd in lyx::frontend::QToc::modelReset (this=0xaa4b9d8) at
QToc_moc.cpp:76
#12 0x0885f551 in lyx::frontend::QToc::initialiseParams (this=0xaa4b9d8,
[EMAIL PROTECTED]) at QToc.cpp:119
#13 0x0869b04d in lyx::Dialogs::updateBufferDependent (this=0x9e2e4c0,
switched=true) at Dialogs.cpp:222
#14 0x086a69df in lyx::LyXView::setBuffer (this=0x9e2dd44, b=0x0,
child_document=false) at LyXView.cpp:164
#15 0x086aa7b4 in
boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void,
boost::_mfi::mf2<void, lyx::LyXView, lyx::Buffer*, bool>,
boost::_bi::list3<boost::_bi::value<lyx::LyXView*>,
boost::_bi::value<lyx::Buffer*>, boost::_bi::value<bool> > >,
void>::invoke ([EMAIL PROTECTED]) at
../../boost/boost/bind/mem_fn_template.hpp:274
#16 0x080b1cc3 in boost::function0<void, std::allocator<void>
>::operator() (this=0xa1d6554) at
../../boost/boost/function/function_template.hpp:692
#17 0x080cc4a4 in boost::signal0<void, boost::last_value<void>, int,
std::less<int>, boost::function<void ()(), std::allocator<void> >
>::operator() (this=0xa10cca0) at
../boost/boost/signals/signal_template.hpp:119
#18 0x0809e4ef in ~Buffer (this=0xa10cba0) at Buffer.cpp:230
#19 0x080f1279 in lyx::BufferList::release (this=0x9d2b764,
buf=0xa10cba0) at BufferList.cpp:177
#20 0x080f1346 in lyx::BufferList::close (this=0x9d2b764, buf=0xa10cba0,
ask=true) at BufferList.cpp:206
#21 0x0831220a in lyx::LyXFunc::closeBuffer (this=0x9d2b730) at
LyXFunc.cpp:2073
#22 0x0830618c in lyx::LyXFunc::dispatch (this=0x9d2b730,
[EMAIL PROTECTED]) at LyXFunc.cpp:881
#23 0x08311da4 in lyx::LyXFunc::processKeySym (this=0x9d2b730,
[EMAIL PROTECTED], state=lyx::key_modifier::ctrl) at LyXFunc.cpp:378
#24 0x086b532d in lyx::frontend::WorkArea::processKeySym
(this=0x9e2f14c, [EMAIL PROTECTED], state=lyx::key_modifier::ctrl) at
WorkArea.cpp:173
#25 0x087219c2 in lyx::frontend::GuiWorkArea::keyPressEvent
(this=0x9e2f138, e=0xbf8873c4) at GuiWorkArea.cpp:474
#26 0x041e4b37 in QWidget::event () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#27 0x04440344 in QFrame::event () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#28 0x044aa41f in QAbstractScrollArea::event () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#29 0x041a2140 in QApplicationPrivate::notify_helper () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#30 0x041a85a8 in QApplication::notify () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#31 0x08707988 in lyx::frontend::GuiApplication::notify (this=0x9d2f0f0,
receiver=0x9e2f138, event=0xbf8873c4) at GuiApplication.cpp:237
#32 0x041ec25e in QApplicationPrivate::createEventDispatcher () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#33 0x04214f8f in QX11Info::copyX11Data () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#34 0x04216c19 in QX11Info::copyX11Data () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#35 0x041f4799 in QApplication::x11ProcessEvent () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#36 0x04218214 in QX11Info::copyX11Data () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#37 0x00704442 in g_main_context_dispatch () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#38 0x0070741f in g_main_context_check () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#39 0x00707985 in g_main_context_iteration () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#40 0x008b73d8 in QEventDispatcherGlib::processEvents () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#41 0x04217fc5 in QX11Info::copyX11Data () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#42 0x00896111 in QEventLoop::processEvents () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#43 0x0089621c in QEventLoop::exec () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#44 0x008983da in QCoreApplication::exec () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#45 0x041a1987 in QApplication::exec () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:169
#46 0x08706b7a in lyx::frontend::GuiApplication::exec (this=0x9d2f0f0)
at GuiApplication.cpp:158
#47 0x082e7a84 in lyx::LyX::exec (this=0xbf88855c, [EMAIL PROTECTED],
argv=0xbf888614) at LyX.cpp:463
#48 0x0806924e in main (argc=1, argv=Cannot access memory at address 0x6650
) at main.cpp:48
--
==================================================================
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==================================================================
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto