Hi JMarc,

we likely have new crash related to the latest mathed cursor patch:

1. load the document (I will send privately though)
2. go to section 7.2, in the midst of paragraph there is last
   CA^{2+} in mathed, put the cursor just behind it
3.
now random iteration of these steps gives me crash within 30s of playing
3a. ctrl+m create empty eq.
3b. go out of and back inside the inset or move around little bit with cursor 
(I mean caret)
3c. type single 'a' into it
3d. delete by backspace the whole inset, or 'a', or 'a' and then inset by 
second backspace

4. kaboom.

I was not capable to find 100% recipy, but in all cases the crash happened after
backspace in the empty inset. It might be connected to the font reset as well?

Tried to create small MWE but it did not work.
Math preview is on, qt5, master (and branch when I apply your patch on top of 
it,
I was not able to get it with branch proper).

Backtrace:

Thread 1 "lyx" received signal SIGSEGV, Segmentation fault.
0x00005555558f28fb in lyx::CursorSlice::text (this=0x5555573ab8c0, 
this=0x5555573ab8c0) at CursorSlice.h:119
119             Text * text() const { return inset_->getText(idx_); }
(gdb) bt
#0  0x00005555558f28fb in lyx::CursorSlice::text (this=0x5555573ab8c0, 
this=0x5555573ab8c0) at CursorSlice.h:119
#1  lyx::(anonymous namespace)::sliceInRow (row=..., text=0x555556f88168, 
cs=...) at BufferView.cpp:3053
#2  lyx::BufferView::needRepaint (this=<optimized out>, text=0x555556f88168, 
row=...) at BufferView.cpp:3063
#3  0x00005555558ab118 in lyx::TextMetrics::drawParagraph 
(this=this@entry=0x555557e28f88, pi=..., pit=<optimized out>,
    pit@entry=80, x=x@entry=0, y=6, y@entry=-203) at TextMetrics.cpp:1895
#4  0x00005555558ab6b7 in lyx::TextMetrics::draw 
(this=this@entry=0x555557e28f88, pi=..., x=x@entry=0, y=y@entry=-203)
    at TextMetrics.cpp:1803
#5  0x00005555558f77aa in lyx::BufferView::draw (this=0x5555573aae20, pain=..., 
paint_caret=<optimized out>)
    at BufferView.cpp:3175
#6  0x0000555555b93118 in lyx::frontend::GuiWorkArea::paintEvent 
(this=0x5555573a7090, ev=0x7fffffffc500)
    at GuiWorkArea.cpp:1262

Pavel

Reply via email to