Crash in equation paint (master)

Pavel Sanda sanda at lyx.org
Mon Feb 1 10:36:21 UTC 2021


Struggling to find recipy, but already happened 3x in the morning while trying to merge changes from Phil's review:

1. Open math manual, go to the second table in 3.7
2. Open new window 2, open new file and starting to reproduce the formula
3. ctrl+m ^19
4. unclear sequence of these:
a) backspace to delete 19, or type something again
b) zoom in/zoom out
c) switch to different window/workspace (the immediate crash trigger seems to be always when activating LyX window after wandering elsewhere)

It seems that cursor size and geometry gets sometimes wrong unless I start typing and things go immediately right.
But sometimes it crashes. (is MathData::dimension dependent on zoom level?).
I am not even sure that the first window is necessary, but it might be related because
the zoom in/out changes the geometry in the first window as well... Instant preview is on.

Will try to come up with better backtrace, but this is what I have now:

CoordCache.cpp (25): break on pointer: 0x560af36eb560 hint: dim size: 0
(  1) src/lyx: lyx::doAssertWithCallstack(bool)
(  2) src/lyx: lyx::doBufErr(char const*, char const*, long)
(  3) src/lyx: lyx::lyxbreaker(void const*, char const*, int)
(  4) src/lyx: lyx::MathData::dimension(lyx::BufferView const&) const
(  5) src/lyx: lyx::InsetMathGrid::cellXOffset(lyx::BufferView const&, unsigned
long) const
(  6) src/lyx: lyx::InsetMathGrid::draw(lyx::PainterInfo&, int, int) const
(  7) src/lyx: lyx::InsetMathHull::draw(lyx::PainterInfo&, int, int) const
(  8) src/lyx: lyx::RowPainter::paintInset(lyx::Row::Element const&) const
(  9) src/lyx: lyx::RowPainter::paintText()
( 10) src/lyx: lyx::TextMetrics::drawParagraph(lyx::PainterInfo&, long, int, int
) const
( 11) src/lyx: lyx::TextMetrics::draw(lyx::PainterInfo&, int, int) const
( 12) src/lyx: lyx::InsetText::draw(lyx::PainterInfo&, int, int) const
( 13) src/lyx: lyx::InsetTabular::draw(lyx::PainterInfo&, int, int) const
( 14) src/lyx: lyx::RowPainter::paintInset(lyx::Row::Element const&) const
( 15) src/lyx: lyx::RowPainter::paintText()
( 16) src/lyx: lyx::TextMetrics::drawParagraph(lyx::PainterInfo&, long, int, int
) const
( 17) src/lyx: lyx::TextMetrics::draw(lyx::PainterInfo&, int, int) const
( 18) src/lyx: lyx::BufferView::draw(lyx::frontend::Painter&, bool)
( 19) src/lyx: lyx::frontend::GuiWorkArea::paintEvent(QPaintEvent*)
( 20) /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5: QWidget::event(QEvent*)
( 21) /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5: QFrame::event(QEvent*)
( 22) /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: QCoreApplicationPrivate::sendTh
roughObjectEventFilters(QObject*, QEvent*)
( 23) /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5: QApplicationPrivate::notify_


Pavel


More information about the lyx-devel mailing list