On Thu, Oct 04, 2018 at 09:18:56PM +0200, Kornel Benko wrote:
> Am Donnerstag, 4. Oktober 2018 10:00:42 CEST schrieb Scott Kostyshak 
> <skost...@lyx.org>:
> > 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
> 
> I am fighting with regex and language distinction. Our latex output does not 
> specify
> enough info for the find routines. The playing with this led to crash.
> 
> Now, I have a working solution. Would you like to test?
> 
> If setting for 'not ignore format', you should be able to find for instance a 
> string with specified language.
> Unfortunately there is there are many possible 'features' which have to be 
> the same as in the searched string.
> 
> So searching as regex [a-z]* only words in document language, not 
> bold/emphasized or whatever.

Dang that seems tricky. Should we CC Tommaso and see if he has time to
take a look?

Scott

Attachment: signature.asc
Description: PGP signature

Reply via email to