About a month or so ago I got a bug report from an FXiTe[1] user:
fxite: LexAccessor.h:136: void LexAccessor::ColourTo(unsigned int, int):
Assertion 'pos >= startSeg' failed.
I tried here on 2 different machines (ArchLinux and Ubuntu) but I wasn't
able to reproduce the crash, but he says it crashes for him on 4 different
Ubuntu systems. He mostly works with LaTeX files with Dutch keyboard and
locale, so maybe that has something to do with it. He also mentioned the
problem only happens with FXiTe/FXScintilla, but not with SciTE/GTK.
Since I had no clue where to begin debugging this, I told him to try commenting
out the assertion and re-compiling the editor. He reported back that solved the
problem, no more crashes and no problems with the lexer. The curious thing to
me is the statement immediately following the assertion:
assert(pos >= startSeg);
if (pos < startSeg) {
return;
}
which makes me wonder what the purpose of the assertion is anyway (other than
to cause a crash ;-)
Since I already do a minimal amount of patching when pulling in the latest
Scintilla sources, it wouldn't take much effort to patch out the assertion,
but I wonder if this might cause any unforeseen problems. I would also be
interested to know if anyone has any idea what might be causing the
assertion to fail.
Thanks,
-Jeff
[1] https://github.com/yetanothergeek/fxite