Am Di., 2. Nov. 2021 um 22:08 Uhr schrieb Pavel Sanda <sa...@lyx.org>:
> I believe something else is going on. > > When you add something like > +++ b/src/frontends/qt/TocModel.cpp > @@ -327,6 +330,7 @@ TocItem const TocModels::currentItem(QString const & > type, > } > LASSERT(index.model() == it.value()->model(), return TocItem()); > > + lyxerr<<type.toStdString()<<" ";lyxerr<<&models_ << " " << *it << " " << > it.value()->toc_->empty() << "\n"; > return it.value()->tocItem(index); > } > > > You can see steady flow of identical lines, e.g. > tableofcontents 0x55a7b8d94af8 0x55a7b9c931f0 0 > > associated with the first window. Then you create second window > open new view of the same file and get steady flow of second type e.g. > > tableofcontents 0x55a7ba5e5438 0x55a7ba817910 0 > > until the last line before crash > tableofcontents 0x55a7b8d94af8 0x55a7b9c931f0 1 > > which is again pointing to structure associated with window 1 > but now empty. So instead of missing initialization we likely > destroy the content of first structure meanwhile. > Thanks, that's interesting. > We call various reset() and clear() routines many many times, > and its unclear to me why we repeatedlt call the whole machinery. > Maybe this code (TocWidget::updateView()) is to blame? if (!gui_view_.documentBufferView()) { tocTV->setModel(nullptr); depthSL->setMaximum(0); depthSL->setValue(0); setEnabled(false); return; } Jürgen
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel