On 10/25/2017 02:35 PM, Kornel Benko wrote:
> Am Dienstag, 24. Oktober 2017 um 19:51:41, schrieb Jean-Marc Lasgouttes 
> <lasgout...@lyx.org>
>> Le 23/10/2017 à 22:26, Pavel Sanda a écrit :
>>> And I have reproducible crash:
>>> 1. start new document
>>> 2. write "ambititious ", spellcheck correctly underlies text.
>>> 3. try to fix spelling via context menu, choose "ambitious"
>>> 4. kaboom
>> I can't reproduce. Qt4 or Qt5?
>>
>> JMarc
> I can reproduce with continuous spellcheck enabled. Qt5.
>
> It crashes on LASSERT(LASSERT(end > start && end <= size() + 1, return false);
>  at src/Paragraph.cpp:612
> (gdb) p start
> $1 = 0
> (gdb) p end
> $2 = 11
> (gdb) p size()
> $1 = 9
>
> Without this assert, everything works OK. Richard, why is it there needed?

"git blame" will blame me, but I only added the "return false". That
way, in release mode, we just say "no change" and continue, hopefully
safely. The assertion itself goes back to d53d4a5c, in 2006.

Presumably, the end variable does not really make sense here. Position
11 is past the end of the paragraph (and past the end of paragraph
marker at pos=10). We're lucky, because Changes::isChanged isn't
affected by this. Something is definitely wrong, though, and that's what
the assertion is telling us.

Richard




Richard


Reply via email to