Vincent van Ravesteijn wrote:
Abdelrazak Younes schreef:
Vincent van Ravesteijn - TNW wrote:
Abdelrazak Younes wrote:
And I cannot make gdb to produce a backtrace... lyx occupying 100%
cpu
and the only way to kill it is with 'kill -9'.
I tested 1.6.1 compiled against Q4.4 but running against Qt4.5 and
1.6.2svn compiled against Qt4.5.
And with trunk too...
Abdel.
Confirmed.
1. New document,
2. Document->Settings->Preamble
3. Type "L\"
4. Any character inserted now causes LyX to freeze with 100% cpu.
Somewhere in LateXHighlighter::highlightBlock()
Right, this patch "solves" the problem by disabling latex
highlighting....
Index: src/frontends/qt4/LaTeXHighlighter.cpp
===================================================================
--- src/frontends/qt4/LaTeXHighlighter.cpp (revision 28734)
+++ src/frontends/qt4/LaTeXHighlighter.cpp (working copy)
@@ -33,6 +33,7 @@
void LaTeXHighlighter::highlightBlock(QString const & text)
{
+ return;
// $ $
static const QRegExp exprMath("\\$[^\\$]*\\$");
int index = text.indexOf(exprMath);
Abdel,
You are a true genious..
I know ;-)
Anyway, I committed a non less genius "fix". The while loop was not very
safe in any case.
The problem lies in this block:
// \whatever
static const QRegExp exprKeyword("\\\\[A-Za-z]+");
index = text.indexOf(exprKeyword);
for (size_t i = 0; i != max_loop; ++i) {
int length = exprKeyword.matchedLength();
setFormat(index, length, keywordFormat);
index = text.indexOf(exprKeyword, index + length);
if (index == -1)
break;
}
LASSERT(index >= 0, return);
Abdel.