Bug 224342 - Kdevelop crash when importing cmake project
Summary: Kdevelop crash when importing cmake project
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: CMake (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-26 16:52 UTC by Valentyn Pavliuchenko
Modified: 2010-09-14 22:19 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Valentyn Pavliuchenko 2010-01-26 16:52:59 UTC
Application that crashed: kdevelop
Version of the application: 3.9.97 (using KDevPlatform 0.9.97)
KDE Version: 4.3.4 (KDE 4.3.4)
Qt Version: 4.6.0
Operating System: Linux 2.6.32-trunk-686 i686
Distribution: Debian GNU/Linux testing (squeeze)

What I was doing when the application crashed:
SVN Revision 1080599. I tried to load my cmake project and Kdevelop crashed when parsing it. Crashes repeat every time I triyng to load it.

I use Debian Squeeze/Sid with Kdevelop and kdevplatform built from source (both from same SVN revision). Qt 4.6.0

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

Thread 5 (Thread 0xb1449b70 (LWP 31300)):
#0  0xb78b0424 in __kernel_vsyscall ()
#1  0xb4c5d3d2 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:179
#2  0xb6301884 in __pthread_cond_timedwait (cond=0x9846558, mutex=0x9846540, abstime=0xb14492fc) at forward.c:152
#3  0xb6f5a5dc in QWaitConditionPrivate::wait (this=0x96a3374, mutex=0x96a3378, time=200000) at thread/qwaitcondition_unix.cpp:85
#4  QWaitCondition::wait (this=0x96a3374, mutex=0x96a3378, time=200000) at thread/qwaitcondition_unix.cpp:159
#5  0xb5293f15 in KDevelop::DUChainPrivate::CleanupThread::run (this=0x96a3368) at ../../language/duchain/duchain.cpp:286
#6  0xb6f5970e in QThreadPrivate::start (arg=0x96a3368) at thread/qthread_unix.cpp:244
#7  0xb4c59585 in start_thread (arg=0xb1449b70) at pthread_create.c:300
#8  0xb62f42be in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 4 (Thread 0xad9ffb70 (LWP 31314)):
#0  0xb78b0424 in __kernel_vsyscall ()
#1  0xb4c5d0a5 in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:122
#2  0xb630182d in __pthread_cond_wait (cond=0x9f2e9d0, mutex=0x9f2e9b8) at forward.c:139
#3  0xb6f5a602 in QWaitConditionPrivate::wait (this=0x9f2e900, mutex=0x9d6e3a8, time=4294967295) at thread/qwaitcondition_unix.cpp:87
#4  QWaitCondition::wait (this=0x9f2e900, mutex=0x9d6e3a8, time=4294967295) at thread/qwaitcondition_unix.cpp:159
#5  0xb46a6648 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x9f2e8e8, th=0x9e8dc78) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#6  0xb46a93ac in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0x9d17dd8, th=0x9e8dc78) at ../../../threadweaver/Weaver/WorkingHardState.cpp:80
#7  0xb46a523b in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0x9f2e8e8, th=0x9e8dc78) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#8  0xb46a94a2 in ThreadWeaver::WorkingHardState::applyForWork (this=0x9d17dd8, th=0x9e8dc78) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#9  0xb46a6bd3 in ThreadWeaver::WeaverImpl::applyForWork (this=0x9f2e8e8, th=0x9e8dc78, previous=0x9f2f240) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#10 0xb46a74be in ThreadWeaver::ThreadRunHelper::run (this=0xad9ff330, parent=0x9f2e8e8, th=0x9e8dc78) at ../../../threadweaver/Weaver/Thread.cpp:87
#11 0xb46a7afb in ThreadWeaver::Thread::run (this=0x9e8dc78) at ../../../threadweaver/Weaver/Thread.cpp:142
#12 0xb6f5970e in QThreadPrivate::start (arg=0x9e8dc78) at thread/qthread_unix.cpp:244
#13 0xb4c59585 in start_thread (arg=0xad9ffb70) at pthread_create.c:300
#14 0xb62f42be in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3 (Thread 0xae306b70 (LWP 31315)):
[KCrash Handler]
#6  QBasicAtomicInt::ref (this=0xae3060b4, other=...) at ../../include/QtCore/../../src/corelib/arch/qatomic_i386.h:120
#7  QString::operator= (this=0xae3060b4, other=...) at tools/qstring.cpp:1280
#8  0xad048301 in ?? () from /usr/lib/kde4/kdevcmakemanager.so
#9  0xb54542a9 in KDevelop::ImportProjectJobPrivate::import (this=0x9eea340, folder=0x9710c28) at ../../project/importprojectjob.cpp:53
#10 KDevelop::ImportProjectJobPrivate::import (this=0x9eea340, folder=0x9710c28) at ../../project/importprojectjob.cpp:57
#11 KDevelop::ImportProjectJobPrivate::import (this=0x9eea340, folder=0x9710c28) at ../../project/importprojectjob.cpp:57
#12 0xb5453bf4 in QtConcurrent::VoidStoredMemberFunctionPointerCall1<void, KDevelop::ImportProjectJobPrivate, KDevelop::ProjectFolderItem*, KDevelop::ProjectFolderItem*>::runFunctor (this=0x9fc33e0)
    at /usr/include/qt4/QtCore/qtconcurrentstoredfunctioncall.h:426
#13 0xb5453f1e in QtConcurrent::RunFunctionTask<void>::run (this=0x9fc33e0) at /usr/include/qt4/QtCore/qtconcurrentrunbase.h:120
#14 0xb6f4f1a1 in QThreadPoolThread::run (this=0x9fc3728) at concurrent/qthreadpool.cpp:106
#15 0xb6f5970e in QThreadPrivate::start (arg=0x9fc3728) at thread/qthread_unix.cpp:244
#16 0xb4c59585 in start_thread (arg=0xae306b70) at pthread_create.c:300
#17 0xb62f42be in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xab82eb70 (LWP 31391)):
#0  0xb78b0424 in __kernel_vsyscall ()
#1  0xb4c5d0a5 in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:122
#2  0xb630182d in __pthread_cond_wait (cond=0xb4a5d9ec, mutex=0xb4a5d9d4) at forward.c:139
#3  0xb4988377 in WTF::TCMalloc_PageHeap::scavengerThread (this=0xb4a58900) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2304
#4  0xb49883c1 in WTF::TCMalloc_PageHeap::runScavengerThread (context=0xb4a58900) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1438
#5  0xb4c59585 in start_thread (arg=0xab82eb70) at pthread_create.c:300
#6  0xb62f42be in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb4411700 (LWP 31299)):
#0  0xb78b0424 in __kernel_vsyscall ()
#1  0xb4c5d0a5 in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:122
#2  0xb630182d in __pthread_cond_wait (cond=0x9fc36e8, mutex=0x9fc36d0) at forward.c:139
#3  0xb6f5a602 in QWaitConditionPrivate::wait (this=0x9fc35ec, mutex=0x9fc35d8, time=4294967295) at thread/qwaitcondition_unix.cpp:87
#4  QWaitCondition::wait (this=0x9fc35ec, mutex=0x9fc35d8, time=4294967295) at thread/qwaitcondition_unix.cpp:159
#5  0xb6f4ef9a in QThreadPoolPrivate::waitForDone (this=0x9fc3588) at concurrent/qthreadpool.cpp:295
#6  0xb6f4f6a3 in ~QThreadPool (this=0x9e8c630, __in_chrg=<value optimized out>) at concurrent/qthreadpool.cpp:428
#7  0xb6f4fcea in ~QGlobalStaticDeleter (this=0xb7173100, __in_chrg=<value optimized out>) at ../../include/QtCore/../../src/corelib/global/qglobal.h:1801
#8  0xb6254481 in __run_exit_handlers (status=1, listp=0xb6368324, run_list_atexit=true) at exit.c:78
#9  0xb62544df in *__GI_exit (status=1) at exit.c:100
#10 0xb663664b in qt_xio_errhandler () at kernel/qapplication_x11.cpp:734
#11 0xb7343fda in KApplication::xioErrhandler (this=0xbf914108, dpy=0x96a8670) at ../../kdeui/kernel/kapplication.cpp:408
#12 0xb7344016 in kde_xio_errhandler (dpy=0x96a8670) at ../../kdeui/kernel/kapplication.cpp:125
#13 0xb4d0bee6 in _XIOError () from /usr/lib/libX11.so.6
#14 0xb4d131ea in ?? () from /usr/lib/libX11.so.6
#15 0xb4d13b26 in _XEventsQueued () from /usr/lib/libX11.so.6
#16 0xb4cfc65f in XEventsQueued () from /usr/lib/libX11.so.6
#17 0xb6672b6d in x11EventSourceCheck (s=0x9698768) at kernel/qguieventdispatcher_glib.cpp:87
#18 0xb4bc7971 in g_main_context_check () from /lib/libglib-2.0.so.0
#19 0xb4bc811c in ?? () from /lib/libglib-2.0.so.0
#20 0xb4bc8503 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#21 0xb70884e1 in QEventDispatcherGlib::processEvents (this=0x964f9e8, flags=...) at kernel/qeventdispatcher_glib.cpp:407
#22 0xb66729a5 in QGuiEventDispatcherGlib::processEvents (this=0x964f9e8, flags=...) at kernel/qguieventdispatcher_glib.cpp:202
#23 0xb705aa3a in QEventLoop::processEvents (this=0xbf914040, flags=...) at kernel/qeventloop.cpp:149
#24 0xb705ae82 in QEventLoop::exec (this=0xbf914040, flags=...) at kernel/qeventloop.cpp:201
#25 0xb705d599 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#26 0xb65b6bf7 in QApplication::exec () at kernel/qapplication.cpp:3570
#27 0x0804d94b in _start ()

Reported using DrKonqi
Comment 1 Andreas Pakulat 2010-01-26 17:46:31 UTC
You're mixing self-built kdevelop with one installed from packages. Thats not going to work, remove the packages completely or the self-built version.
Comment 2 Valentyn Pavliuchenko 2010-01-27 09:23:12 UTC
Well, I'm building Kdevelop Debian PACKAGES from trunk. I don't just type 'make install', I create and install packages. And they correctly replace Debian older kdevelop packages. 

My packages are based on Debian kdevelop 4:3.9.97-1 and kdevplatform 0.9.97-1 packaging with appropriate changes for compiling trunk. So no mixing here.
Comment 3 Andreas Pakulat 2010-01-27 09:51:08 UTC
Then please compile kdevelop with debug symbols (kdevcmakemanager doesn't have any) and produce a new backtrace.
Comment 4 Valentyn Pavliuchenko 2010-01-27 09:59:59 UTC
Ok, I'll try. Btw, I've just reproduced this crash with Debian's 4:3.9.97-1/0.9.97-1 and Qt 4.5.3. It proves that the problem is not because of self-built packages.
Comment 5 Valentyn Pavliuchenko 2010-01-27 10:47:47 UTC
New backtrace:

Application: KDevelop (kdevelop), signal: Segmentation fault
[Current thread is 1 (Thread 0xb4345700 (LWP 30322))]

Thread 6 (Thread 0xb137db70 (LWP 30323)):
#0  0xb77e4424 in __kernel_vsyscall ()
#1  0xb4b913d2 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:179
#2  0xb6235884 in __pthread_cond_timedwait (cond=0x868b7b0, mutex=0x868b798, abstime=0xb137d2fc) at forward.c:152
#3  0xb6e8e5dc in QWaitConditionPrivate::wait (this=0x86a664c, mutex=0x86a6650, time=200000) at thread/qwaitcondition_unix.cpp:85
#4  QWaitCondition::wait (this=0x86a664c, mutex=0x86a6650, time=200000) at thread/qwaitcondition_unix.cpp:159
#5  0xb51c7f15 in KDevelop::DUChainPrivate::CleanupThread::run (this=0x86a6640) at ../../language/duchain/duchain.cpp:286
#6  0xb6e8d70e in QThreadPrivate::start (arg=0x86a6640) at thread/qthread_unix.cpp:244
#7  0xb4b8d585 in start_thread (arg=0xb137db70) at pthread_create.c:300
#8  0xb62282be in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 5 (Thread 0xaea3bb70 (LWP 30324)):
#0  0xb77e4424 in __kernel_vsyscall ()
#1  0xb62215b1 in select () from /lib/i686/cmov/libc.so.6
#2  0xb6f6b861 in QProcessManager::run (this=0xb70a7390) at io/qprocess_unix.cpp:245
#3  0xb6e8d70e in QThreadPrivate::start (arg=0xb70a7390) at thread/qthread_unix.cpp:244
#4  0xb4b8d585 in start_thread (arg=0xaea3bb70) at pthread_create.c:300
#5  0xb62282be in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 4 (Thread 0xada39b70 (LWP 30357)):
#0  0xb77e4424 in __kernel_vsyscall ()
#1  0xb4b910a5 in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:122
#2  0xb623582d in __pthread_cond_wait (cond=0x8ea9580, mutex=0x8ea9568) at forward.c:139
#3  0xb6e8e602 in QWaitConditionPrivate::wait (this=0x8ea9488, mutex=0x870ec70, time=4294967295) at thread/qwaitcondition_unix.cpp:87
#4  QWaitCondition::wait (this=0x8ea9488, mutex=0x870ec70, time=4294967295) at thread/qwaitcondition_unix.cpp:159
#5  0xb45da648 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x8ea9470, th=0x84b37c8) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#6  0xb45dd3ac in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0x8ba2bf8, th=0x84b37c8) at ../../../threadweaver/Weaver/WorkingHardState.cpp:80
#7  0xb45d923b in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0x8ea9470, th=0x84b37c8) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#8  0xb45dd4a2 in ThreadWeaver::WorkingHardState::applyForWork (this=0x8ba2bf8, th=0x84b37c8) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#9  0xb45dabd3 in ThreadWeaver::WeaverImpl::applyForWork (this=0x8ea9470, th=0x84b37c8, previous=0x8e22188) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#10 0xb45db4be in ThreadWeaver::ThreadRunHelper::run (this=0xada39330, parent=0x8ea9470, th=0x84b37c8) at ../../../threadweaver/Weaver/Thread.cpp:87
#11 0xb45dbafb in ThreadWeaver::Thread::run (this=0x84b37c8) at ../../../threadweaver/Weaver/Thread.cpp:142
#12 0xb6e8d70e in QThreadPrivate::start (arg=0x84b37c8) at thread/qthread_unix.cpp:244
#13 0xb4b8d585 in start_thread (arg=0xada39b70) at pthread_create.c:300
#14 0xb62282be in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3 (Thread 0xae23ab70 (LWP 30358)):
[KCrash Handler]
#6  QBasicAtomicInt::ref (this=0xae23a0b4, other=...) at ../../include/QtCore/../../src/corelib/arch/qatomic_i386.h:120
#7  QString::operator= (this=0xae23a0b4, other=...) at tools/qstring.cpp:1280
#8  0xac91a301 in CMakeManager::parse (this=0x8dffac8, item=0xace4c978) at ../../../projectmanagers/cmake/cmakemanager.cpp:516
#9  0xb53882a9 in KDevelop::ImportProjectJobPrivate::import (this=0x8bdf230, folder=0x8724f98) at ../../project/importprojectjob.cpp:53
#10 KDevelop::ImportProjectJobPrivate::import (this=0x8bdf230, folder=0x8724f98) at ../../project/importprojectjob.cpp:57
#11 KDevelop::ImportProjectJobPrivate::import (this=0x8bdf230, folder=0x8724f98) at ../../project/importprojectjob.cpp:57
#12 0xb5387bf4 in QtConcurrent::VoidStoredMemberFunctionPointerCall1<void, KDevelop::ImportProjectJobPrivate, KDevelop::ProjectFolderItem*, KDevelop::ProjectFolderItem*>::runFunctor (this=0x8edbab0)
    at /usr/include/qt4/QtCore/qtconcurrentstoredfunctioncall.h:426
#13 0xb5387f1e in QtConcurrent::RunFunctionTask<void>::run (this=0x8edbab0) at /usr/include/qt4/QtCore/qtconcurrentrunbase.h:120
#14 0xb6e831a1 in QThreadPoolThread::run (this=0x8bdf4b8) at concurrent/qthreadpool.cpp:106
#15 0xb6e8d70e in QThreadPrivate::start (arg=0x8bdf4b8) at thread/qthread_unix.cpp:244
#16 0xb4b8d585 in start_thread (arg=0xae23ab70) at pthread_create.c:300
#17 0xb62282be in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xab9ffb70 (LWP 30433)):
#0  0xb77e4424 in __kernel_vsyscall ()
#1  0xb4b910a5 in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:122
#2  0xb623582d in __pthread_cond_wait (cond=0xb49919ec, mutex=0xb49919d4) at forward.c:139
#3  0xb48bc377 in WTF::TCMalloc_PageHeap::scavengerThread (this=0xb498c900) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2304
#4  0xb48bc3c1 in WTF::TCMalloc_PageHeap::runScavengerThread (context=0xb498c900) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1438
#5  0xb4b8d585 in start_thread (arg=0xab9ffb70) at pthread_create.c:300
#6  0xb62282be in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb4345700 (LWP 30322)):
#0  0xb77e4424 in __kernel_vsyscall ()
#1  0xb4b910a5 in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:122
#2  0xb623582d in __pthread_cond_wait (cond=0x8edbdb8, mutex=0x8edbda0) at forward.c:139
#3  0xb6e8e602 in QWaitConditionPrivate::wait (this=0x8edbcbc, mutex=0x8edbca8, time=4294967295) at thread/qwaitcondition_unix.cpp:87
#4  QWaitCondition::wait (this=0x8edbcbc, mutex=0x8edbca8, time=4294967295) at thread/qwaitcondition_unix.cpp:159
#5  0xb6e82f9a in QThreadPoolPrivate::waitForDone (this=0x8edbc58) at concurrent/qthreadpool.cpp:295
#6  0xb6e836a3 in ~QThreadPool (this=0x8857578, __in_chrg=<value optimized out>) at concurrent/qthreadpool.cpp:428
#7  0xb6e83cea in ~QGlobalStaticDeleter (this=0xb70a7100, __in_chrg=<value optimized out>) at ../../include/QtCore/../../src/corelib/global/qglobal.h:1801
#8  0xb6188481 in __run_exit_handlers (status=1, listp=0xb629c324, run_list_atexit=true) at exit.c:78
#9  0xb61884df in *__GI_exit (status=1) at exit.c:100
#10 0xb656a64b in qt_xio_errhandler () at kernel/qapplication_x11.cpp:734
#11 0xb7277fda in KApplication::xioErrhandler (this=0xbf9fd478, dpy=0x8400cf0) at ../../kdeui/kernel/kapplication.cpp:408
#12 0xb7278016 in kde_xio_errhandler (dpy=0x8400cf0) at ../../kdeui/kernel/kapplication.cpp:125
#13 0xb4c3fee6 in _XIOError () from /usr/lib/libX11.so.6
#14 0xb4c471ea in ?? () from /usr/lib/libX11.so.6
#15 0xb4c47b26 in _XEventsQueued () from /usr/lib/libX11.so.6
#16 0xb4c3065f in XEventsQueued () from /usr/lib/libX11.so.6
#17 0xb65a6b6d in x11EventSourceCheck (s=0x83f0d40) at kernel/qguieventdispatcher_glib.cpp:87
#18 0xb4afb971 in g_main_context_check () from /lib/libglib-2.0.so.0
#19 0xb4afc11c in ?? () from /lib/libglib-2.0.so.0
#20 0xb4afc503 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#21 0xb6fbc4ff in QEventDispatcherGlib::processEvents (this=0x83a89e8, flags=...) at kernel/qeventdispatcher_glib.cpp:409
#22 0xb65a69a5 in QGuiEventDispatcherGlib::processEvents (this=0x83a89e8, flags=...) at kernel/qguieventdispatcher_glib.cpp:202
#23 0xb6f8ea3a in QEventLoop::processEvents (this=0xbf9fd3b0, flags=...) at kernel/qeventloop.cpp:149
#24 0xb6f8ee82 in QEventLoop::exec (this=0xbf9fd3b0, flags=...) at kernel/qeventloop.cpp:201
#25 0xb6f91599 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#26 0xb64eabf7 in QApplication::exec () at kernel/qapplication.cpp:3570
#27 0x0804d94b in main (argc=1, argv=0xbf9fd9a4) at ../../app/main.cpp:209
Comment 6 Andreas Pakulat 2010-01-27 10:53:22 UTC
Can you also attach the project? Or at least the cmake files from the project?
Comment 7 Valentyn Pavliuchenko 2010-01-27 11:50:21 UTC
Well, I've done some useful work - I've minimized my cmake project while still crashing kdevelop.

Here is CMakeLists.txt (it contains no sense now, but it crashes KDevelop):

add_library( ph EXCLUDE_FROM_ALL )
get_target_property( _target_output_name ph OUTPUT_NAME )
Comment 8 Andreas Pakulat 2010-01-27 14:14:00 UTC
Thanks a lot for that. I can reproduce this and also get a more meaningful backtrace (I'm not sure why yours shows QString and QBasicAtomicInt, but this one makes more sense):

#3  0xb6d26551 in qFatal (msg=0xb6e706d8 "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2241
#4  0xb6d26645 in qt_assert (assertion=0xb0c674a0 "!isEmpty()", file=0xb0c67480 "/usr/include/qt4/QtCore/qlist.h", line=252)
    at global/qglobal.cpp:1811
#5  0xb0c5aa2d in QList<QString>::first (this=0xa91fb95c) at /usr/include/qt4/QtCore/qlist.h:252
#6  0xb0c53c49 in CMakeManager::parse (this=0x8dddb98, item=0x9d7ba40)
    at /home/andreas/src/kdevelop/projectmanagers/cmake/cmakemanager.cpp:516
Comment 9 Valentyn Pavliuchenko 2010-01-27 14:35:11 UTC
I don't know the code and I'm not a master of cmake:) This patch solves the crash but is it correct? 

--- projectmanagers/cmake/cmakemanager.cpp      (revision 1080599)
+++ projectmanagers/cmake/cmakemanager.cpp      (working copy)
@@ -513,7 +513,11 @@
                 QStringList files=t.files;
                 QString outputName=t.name;
                 if(data.properties[TargetProperty].contains(t.name) && data.properties[TargetProperty][t.name].contains("OUTPUT_NAME"))
-                    outputName=data.properties[TargetProperty][t.name]["OUTPUT_NAME"].first();
+                {
+                    QStringList outputNameList=data.properties[TargetProperty][t.name]["OUTPUT_NAME"];
+                    if (!outputNameList.empty())
+                        outputName=outputNameList.first();
+                }

                 QString path;
                 switch(t.type)
Comment 10 Andreas Pakulat 2010-01-27 16:04:30 UTC
You can use that to avoid the crash for now, but the proper fix is to find out why the list is empty in the first place. It shouldn't be empty if get_target_properties was parsed correctly. But I don't know the code well enough to point a finger on anything specific.
Comment 11 Valentyn Pavliuchenko 2010-01-28 08:38:55 UTC
Yeah, maybe I'll try to trace it. This cmake project is short, so it shouldn't be so hard..
Comment 12 Aleix Pol 2010-08-11 01:24:09 UTC
Can you provide the cmake project source?

i would track it down then, otherwise I can't help.
Comment 13 Valentyn Pavliuchenko 2010-08-22 16:14:14 UTC
See comment #7. It has no sense, but it worked (can't verify right now on more recent versions)
Comment 14 Valentyn Pavliuchenko 2010-09-13 17:59:23 UTC
ping?
Comment 15 Aleix Pol 2010-09-14 22:19:26 UTC
commit 55afd8331edd6c8d1161e1d89ab23672f97225e4
Author: Aleix Pol <aleixpol@kde.org>
Date:   Tue Sep 14 01:57:45 2010 +0200

    Don't create an empty property when an empty one is read.
    
    BUG: 224342

diff --git a/projectmanagers/cmake/parser/cmakeprojectvisitor.cpp b/projectmanagers/cmake/parser/cmakeprojectvisitor.cpp
index aca7cfa..a02ea43 100644
--- a/projectmanagers/cmake/parser/cmakeprojectvisitor.cpp
+++ b/projectmanagers/cmake/parser/cmakeprojectvisitor.cpp
@@ -298,15 +298,20 @@ int CMakeProjectVisitor::visit( const SetDirectoryPropsAst * dirProps)
 int CMakeProjectVisitor::visit( const GetTargetPropAst * prop)
 {
     kDebug(9042) << "getting target " << prop->target() << " prop " << prop->property() << prop->variableName();
-    if(m_props[TargetProperty].contains(prop->target()) && !m_props[TargetProperty][prop->target()].contains(prop->property())) {
-        if(prop->property().startsWith("LOCATION_") && m_props[TargetProperty][prop->target()].contains("IMPORTED_"+prop->property()))
-            m_props[TargetProperty][prop->target()][prop->property()]=m_props[TargetProperty][prop->target()]["IMPORTED_"+prop->property()];
-            
-//         kDebug(9032) << "unexistent property" << prop->property() << "on" << prop->target();
+    QStringList value;
+    
+    if(m_props[TargetProperty].contains(prop->target())) {
+        QMap<QString, QStringList>& targetProps = m_props[TargetProperty][prop->target()];
+        if(!targetProps.contains(prop->property())) {
+            if(prop->property().startsWith("LOCATION_") && targetProps.contains("IMPORTED_"+prop->property()))
+                targetProps[prop->property()]=targetProps["IMPORTED_"+prop->property()];
+        }
+        value = targetProps.value(prop->property());
     }
-//     kDebug(9042) << "current properties" << m_props[TargetProperty][prop->target()].keys();
+    if(value.isEmpty())
+        value += QString(prop->variableName()+"-NOTFOUND");
     
-    m_vars->insert(prop->variableName(), m_props[TargetProperty][prop->target()][prop->property()]);
+    m_vars->insert(prop->variableName(), value);
 //     kDebug(9042) << "goooooot" << m_vars->value(prop->variableName());
     return 1;
 }