On Thu, Oct 04, 2018 at 10:27:17AM +0200, Kornel Benko wrote: > Am Donnerstag, 4. Oktober 2018 10:17:43 CEST schrieb Kornel Benko > <kor...@lyx.org>: > > Both, lyx2.4 and lyx2.3 > > To reproduce: > > > > 1.) Open (or create) a small lyx-file. (Say 3 lines) > > 2.) select the whole buffer > > 3.) in findadv search for a string (ignore format or not) > > ==> crash > > > > LASSERT() is called at lyxfind.cpp in stringifyFromForSearch() > > LASSERT(cur.pos() >= 0 && cur.pos() <= cur.lastpos(), > > return docstring()); > > > > In my case > > cur.pos() == 12 > > cur.lastpos() == 11 > > len == -1 > > > > OK, selecting the lines so, that the last selected line is longer than the > first selected, > then we get the crash. Looks like cur.pos() and cur.lastpos() are referring > to different lines.
I can reproduce. It seems I can reproduce even on 2.1.0, which is surprising since I would have guessed this bug would be more common. Well, good find! Probably a lot of people have run into this and it hasn't been reported (?) [1]. Scott
signature.asc
Description: PGP signature