Bug 271278 - Quanta : Css parser crashing
Summary: Quanta : Css parser crashing
Status: RESOLVED UNMAINTAINED
Alias: None
Product: quanta
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Quanta Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-19 09:35 UTC by jay
Modified: 2015-10-10 08:35 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
crashing css from bug (1.40 KB, text/css)
2011-04-24 19:39 UTC, jay
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jay 2011-04-19 09:35:35 UTC
Application: quanta (3.9.0)
KDE Platform Version: 4.6.2 (4.6.2)
Qt Version: 4.7.0
Operating System: Linux 2.6.35-28-generic x86_64
Distribution: Ubuntu 10.10

-- Information about the crash:
Fresh compile of whole kdevplatform..kdevelop..quanta... from git
Kde 4.6.2

(background parser set to 1 job at a time)

quanta(5831)/kdevplatform (language) KDevelop::BackgroundParserPrivate::parseDocumentsInternal: creating parse-job KUrl("file:///var/www/isrepo/mvc/trunk/www/public/js/ckeditor/skins/v2/templates.css") new count of active parse-jobs: 1
quanta(5831)/kdevplatform (shell) KDevelop::PluginController::loadPluginInternal: Attempting to load ' "KDevCssSupport" '
quanta(5831)/kdevplatform (shell) KDevelop::PluginController::loadPluginInternal: Checking...  "KDevCssSupport"
quanta(5831)/kdevplatform (shell) KDevelop::PluginController::loadPluginInternal: Checked... starting to load: "KDevCssSupport" type: QVariant(, )
quanta(5831)/kdevplatform (shell) KDevelop::PluginController::loadPluginInternal: Successfully loaded plugin ' "KDevCssSupport" '
quanta(5831)/kdevplatform (shell) KDevelop::MainWindowPrivate::addPlugin: add plugin Css::LanguageSupport(0x49c5cc0) "kdevcsssupport"
quanta(5831)/kdevplatform (language) KDevelop::LanguageController::languagesForMimetype: language-support: 0x49c5ce8
quanta(5831)/kdevplatform (shell) KDevelop::Language::Language: creating language "Css"
quanta(5831)/kdevplatform (language) KDevelop::LanguageControllerPrivate::addLanguageForSupport: adding supported mimetype: "text/css" language: "Css"
quanta(5831)/kdevplatform (language) KDevelop::LanguageControllerPrivate::addLanguageForSupport: adding supported mimetype: "text/html" language: "Css"
quanta(5831)/kdevcsssupport Css::LanguageSupport::createParseJob: KUrl("file:///var/www/isrepo/mvc/trunk/www/public/js/ckeditor/skins/v2/templates.css")
quanta(5831) Css::ParseJob::ParseJob:
quanta(5831)/kdevcsssupport Css::ParseJob::run: parsing "/var/www/isrepo/mvc/trunk/www/public/js/ckeditor/skins/v2/templates.css"
ASSERT: "i >= 0 && i < size()" in file /usr/include/qt4/QtCore/qbytearray.h, line 396
KCrash: Application 'quanta' crashing...



workaround is to disable css mimetypes detection 
share/kde4/services/kdevcsssupport.desktop
X-KDevelop-SupportedMimeTypes=text/xcss,text/xhtml

The crash can be reproduced every time.

-- Backtrace:
Application: Quanta (quanta), signal: Aborted
pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
	in ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
[Current thread is 1 (Thread 0x7f75ebdf6760 (LWP 5831))]

