To reproduce:

1. Start a new document.
2. Ctrl + m to start math inset.
3. Type \phantomx<Space>. Note that \phantomx is not a command so don't
   expect it to be recognized.
4. Press <Left>, <Backspace>, <Backspace> to delete the "x" and the "m".
5. Type "m" to finish "phantom".
6. Wait for the completion pop-down to appear (this takes a second).
7. Press <Tab>.

I tried to find a more simple recipe to reproduce but could not.

The result is that I get a SIGSEGV. Backtrace is attached.

Just before the SIGSEGV the terminal prints the following output (I
think from fsanitize). I don't think the output contains extra
information since the backtrace points to the same line number, but just
in case:

/home/scott/lyxbuilds/master/repo/src/mathed/MathRow.cpp:330:17: runtime error: 
member call on address 0x55555edd6970 which does not point to an object of type 
'Inset'
0x55555edd6970: note: object has invalid vptr
 00 00 00 00  d6 ed 55 55 05 00 00 00  32 7c 78 c2 e2 a1 20 d3  6d 00 00 00 00 
00 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              invalid vptr
/home/scott/lyxbuilds/master/repo/src/mathed/MathRow.cpp:330:17: runtime error: 
load of misaligned address 0x00055555eeb6 for type '<unknown> *', which 
requires 8 byte alignment
0x00055555eeb6: note: pointer points here
<memory cannot be printed>

Scott
Thread 1 "lyx" received signal SIGSEGV, Segmentation fault.
0x00005555597bab3b in lyx::MathRow::draw (this=0x55555ea908a0, pi=..., x=262, 
y=84) at /home/scott/lyxbuilds/master/repo/src/mathed/MathRow.cpp:330
330                             e.inset->draw(pi, x + e.before, y);
(gdb) bt
#0  0x00005555597bab3b in lyx::MathRow::draw(lyx::PainterInfo&, int, int) const 
(this=0x55555ea908a0, pi=..., x=262, y=84) at 
/home/scott/lyxbuilds/master/repo/src/mathed/MathRow.cpp:330
#1  0x0000555559730013 in lyx::MathData::draw(lyx::PainterInfo&, int, int) 
const (this=0x55555ecc1a10, pi=..., x=138, y=84) at 
/home/scott/lyxbuilds/master/repo/src/mathed/MathData.cpp:356
#2  0x000055555964af78 in lyx::InsetMathMacro::draw(lyx::PainterInfo&, int, 
int) const (this=0x55555eddbe50, pi=..., x=138, y=84) at 
/home/scott/lyxbuilds/master/repo/src/mathed/InsetMathMacro.cpp:756
#3  0x00005555597bad20 in lyx::MathRow::draw(lyx::PainterInfo&, int, int) const 
(this=0x55555ecbde90, pi=..., x=123, y=84) at 
/home/scott/lyxbuilds/master/repo/src/mathed/MathRow.cpp:330
#4  0x0000555559730013 in lyx::MathData::draw(lyx::PainterInfo&, int, int) 
const (this=0x55555e910a80, pi=..., x=123, y=84) at 
/home/scott/lyxbuilds/master/repo/src/mathed/MathData.cpp:356
#5  0x000055555957c9f9 in lyx::InsetMathGrid::draw(lyx::PainterInfo&, int, int) 
const (this=0x55555d579400, pi=..., x=123, y=84) at 
/home/scott/lyxbuilds/master/repo/src/mathed/InsetMathGrid.cpp:601
#6  0x00005555595daa08 in lyx::InsetMathHull::draw(lyx::PainterInfo&, int, int) 
const (this=0x55555d579400, pi=..., x=122, y=84) at 
/home/scott/lyxbuilds/master/repo/src/mathed/InsetMathHull.cpp:667
#7  0x00005555591d6767 in lyx::RowPainter::paintInset(lyx::Row::Element const&) 
const (this=0x7fffffffc5e0, e=...) at 
/home/scott/lyxbuilds/master/repo/src/RowPainter.cpp:116
#8  0x00005555591e7d74 in lyx::RowPainter::paintText() (this=0x7fffffffc5e0) at 
/home/scott/lyxbuilds/master/repo/src/RowPainter.cpp:563
#9  0x000055555935f4c5 in lyx::TextMetrics::drawParagraph(lyx::PainterInfo&, 
long, int, int) const (this=0x55555edd8ac8, pi=..., pit=0, x=0, y=84) at 
/home/scott/lyxbuilds/master/repo/src/TextMetrics.cpp:2085
#10 0x000055555935be80 in lyx::TextMetrics::draw(lyx::PainterInfo&, int, int) 
const (this=0x55555edd8ac8, pi=..., x=0, y=84) at 
/home/scott/lyxbuilds/master/repo/src/TextMetrics.cpp:1930
#11 0x0000555558cf03c3 in lyx::BufferView::draw(lyx::frontend::Painter&, bool) 
(this=0x55555e7ce2b0, pain=..., paint_caret=false) at 
/home/scott/lyxbuilds/master/repo/src/BufferView.cpp:3469
#12 0x0000555559fa3bde in lyx::frontend::GuiWorkArea::paintEvent(QPaintEvent*) 
(this=0x55555e7d7830, ev=0x7fffffffce00) at 
/home/scott/lyxbuilds/master/repo/src/frontends/qt/GuiWorkArea.cpp:1290
#13 0x00007ffff780e17e in QWidget::event(QEvent*) () at 
/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007ffff78bbb52 in QFrame::event(QEvent*) () at 
/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007ffff6cdceca in 
QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) 
(event=<optimized out>, receiver=<optimized out>) at 
kernel/qcoreapplication.cpp:1189
#16 QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) 
(receiver=0x55555e7e7900, event=0x7fffffffce00) at 
kernel/qcoreapplication.cpp:1178
#17 0x00007ffff77cb6a2 in QApplicationPrivate::notify_helper(QObject*, QEvent*) 
() at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x0000555559e098ac in lyx::frontend::GuiApplication::notify(QObject*, 
QEvent*) (this=0x55555d4af960, receiver=0x55555e7e7900, event=0x7fffffffce00)
    at 
