Am Freitag, dem 12.04.2024 um 12:06 -0400 schrieb Scott Kostyshak:
> To reproduce:
> 
> 1. Start a new document.
> 2. Start a math inset, e.g., ctrl + m.
> 3. Type "x".
> 4. Press "_" to go into the subscript.
> 5. Type "i" (so at this step the math will be $x_i$).
> 6. Save the (new) file.
> 
> After saving, I get a SIGSEGV.
> 
> Note that to reproduce, after 5, do not move the cursor.
> 
> Can anyone reproduce?

Yes. Seems the superscript inset is not properly initialized at that
point, leading to a null pointer in CursorSlice::text().

Note that this is not specific to this particularly inset. I can
reproduce with any other (text) inset, e.g.:

1. Start a new document.
2. Insert a Note inset
3. Save the (new) file (cursor still being in the Note inset).

=> Kaboom.

Backtrace:

#0  0x000000000071be15 in lyx::CursorSlice::text() const
(this=0x325d040)
    at /home/juergen/lyx/lyx-devel/src/CursorSlice.h:112
#1  lyx::DocIterator::innerTextSlice() const (this=0x2caf388)
    at DocIterator.cpp:216
#2  0x000000000071c231 in lyx::DocIterator::innerText() const
    (this=<optimized out>) at DocIterator.cpp:306
#3  0x0000000000bae7ff in
lyx::frontend::LayoutBox::updateContents(bool)
    (this=0x1e33db0, reset=reset@entry=false) at LayoutBox.cpp:581
#4  0x0000000000b78bcb in lyx::frontend::GuiView::updateLayoutList()
    (this=this@entry=0x1dfcf30) at GuiView.cpp:2065
#5  0x0000000000b78c2e in lyx::frontend::GuiView::setBusy(bool)
    (this=0x1dfcf30, busy=<optimized out>) at GuiView.cpp:1858
#6  0x0000000000683212 in lyx::Buffer::setBusy(bool) const
    (this=this@entry=0x2680320, on=on@entry=false) at Buffer.cpp:4306
#7  0x00000000006a010c in lyx::Buffer::reload()
(this=this@entry=0x2680320)
    at Buffer.cpp:5565


-- 
Jürgen

Attachment: signature.asc
Description: This is a digitally signed message part

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

Reply via email to