> Here's how I see it, Your analysis is the same as mine...
> And I actually get the crash in this vicinity. Great. I was not able to reproduce it under linux. > I'm trying this: > Index: src/frontends/LyXView.cpp > =================================================================== > --- src/frontends/LyXView.cpp (revision 19264) > +++ src/frontends/LyXView.cpp (working copy) > @@ -133,10 +133,8 @@ > // parentfilename will be used in case when we switch to a child > // document (hence when child_document is true) > string parentfilename; > - if (oldBuffer) { > + if (oldBuffer) > parentfilename = oldBuffer->fileName(); > - disconnectBuffer(); > - } > > if (!b && theBufferList().empty()) > getDialogs().hideBufferDependent(); > @@ -160,7 +158,8 @@ > // must update the labels and section numbering > of its master > // Buffer. > updateLabels(*oldBuffer->getMasterBuffer()); > - > + if (oldBuffer) > + disconnectBuffer(); > connectBuffer(*newBuffer); I just posted another patch. I am not sure which is better. My understanding is that because master doc is responsible for updating Toc for itself, and all its child documents, the strctureChanged() signal should always be connected to a master buffer, even if it is not the current buffer. Bo