Thread 9 (Thread 0x7f75d1ea7700 (LWP 5832)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:212
#1  0x00007f75e75e6da2 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007f75e3e4fa84 in KDevelop::DUChainPrivate::CleanupThread::run (this=0x237f920) at /opt/kdev/kde4/kdevplatform/language/duchain/duchain.cpp:286
#3  0x00007f75e75e627e in ?? () from /usr/lib/libQtCore.so.4
#4  0x00007f75e52ab971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#5  0x00007f75e5bf292d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#6  0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7f75c25b1700 (LWP 5840)):
#0  0x00007f75e5be6203 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f75e122e009 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007f75e122e45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007f75e77061e6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007f75e76d8a02 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007f75e76d8dec in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f75e75e32fd in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007f75e3f7c9f5 in KDevelop::CompletionWorkerThread::run (this=0x2cbf5b0) at /opt/kdev/kde4/kdevplatform/language/codecompletion/codecompletionmodel.cpp:84
#8  0x00007f75e75e627e in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007f75e52ab971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#10 0x00007f75e5bf292d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7f75bce7d700 (LWP 5842)):
#0  0x00007f75e5be6203 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f75e122e009 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007f75e122e45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007f75e77061e6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007f75e76d8a02 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007f75e76d8dec in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f75e75e32fd in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007f75e76b85f8 in ?? () from /usr/lib/libQtCore.so.4
#8  0x00007f75e75e627e in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007f75e52ab971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#10 0x00007f75e5bf292d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7f75bc62d700 (LWP 5843)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f75e4b60334 in ?? () from /usr/lib/libQtScript.so.4
#2  0x00007f75e4b60369 in ?? () from /usr/lib/libQtScript.so.4
#3  0x00007f75e52ab971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#4  0x00007f75e5bf292d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7f75bb854700 (LWP 5855)):
#0  0x00007f75e5be6203 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f75e122e009 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007f75e122e45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007f75e77061e6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007f75e76d8a02 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007f75e76d8dec in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f75e75e32fd in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007f75e76b85f8 in ?? () from /usr/lib/libQtCore.so.4
#8  0x00007f75e75e627e in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007f75e52ab971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#10 0x00007f75e5bf292d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f75ba70e700 (LWP 5881)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f75df6ae20e in ?? () from /usr/lib/libQtWebKit.so.4
#2  0x00007f75df6ae329 in ?? () from /usr/lib/libQtWebKit.so.4
#3  0x00007f75e52ab971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#4  0x00007f75e5bf292d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f75b8c35700 (LWP 5892)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f75e75e6e3b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007f75ea219d64 in ?? () from /usr/lib/libthreadweaver.so.4
#3  0x00007f75ea21cf6b in ?? () from /usr/lib/libthreadweaver.so.4
#4  0x00007f75ea21cf84 in ?? () from /usr/lib/libthreadweaver.so.4
#5  0x00007f75ea21b4df in ?? () from /usr/lib/libthreadweaver.so.4
#6  0x00007f75ea21ba38 in ThreadWeaver::Thread::run() () from /usr/lib/libthreadweaver.so.4
#7  0x00007f75e75e627e in ?? () from /usr/lib/libQtCore.so.4
#8  0x00007f75e52ab971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#9  0x00007f75e5bf292d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f75b8434700 (LWP 5893)):
[KCrash Handler]
#6  0x00007f75e5b3fba5 in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#7  0x00007f75e5b436b0 in abort () at abort.c:92
#8  0x00007f75e75dd864 in qt_message_output(QtMsgType, char const*) () from /usr/lib/libQtCore.so.4
#9  0x00007f75e75dda42 in ?? () from /usr/lib/libQtCore.so.4
#10 0x00007f75e75ddbf5 in qFatal(char const*, ...) () from /usr/lib/libQtCore.so.4
#11 0x00007f75b77f4d06 in QByteArray::at (this=0x7f75b8433678, i=1432) at /usr/include/qt4/QtCore/qbytearray.h:396
#12 0x00007f75b77f4b05 in Css::Tokenizer::LexerInput (this=0x7f75b84335b0, buf=0x7f75cc936e40 "}") at tokenizer.flex:197
#13 0x00007f75b77f332f in yyFlexLexer::yy_get_next_buffer (this=0x7f75b84335b0) at tokenizer.cpp:2118
#14 0x00007f75b77f27bc in Css::Tokenizer::yylex (this=0x7f75b84335b0) at tokenizer.cpp:1871
#15 0x00007f75b77e3cf6 in Css::Parser::tokenize (this=0x7f75cc390a00, contents=...) at /opt/kdev/kde4/quanta/languages/css/parser/css.g:617
#16 0x00007f75b77f5564 in Css::ParseSession::createParser (this=0x7f75cc002b10) at /opt/kdev/kde4/quanta/languages/css/parser/parsesession.cpp:108
#17 0x00007f75b77f5598 in Css::ParseSession::parse (this=0x7f75cc002b10, ast=0x7f75b8433b40) at /opt/kdev/kde4/quanta/languages/css/parser/parsesession.cpp:114
#18 0x00007f75b7a1f433 in Css::ParseJob::run (this=0x3de9440) at /opt/kdev/kde4/quanta/languages/css/parsejob.cpp:126
#19 0x00007f75ea21c1c1 in ?? () from /usr/lib/libthreadweaver.so.4
#20 0x00007f75ea21c4be in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /usr/lib/libthreadweaver.so.4
#21 0x00007f75ea21b4af in ?? () from /usr/lib/libthreadweaver.so.4
#22 0x00007f75ea21ba38 in ThreadWeaver::Thread::run() () from /usr/lib/libthreadweaver.so.4
#23 0x00007f75e75e627e in ?? () from /usr/lib/libQtCore.so.4
#24 0x00007f75e52ab971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#25 0x00007f75e5bf292d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#26 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f75ebdf6760 (LWP 5831)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f75e75e6e3b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007f75e75e5edc in QThread::wait(unsigned long) () from /usr/lib/libQtCore.so.4
#3  0x00007f75e76aaee0 in QFileSystemWatcher::~QFileSystemWatcher() () from /usr/lib/libQtCore.so.4
#4  0x00007f75e76ebd5f in QObjectPrivate::deleteChildren() () from /usr/lib/libQtCore.so.4
#5  0x00007f75e76f341b in QObject::~QObject() () from /usr/lib/libQtCore.so.4
#6  0x00007f75e33988f6 in ?? () from /usr/lib/libsolid.so.4
#7  0x00007f75e5b454f2 in __run_exit_handlers (status=1) at exit.c:78
#8  exit (status=1) at exit.c:100
#9  0x00007f75e685d678 in ?? () from /usr/lib/libQtGui.so.4
#10 0x00007f75e7ee7b88 in KApplication::xioErrhandler(_XDisplay*) () from /usr/lib/libkdeui.so.5
#11 0x00007f75e361486e in _XIOError () from /usr/lib/libX11.so.6
#12 0x00007f75e361c415 in ?? () from /usr/lib/libX11.so.6
#13 0x00007f75e361cd07 in _XEventsQueued () from /usr/lib/libX11.so.6
#14 0x00007f75e360547f in XEventsQueued () from /usr/lib/libX11.so.6
#15 0x00007f75e6898c0c in ?? () from /usr/lib/libQtGui.so.4
#16 0x00007f75e122d66a in g_main_context_check () from /lib/libglib-2.0.so.0
#17 0x00007f75e122e023 in ?? () from /lib/libglib-2.0.so.0
#18 0x00007f75e122e45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#19 0x00007f75e7706193 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#20 0x00007f75e6898a4e in ?? () from /usr/lib/libQtGui.so.4
#21 0x00007f75e76d8a02 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#22 0x00007f75e76d8dec in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#23 0x00007f75e76dcebb in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#24 0x000000000040556f in main (argc=1, argv=0x7fff66e40688) at /opt/kdev/kde4/quanta/src/main.cpp:252

Reported using DrKonqi
Comment 1 Christoph Feck 2011-04-24 18:02:35 UTC
Could you attach file /var/www/isrepo/mvc/trunk/www/public/js/ckeditor/skins/v2/templates.css that causes the crash?
Comment 2 jay 2011-04-24 19:39:46 UTC
Created attachment 59281 [details]
crashing css from bug

Even after I deleted this one, it crashed on another.
Thou I didn't try it on different easy css files.
Comment 3 jay 2011-04-26 09:01:25 UTC
I had a bit time to debug.

Problem are new lines '\r\n' (win).
even empty file with one new line \r\n crashes.

Change to '\n' helps.
Comment 4 Christoph Cullmann 2015-10-10 08:35:26 UTC
Dear users,

the Quanta application ceased to exist over 5 years ago. For some of the use cases of Quanta there are nowadays KDevPlatform plugins available (like PHP/Python/... language support plugins).

Therefore the old Quanta bugs will now be closed, the Quanta bugzilla product is already closed for new reports.

Greetings
Christoph