[QScintilla] [Bug] Assertion `val >= 0' failed by QsciLexerCPP
Yuya Nishihara
yuya at tcha.org
Mon Aug 13 11:25:27 BST 2012
Hi,
I encountered crash if QsciLexerCPP is applied for "#if \xb5" line.
I made a minimal repro code (see attached). Both C++ and Python versions
do the same thing.
Environment:
Debian GNU/Linux (sid)
Kernel 3.2.0-3-amd64 #1 SMP Mon Jul 23 02:45:17 UTC 2012 x86_64 GNU/Linux
libqt4-core 4:4.8.2-2+b1
libqscintilla2-8 2.6.1-5+b1
Backtrace:
qsci-cpplexer-crash: ../lexlib/CharacterSet.h:62: bool CharacterSet::Contains(int) const: Assertion `val >= 0' failed.
Program received signal SIGABRT, Aborted.
0x00007ffff5aaf475 in *__GI_raise (sig=<optimized out>)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007ffff5aaf475 in *__GI_raise (sig=<optimized out>)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007ffff5ab26f0 in *__GI_abort () at abort.c:92
#2 0x00007ffff5aa8621 in *__GI___assert_fail (
assertion=0x7ffff7b95527 "val >= 0", file=<optimized out>, line=62,
function=0x7ffff7b96d40 "bool CharacterSet::Contains(int) const")
at assert.c:81
#3 0x00007ffff79b7920 in ?? () from /usr/lib/libqscintilla2.so.8
#4 0x00007ffff7a3410b in LexerCPP::EvaluateExpression(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&) () from /usr/lib/libqscintilla2.so.8
#5 0x00007ffff7a37f40 in LexerCPP::Lex(unsigned int, int, int, IDocument*) ()
from /usr/lib/libqscintilla2.so.8
#6 0x00007ffff7b4aad0 in LexInterface::Colourise(int, int) ()
from /usr/lib/libqscintilla2.so.8
#7 0x00007ffff7b597d2 in Editor::StyleToPositionInView(int) ()
from /usr/lib/libqscintilla2.so.8
#8 0x00007ffff7b63445 in Editor::Paint(Surface*, PRectangle) ()
from /usr/lib/libqscintilla2.so.8
#9 0x00007ffff79ef289 in QsciScintillaQt::paintEvent(QPaintEvent*) ()
from /usr/lib/libqscintilla2.so.8
#10 0x00007ffff6ebfdb2 in QWidget::event (this=0x7fffffffdf60, event=
0x7fffffffcad0) at kernel/qwidget.cpp:8517
#11 0x00007ffff726ad66 in QFrame::event (this=0x7fffffffdf60, e=0x7fffffffcad0)
at widgets/qframe.cpp:557
#12 0x00007ffff693bce6 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<optimized out>, receiver=0x6957f0, event=0x7fffffffcad0)
at kernel/qcoreapplication.cpp:1025
#13 0x00007ffff6e706dc in QApplicationPrivate::notify_helper (
this=this at entry=0x603da0, receiver=receiver at entry=0x6957f0,
e=e at entry=0x7fffffffcad0) at kernel/qapplication.cpp:4552
#14 0x00007ffff6e74b8a in QApplication::notify (this=0x7fffffffdee0,
receiver=0x6957f0, e=0x7fffffffcad0) at kernel/qapplication.cpp:4417
#15 0x00007ffff693bb7e in QCoreApplication::notifyInternal (this=
0x7fffffffdee0, receiver=0x6957f0, event=0x7fffffffcad0)
at kernel/qcoreapplication.cpp:915
#16 0x00007ffff6ebbac4 in sendSpontaneousEvent (event=0x7fffffffcad0,
receiver=0x6957f0)
at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#17 QWidgetPrivate::drawWidget (this=this at entry=0x695e50, pdev=pdev at entry=
0xd5b0a0, rgn=..., offset=..., flags=flags at entry=4,
sharedPainter=sharedPainter at entry=0x0,
backingStore=backingStore at entry=0x81cad0) at kernel/qwidget.cpp:5594
#18 0x00007ffff6ebc5bf in QWidgetPrivate::paintSiblingsRecursive (
this=this at entry=0x6923f0, pdev=pdev at entry=0xd5b0a0, siblings=...,
index=<optimized out>, index at entry=1, rgn=..., offset=...,
flags=flags at entry=4, sharedPainter=sharedPainter at entry=0x0,
backingStore=backingStore at entry=0x81cad0) at kernel/qwidget.cpp:5803
#19 0x00007ffff6ebc404 in QWidgetPrivate::paintSiblingsRecursive (
this=0x6923f0, pdev=0xd5b0a0, siblings=..., index=1, rgn=..., offset=...,
flags=4, sharedPainter=0x0, backingStore=0x81cad0)
at kernel/qwidget.cpp:5790
#20 0x00007ffff6ebb655 in QWidgetPrivate::drawWidget (this=0x6923f0,
pdev=0xd5b0a0, rgn=..., offset=..., flags=<optimized out>,
sharedPainter=0x0, backingStore=0x81cad0) at kernel/qwidget.cpp:5647
#21 0x00007ffff7085f28 in QWidgetBackingStore::sync (this=this at entry=0x81cad0)
at painting/qbackingstore.cpp:1373
#22 0x00007ffff70862ee in QWidgetBackingStore::sync (this=0x81cad0,
exposedWidget=0x7fffffffdf60, exposedRegion=...)
at painting/qbackingstore.cpp:1161
#23 0x00007ffff6eea1ea in QETWidget::translatePaintEvent (
this=this at entry=0x7fffffffdf60, event=event at entry=0x7fffffffdac0)
at kernel/qapplication_x11.cpp:5237
#24 0x00007ffff6eeb135 in QApplication::x11ProcessEvent (this=0x7fffffffdee0,
event=0x7fffffffdac0) at kernel/qapplication_x11.cpp:3546
#25 0x00007ffff6f11ba2 in x11EventSourceDispatch (s=0x607ab0, callback=0,
user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#26 0x00007ffff537f205 in g_main_context_dispatch ()
from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007ffff537f538 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#28 0x00007ffff537f5f4 in g_main_context_iteration ()
from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007ffff696a286 in QEventDispatcherGlib::processEvents (this=0x605290,
flags=...) at kernel/qeventdispatcher_glib.cpp:424
#30 0x00007ffff6f1181e in QGuiEventDispatcherGlib::processEvents (
this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#31 0x00007ffff693a8cf in QEventLoop::processEvents (this=this at entry=
0x7fffffffde90, flags=...) at kernel/qeventloop.cpp:149
#32 0x00007ffff693ab58 in QEventLoop::exec (this=0x7fffffffde90, flags=...)
at kernel/qeventloop.cpp:204
#33 0x00007ffff693fd18 in QCoreApplication::exec ()
at kernel/qcoreapplication.cpp:1187
#34 0x0000000000400c8f in main ()
Regards,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cc
Type: text/x-c++src
Size: 312 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/qscintilla/attachments/20120813/a62a805e/attachment.cc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qsci-cpplexer-crash.py
Type: text/x-python
Size: 267 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/qscintilla/attachments/20120813/a62a805e/attachment.py>
More information about the QScintilla
mailing list