SIGSEGV on current master when saving with cursor in subscript
Jürgen Spitzmüller
jspitzm at gmail.com
Sat Apr 13 06:10:59 UTC 2024
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 at entry=false) at LayoutBox.cpp:581
#4 0x0000000000b78bcb in lyx::frontend::GuiView::updateLayoutList()
(this=this at 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 at entry=0x2680320, on=on at entry=false) at Buffer.cpp:4306
#7 0x00000000006a010c in lyx::Buffer::reload()
(this=this at entry=0x2680320)
at Buffer.cpp:5565
--
Jürgen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 508 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20240413/dd0f0adb/attachment.asc>
More information about the lyx-devel
mailing list