On Mon, Feb 22, 2021 at 06:31:08PM +0000, V K wrote: > Yes, I can recreate crash with anonymized file. I marked line/paragraph part > of which should be selected before creating note to get a crash with ====. > Selection should be from the first line. Selection should encompass one line > more on the bottom if selecting from the second line from the top. That is > the minimal length to get a crash.
Indeed, I can reproduce the problem, generally selecting line starting with ========== to the very end of the document and then insert-note is enough to trigger it. Bisect leads to: commit 5a58ca6576a1fa2d6bea8e9e7927d5779943e593 Author: Jean-Marc Lasgouttes <lasgout...@lyx.org> Date: Sun Feb 14 21:34:43 2021 +0100 Fix caret height when inserting new inset For now, the simplest thing to do it to compute metrics in all cases before calling setCurrentFont(). In 2.5, a better approach will be to add a new virtual function InsetText::setFont that will set correctly TextMetrics::font_ (a cache of the reference font). Fixes bug #12126. Backtrace: #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x00007ffff6558535 in __GI_abort () at abort.c:79 #2 0x00007ffff69247bd in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6 #3 0x00005555562d6fef in std::__debug::vector<__gnu_debug::_Safe_iterator<std::__cxx1998::_List_iterator<lyx::Paragraph>, std::__debug::list<lyx::Paragraph, std::allocator<lyx::Paragraph> > >, std::allocator<__gnu_debug::_Safe_iterator<std::__cxx1998::_List_iterator<lyx::Paragraph>, std::__debug::list<lyx::Paragraph, std::allocator<lyx::Paragraph> > > > >::operator[] (this=0x7fffec009690, __n=37) at /usr/include/c++/8/debug/vector:417 #4 0x00005555562d4acd in lyx::RandomAccessList<lyx::Paragraph>::operator[] (this=0x7fffec009660, pos=37) at ./support/RandomAccessList.h:161 #5 0x00005555566295a8 in lyx::TextMetrics::checkInsetHit (this=0x5555581bdef8, pit=37, x=179, y=6) at TextMetrics.cpp:1491 #6 0x00005555566299ef in lyx::TextMetrics::checkInsetHit (this=0x5555581bdef8, x=179, y=6) at TextMetrics.cpp:1515 #7 0x000055555668518a in lyx::BufferView::getCoveringInset (this=0x5555582f8430, text=..., x=179, y=6) at BufferView.cpp:2303 #8 0x00005555566852b1 in lyx::BufferView::updateHoveredInset (this=0x5555582f8430) at BufferView.cpp:2334 #9 0x000055555667ab85 in lyx::BufferView::processUpdateFlags (this=0x5555582f8430, flags=lyx::Update::SinglePar) at BufferView.cpp:574 #10 0x00005555565ee806 in lyx::Text::dispatch (this=0x7fffec009658, cur=..., cmd=...) at Text3.cpp:2090 #11 0x00005555569958a6 in lyx::InsetText::doDispatch (this=0x7fffec009640, cur=..., cmd=...) at insets/InsetText.cpp:343 #12 0x00005555568260b8 in lyx::Inset::dispatch (this=0x7fffec009640, cur=..., cmd=...) at insets/Inset.cpp:328 #13 0x0000555556407754 in lyx::Cursor::dispatch (this=0x55555836a088, cmd0=...) at Cursor.cpp:823 #14 0x0000555556a2e35f in lyx::frontend::GuiView::dispatchToBufferView (this=0x555557e02c30, cmd=..., dr=...) at GuiView.cpp:3943 #15 0x0000555556a3307b in lyx::frontend::GuiView::dispatch (this=0x555557e02c30, cmd=..., dr=...) at GuiView.cpp:4661 #16 0x00005555569da4be in lyx::frontend::GuiApplication::dispatch (this=0x555557424ff0, cmd=..., dr=...) at GuiApplication.cpp:2211 #17 0x00005555569d5dc8 in lyx::frontend::GuiApplication::dispatch (this=0x555557424ff0, cmd=...) at GuiApplication.cpp:1500 #18 0x00005555564e9b1f in lyx::dispatch (action=...) at LyX.cpp:1477 #19 0x0000555556a98a82 in lyx::frontend::Action::action (this=0x5555581cdf90) at Action.cpp:91 #20 0x0000555556a98af8 in lyx::frontend::Action::qt_static_metacall (_o=0x5555581cdf90, Pavel -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel