Hi there,
trying my autotests test-cases for find adv, I just found a crash
(findadv-12-in.txt):
# Replacing the last buffer element with some math that matches
# again the search pattern, should not result in a double replacement
# (#7442)
#
Lang it_IT.utf8
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: a\C\[Home]
KK: \CF
KK: a\[Tab]
KK: \Cm\\bar a\[Return]\[Return]
TestEnd
Assert ! pcregrep -M 'against.*bar' lyx-log.txt
T.
Program received signal SIGSEGV, Segmentation fault.
0x00000000005524a1 in lyx::Paragraph::getInset(long) const ()
(gdb) bt
#0 0x00000000005524a1 in lyx::Paragraph::getInset(long) const ()
#1 0x000000000062f3a7 in lyx::ParagraphMetrics::singleWidth(long,
lyx::Font const&) const ()
#2 0x00000000005a4047 in lyx::TextMetrics::cursorX(lyx::CursorSlice
const&, bool) const ()
#3 0x00000000005d54ff in lyx::BufferView::coordOffset(lyx::DocIterator
const&) const ()
#4 0x00000000005d5601 in lyx::BufferView::getPos(lyx::DocIterator
const&) const ()
#5 0x00000000005d56b2 in
lyx::BufferView::cursorPosAndHeight(lyx::Point&, int&) const ()
#6 0x000000000080ff33 in
lyx::frontend::GuiWorkArea::startBlinkingCursor() ()
#7 0x00000000007f0ee7 in lyx::frontend::GuiView::setBusy(bool) ()
#8 0x000000000084beb7 in
lyx::frontend::FindAndReplaceWidget::findAndReplaceScope(lyx::FindAndReplaceOptions&,
bool) ()
#9 0x000000000084cd2a in
lyx::frontend::FindAndReplaceWidget::findAndReplace(bool, bool, bool,
bool, bool, bool, bool, bool) ()
#10 0x000000000084d106 in
lyx::frontend::FindAndReplaceWidget::findAndReplace(bool, bool, bool) ()
#11 0x000000000084d1ae in
lyx::frontend::FindAndReplaceWidget::on_replacePB_clicked() ()
#12 0x000000000084d332 in
lyx::frontend::FindAndReplaceWidget::eventFilter(QObject*, QEvent*) ()
#13 0x00007ffff6020627 in
QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<value
optimized out>, receiver=0x1799b80, event=0x7fffffffceb0)
at kernel/qcoreapplication.cpp:846
#14 0x00007ffff650e9b1 in QApplicationPrivate::notify_helper
(this=0xf105a0, receiver=0x1799b80, e=0x7fffffffceb0) at
kernel/qapplication.cpp:4458
#15 0x00007ffff6513c31 in QApplication::notify (this=<value optimized
out>, receiver=<value optimized out>, e=0x7fffffffceb0) at
kernel/qapplication.cpp:3921
#16 0x00000000007d7fc5 in
lyx::frontend::GuiApplication::notify(QObject*, QEvent*) ()
#17 0x00007ffff602049c in QCoreApplication::notifyInternal
(this=0xf0f7b0, receiver=0x1799b80, event=0x7fffffffceb0) at
kernel/qcoreapplication.cpp:731
#18 0x00007ffff65b1cf9 in QKeyMapper::sendKeyEvent (keyWidget=0x1799b80,
grab=<value optimized out>, type=QEvent::KeyPress, code=16777220,
modifiers=..., text=...,
autorepeat=false, count=1, nativeScanCode=36,
nativeVirtualKey=65293, nativeModifiers=16) at
kernel/qkeymapper_x11.cpp:1866
#19 0x00007ffff65b2176 in QKeyMapperPrivate::translateKeyEvent
(this=0xf64d00, keyWidget=0x1799b80, event=0x7fffffffda40, grab=false)
at kernel/qkeymapper_x11.cpp:1836
#20 0x00007ffff658df03 in QApplication::x11ProcessEvent (this=0xf0f7b0,
event=0x7fffffffda40) at kernel/qapplication_x11.cpp:3571
#21 0x00007ffff65b6162 in x11EventSourceDispatch (s=0xf0edc0,
callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#22 0x00007ffff7518bcd in g_main_context_dispatch () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007ffff75193a8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007ffff7519639 in g_main_context_iteration () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007ffff604b3ef in QEventDispatcherGlib::processEvents
(this=0xf10130, flags=<value optimized out>) at
kernel/qeventdispatcher_glib.cpp:422
#26 0x00007ffff65b5dfe in QGuiEventDispatcherGlib::processEvents
(this=<value optimized out>, flags=<value optimized out>) at
kernel/qguieventdispatcher_glib.cpp:204
#27 0x00007ffff601f882 in QEventLoop::processEvents (this=<value
optimized out>, flags=...) at kernel/qeventloop.cpp:149
#28 0x00007ffff601fabc in QEventLoop::exec (this=0x7fffffffdd40,
flags=...) at kernel/qeventloop.cpp:201
#29 0x00007ffff6023ecb in QCoreApplication::exec () at
kernel/qcoreapplication.cpp:1008
#30 0x00000000007ce527 in lyx::frontend::GuiApplication::exec() ()
#31 0x000000000051b267 in lyx::LyX::exec(int&, char**) ()
#32 0x0000000000437b3c in main ()