/home/scott/lyxbuilds/master/repo/src/frontends/qt/GuiApplication.cpp:3000
#19 0x00007ffff6cdd16a in QCoreApplication::notifyInternal2(QObject*, QEvent*) 
(receiver=0x55555e7e7900, event=0x7fffffffce00) at 
kernel/qcoreapplication.cpp:1063
#20 0x00007ffff780611a in QWidgetPrivate::sendPaintEvent(QRegion const&) () at 
/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007ffff7806942 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion 
const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, 
QWidgetRepaintManager*) ()
    at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007ffff77dc912 in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007ffff780e8cd in QWidget::event(QEvent*) () at 
/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x0000555559eeb167 in lyx::frontend::GuiView::event(QEvent*) 
(this=0x55555db788f0, e=0x55555da83980) at 
/home/scott/lyxbuilds/master/repo/src/frontends/qt/GuiView.cpp:1644
#25 0x00007ffff77cb6b3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) 
() at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#26 0x0000555559e098ac in lyx::frontend::GuiApplication::notify(QObject*, 
QEvent*) (this=0x55555d4af960, receiver=0x55555db788f0, event=0x55555da83980)
    at 
/home/scott/lyxbuilds/master/repo/src/frontends/qt/GuiApplication.cpp:3000
#27 0x00007ffff6cdd16a in QCoreApplication::notifyInternal2(QObject*, QEvent*) 
(receiver=0x55555db788f0, event=0x55555da83980) at 
kernel/qcoreapplication.cpp:1063
#28 0x00007ffff6ce0257 in QCoreApplicationPrivate::sendPostedEvents(QObject*, 
int, QThreadData*) (receiver=0x0, event_type=0, data=0x55555d483190) at 
kernel/qcoreapplication.cpp:1817
#29 0x00007ffff6d36ef7 in postEventSourceDispatch(GSource*, GSourceFunc, 
gpointer) (s=0x55555d73b780) at kernel/qeventdispatcher_glib.cpp:277
#30 0x00007ffff5a598bb in g_main_context_dispatch () at 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007ffff5aacf08 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007ffff5a57003 in g_main_context_iteration () at 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007ffff6d36548 in 
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) 
(this=0x55555d6ca160, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#34 0x00007ffff6cdba9b in 
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) 
(this=this@entry=0x7fffffffd830, flags=..., flags@entry=...) at 
../../include/QtCore/../../src/corelib/global/qflags.h:69
#35 0x00007ffff6ce4024 in QCoreApplication::exec() () at 
../../include/QtCore/../../src/corelib/global/qflags.h:121
#36 0x0000555559e03556 in lyx::frontend::GuiApplication::exec() 
(this=0x55555d4af960) at 
/home/scott/lyxbuilds/master/repo/src/frontends/qt/GuiApplication.cpp:2750
#37 0x000055555906da97 in lyx::LyX::exec(int&, char**) (this=0x7fffffffda00, 
argc=@0x7fffffffd9fc: 1, argv=0x7fffffffdb58) at 
/home/scott/lyxbuilds/master/repo/src/LyX.cpp:397
#38 0x00005555594b3270 in main(int, char**) (argc=1, argv=0x7fffffffdb58) at 
/home/scott/lyxbuilds/master/repo/src/main.cpp:55
(gdb) 

Attachment: signature.asc
Description: PGP signature

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to