Bug 291524 - Kdevelop crashes during parsing
Summary: Kdevelop crashes during parsing
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: CMake (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR crash
Target Milestone: 4.2.3
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-14 16:24 UTC by claas.koehler
Modified: 2012-01-20 16:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Valgrind log (32.16 KB, application/octet-stream)
2012-01-14 16:26 UTC, claas.koehler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description claas.koehler 2012-01-14 16:24:17 UTC
Application: kdevelop (4.3.60)
KDE Platform Version: 4.7.4 (4.7.4)
Qt Version: 4.7.4
Operating System: Linux 3.1.0-1.2-desktop x86_64
Distribution: "openSUSE 12.1 (x86_64)"

-- Information about the crash:
Kdevelop version: Trunk version pulled on Jan 14th, 2012, 15:00 UTC
kdev-platform version: Trunk version pulled on Jan 14th, 2012, 15:00 UTC
Compiler: gcc-4.6.2
Compiled version: RelWithDebInfo
Operating System: OpenSuse 12.1

The program crashes every time during parsing without any user interaction. The error could be reproduced every time in 7 consecutive program launches.
The crash occurs at line 250 in the attached valgrind log, near
==6973== Warning: set address range perms: large range [0x39446000, 0x79446000) (defined)
kdevelop(6973)/kdevelop (cmake support debug) CMakeProjectVisitor::visit: Parser couldn't parse condition of an IF in file: () "/users/koeh_cl/Software/pirates/src/CMakeLists.txt" 113

The crash can be reproduced every time.

-- Backtrace:
Application: KDevelop (kdevelop), signal: Segmentation fault
[Current thread is 1 (Thread 0x7fe7ce9cb760 (LWP 7167))]

Thread 7 (Thread 0x7fe7b6783700 (LWP 7168)):
#0  0x00007fe7ca83b1eb in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fe7caac742e in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007fe7c725906b in KDevelop::DUChainPrivate::CleanupThread::run (this=0x19a39f0) at /home/donau101/tools/kdevelop/trunk-src/platform/language/duchain/duchain.cpp:282
#3  0x00007fe7caac7025 in ?? () from /usr/lib64/libQtCore.so.4
#4  0x00007fe7ca836f05 in start_thread () from /lib64/libpthread.so.0
#5  0x00007fe7c8f0963d in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7fe79cf65700 (LWP 7193)):
#0  0x00007fe7c8f00523 in poll () from /lib64/libc.so.6
#1  0x00007fe7c3f51a98 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fe7c3f51f59 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fe7cabd8586 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#4  0x00007fe7cabaca32 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#5  0x00007fe7cabacc2f in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x00007fe7caac45df in QThread::exec() () from /usr/lib64/libQtCore.so.4
#7  0x00007fe7cab8faff in ?? () from /usr/lib64/libQtCore.so.4
#8  0x00007fe7caac7025 in ?? () from /usr/lib64/libQtCore.so.4
#9  0x00007fe7ca836f05 in start_thread () from /lib64/libpthread.so.0
#10 0x00007fe7c8f0963d in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7fe797be9700 (LWP 7208)):
#0  0x00007fe7ca83ae6c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fe7c23c49dc in ?? () from /usr/lib64/libQtWebKit.so.4
#2  0x00007fe7c23c4b09 in ?? () from /usr/lib64/libQtWebKit.so.4
#3  0x00007fe7ca836f05 in start_thread () from /lib64/libpthread.so.0
#4  0x00007fe7c8f0963d in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7fe7973e8700 (LWP 7209)):
#0  0x00007fe7c8f00523 in poll () from /lib64/libc.so.6
#1  0x00007fe7c3f51a98 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fe7c3f51f59 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fe7cabd8586 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#4  0x00007fe7cabaca32 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#5  0x00007fe7cabacc2f in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x00007fe7caac45df in QThread::exec() () from /usr/lib64/libQtCore.so.4
#7  0x00007fe7caac7025 in ?? () from /usr/lib64/libQtCore.so.4
#8  0x00007fe7ca836f05 in start_thread () from /lib64/libpthread.so.0
#9  0x00007fe7c8f0963d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7fe79615d700 (LWP 7216)):
[KCrash Handler]
#6  0x00007fe7cab08329 in QString::operator==(QString const&) const () from /usr/lib64/libQtCore.so.4
#7  0x00007fe7a5f5878b in QList<QString>::indexOf (this=0x7fe79615a330, t=..., from=<optimized out>) at /usr/include/QtCore/qlist.h:836
#8  0x00007fe7a5f4efe8 in CMakeProjectVisitor::visit (this=0x7fe79615c070, list=0x7fe7483906c0) at /home/donau101/tools/kdevelop/trunk-src/kdevelop/projectmanagers/cmake/parser/cmakeprojectvisitor.cpp:1642
#9  0x00007fe7a5f5070e in CMakeProjectVisitor::walk (this=0x7fe79615c070, fc=..., line=12, isClean=<optimized out>) at /home/donau101/tools/kdevelop/trunk-src/kdevelop/projectmanagers/cmake/parser/cmakeprojectvisitor.cpp:2213
#10 0x00007fe7a5f51ca2 in CMakeProjectVisitor::visit (this=0x7fe79615c070, fea=0x7fe748320490) at /home/donau101/tools/kdevelop/trunk-src/kdevelop/projectmanagers/cmake/parser/cmakeprojectvisitor.cpp:1743
#11 0x00007fe7a5f5070e in CMakeProjectVisitor::walk (this=0x7fe79615c070, fc=..., line=6, isClean=<optimized out>) at /home/donau101/tools/kdevelop/trunk-src/kdevelop/projectmanagers/cmake/parser/cmakeprojectvisitor.cpp:2213
#12 0x00007fe7a5f55505 in CMakeProjectVisitor::visit (this=0x7fe79615c070, pack=0x7fe7483467a0) at /home/donau101/tools/kdevelop/trunk-src/kdevelop/projectmanagers/cmake/parser/cmakeprojectvisitor.cpp:678
#13 0x00007fe7a5f56fba in CMakeProjectVisitor::visit (this=0x7fe79615c070, pack=<optimized out>) at /home/donau101/tools/kdevelop/trunk-src/kdevelop/projectmanagers/cmake/parser/cmakeprojectvisitor.cpp:594
#14 0x00007fe7a5f5070e in CMakeProjectVisitor::walk (this=0x7fe79615c070, fc=..., line=126, isClean=<optimized out>) at /home/donau101/tools/kdevelop/trunk-src/kdevelop/projectmanagers/cmake/parser/cmakeprojectvisitor.cpp:2213
#15 0x00007fe7a5f63a9e in CMakeParserUtils::includeScript (file=<optimized out>, parent=..., data=0x7fe748002618, sourcedir=..., env=...) at /home/donau101/tools/kdevelop/trunk-src/kdevelop/projectmanagers/cmake/parser/cmakeparserutils.cpp:175
#16 0x00007fe79c12a92b in CMakeManager::includeScript (this=0x2aeb8b0, file=..., project=0x27132c0, dir=..., parent=...) at /home/donau101/tools/kdevelop/trunk-src/kdevelop/projectmanagers/cmake/cmakemanager.cpp:646
#17 0x00007fe79c12cbe8 in CMakeManager::parse (this=0x2aeb8b0, item=0x2d18490) at /home/donau101/tools/kdevelop/trunk-src/kdevelop/projectmanagers/cmake/cmakemanager.cpp:701
#18 0x00007fe7c784bd99 in KDevelop::ImportProjectJobPrivate::import (this=0x2cddf10, folder=<optimized out>) at /home/donau101/tools/kdevelop/trunk-src/platform/project/importprojectjob.cpp:53
#19 0x00007fe7c784ba76 in run (this=0x2d45500) at /usr/include/QtCore/qtconcurrentrunbase.h:120
#20 QtConcurrent::RunFunctionTask<void>::run (this=0x2d45500) at /usr/include/QtCore/qtconcurrentrunbase.h:114
#21 0x00007fe7caabbe15 in ?? () from /usr/lib64/libQtCore.so.4
#22 0x00007fe7caac7025 in ?? () from /usr/lib64/libQtCore.so.4
#23 0x00007fe7ca836f05 in start_thread () from /lib64/libpthread.so.0
#24 0x00007fe7c8f0963d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fe79595c700 (LWP 7322)):
#0  0x00007fe7ca83ae6c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fe7c7e97852 in ?? () from /usr/lib64/libQtScript.so.4
#2  0x00007fe7c7e97889 in ?? () from /usr/lib64/libQtScript.so.4
#3  0x00007fe7ca836f05 in start_thread () from /lib64/libpthread.so.0
#4  0x00007fe7c8f0963d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fe7ce9cb760 (LWP 7167)):
#0  0x00007fe7ca83ae6c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fe7caac74bb in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007fe7caabb721 in ?? () from /usr/lib64/libQtCore.so.4
#3  0x00007fe7caabcbef in QThreadPool::~QThreadPool() () from /usr/lib64/libQtCore.so.4
#4  0x00007fe7caabcc29 in QThreadPool::~QThreadPool() () from /usr/lib64/libQtCore.so.4
#5  0x00007fe7caabcc55 in ?? () from /usr/lib64/libQtCore.so.4
#6  0x00007fe7c8e679a1 in __run_exit_handlers () from /lib64/libc.so.6
#7  0x00007fe7c8e67a25 in exit () from /lib64/libc.so.6
#8  0x00007fe7c9dcbd78 in ?? () from /usr/lib64/libQtGui.so.4
#9  0x00007fe7cb399468 in KApplication::xioErrhandler(_XDisplay*) () from /usr/lib64/libkdeui.so.5
#10 0x00007fe7c6c9d51e in _XIOError () from /usr/lib64/libX11.so.6
#11 0x00007fe7c6c9ae2d in _XEventsQueued () from /usr/lib64/libX11.so.6
#12 0x00007fe7c6c8b81f in XEventsQueued () from /usr/lib64/libX11.so.6
#13 0x00007fe7c9e02dcc in ?? () from /usr/lib64/libQtGui.so.4
#14 0x00007fe7c3f51264 in g_main_context_check () from /usr/lib64/libglib-2.0.so.0
#15 0x00007fe7c3f51ab2 in ?? () from /usr/lib64/libglib-2.0.so.0
#16 0x00007fe7c3f51f59 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#17 0x00007fe7cabd851f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#18 0x00007fe7c9e02f9e in ?? () from /usr/lib64/libQtGui.so.4
#19 0x00007fe7cabaca32 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#20 0x00007fe7cabacc2f in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#21 0x00007fe7cabb0df7 in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#22 0x000000000040a8a9 in main (argc=<optimized out>, argv=<optimized out>) at /home/donau101/tools/kdevelop/trunk-src/kdevelop/app/main.cpp:479

Possible duplicates by query: bug 289522.

Reported using DrKonqi
Comment 1 claas.koehler 2012-01-14 16:26:51 UTC
Created attachment 67827 [details]
Valgrind log
Comment 2 Aleix Pol 2012-01-18 01:19:54 UTC
Can you provide an example of the code that triggers this crash?
Comment 3 claas.koehler 2012-01-19 15:31:51 UTC
(In reply to comment #2)
> Can you provide an example of the code that triggers this crash?

Unfortunately the project causing the problem is proprietary. Sorry.

Claas
Comment 4 Aleix Pol 2012-01-19 15:41:52 UTC
Well, it's possible that's already solved, or not.

If you can make another script to reproduce the problem, that would be helpful. Until then, I'm closing as invalid.
Comment 5 claas.koehler 2012-01-20 15:16:14 UTC
I just pulled the latest trunk, and the problem still persists. I could not manage to create a simple test case, which shows similar behaviour.

Thus the problem is definitely not fixed and I suggest changing the status back to unconfirmed.

If I can assist you in debugging by providing more output or if you could point me in a direction, I could attempt to do further debugging myself, although I have to admit that I am not familiar with the kdevelop sources.

Regards
Claas
Comment 6 Aleix Pol 2012-01-20 15:19:08 UTC
As I said, please provide a problematic example that I can reproduce.

With closed project, people usually provide the cmake sources without the C++, but of course the smaller it is, the better.
Comment 7 Milian Wolff 2012-01-20 16:46:10 UTC
aleix, it's pretty easy to see that this might be an issue though just by looking at the sources: you do: list->elements().first(). What if elements() is empty? It asserts!

I think from that you should be able to construct a ListAst::Find unit test with empty elements, no?

bye