Bug 261434 - Crash during parsing cmake project with SUBDIRS(non_existent_directory)
Summary: Crash during parsing cmake project with SUBDIRS(non_existent_directory)
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: CMake (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: VHI crash
Target Milestone: 4.2.0
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-28 09:53 UTC by Chaos A.D.
Modified: 2010-12-28 14:49 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chaos A.D. 2010-12-28 09:53:03 UTC
Application: kdevelop (4.2.60)
KDE Platform Version: 4.5.1 (KDE 4.5.1)
Qt Version: 4.7.0
Operating System: Linux 2.6.35-24-generic-pae i686
Distribution: Ubuntu 10.10

-- Information about the crash:
- What I was doing when the application crashed:
Opened cmake project with such content:

SUBDIRS(hui)

Where hui is not existent directory.

The crash can be reproduced every time.

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

Thread 6 (Thread 0xaee0db70 (LWP 6490)):
#0  0xb783c424 in __kernel_vsyscall ()
#1  0xb60df884 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:236
#2  0xb615194f in wait (this=0x9a0183c, mutex=0x9a01840, time=1000) at thread/qwaitcondition_unix.cpp:86
#3  QWaitCondition::wait (this=0x9a0183c, mutex=0x9a01840, time=1000) at thread/qwaitcondition_unix.cpp:160
#4  0xb4db15ad in KDevelop::DUChainPrivate::CleanupThread::run() () from /usr/local/lib/libkdevplatformlanguage.so.4
#5  0xb6150df9 in QThreadPrivate::start (arg=0x9a01830) at thread/qthread_unix.cpp:266
#6  0xb60dacc9 in start_thread (arg=0xaee0db70) at pthread_create.c:304
#7  0xb53f969e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 5 (Thread 0xad4c4b70 (LWP 6499)):
#0  0xb60de7a9 in __pthread_mutex_unlock_usercnt (mutex=0x9c0b81c, decr=1) at pthread_mutex_unlock.c:36
#1  0xb48dd428 in ?? () from /lib/libglib-2.0.so.0
#2  0xb48dd848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0xb628159f in QEventDispatcherGlib::processEvents (this=0x9c09448, flags=...) at kernel/qeventdispatcher_glib.cpp:417
#4  0xb6251609 in QEventLoop::processEvents (this=0xad4c4290, flags=) at kernel/qeventloop.cpp:149
#5  0xb6251a8a in QEventLoop::exec (this=0xad4c4290, flags=...) at kernel/qeventloop.cpp:201
#6  0xb614db7e in QThread::exec (this=0x9c093b0) at thread/qthread.cpp:490
#7  0xb623035b in QInotifyFileSystemWatcherEngine::run (this=0x9c093b0) at io/qfilesystemwatcher_inotify.cpp:248
#8  0xb6150df9 in QThreadPrivate::start (arg=0x9c093b0) at thread/qthread_unix.cpp:266
#9  0xb60dacc9 in start_thread (arg=0xad4c4b70) at pthread_create.c:304
#10 0xb53f969e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 4 (Thread 0xaac3ab70 (LWP 6515)):
#0  0xb783c424 in __kernel_vsyscall ()
#1  0xb60df4dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb42613a5 in ?? () from /usr/lib/libQtWebKit.so.4
#3  0xb4261481 in ?? () from /usr/lib/libQtWebKit.so.4
#4  0xb60dacc9 in start_thread (arg=0xaac3ab70) at pthread_create.c:304
#5  0xb53f969e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3 (Thread 0xa9d5bb70 (LWP 6549)):
#0  0xb783c424 in __kernel_vsyscall ()
#1  0xb60df4dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb61519c7 in wait (this=0xa40c9e0, mutex=0xa376fd0, time=4294967295) at thread/qwaitcondition_unix.cpp:88
#3  QWaitCondition::wait (this=0xa40c9e0, mutex=0xa376fd0, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#4  0xb7154030 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0xa40c9c8, th=0xa470730) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#5  0xb71577dc in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0xa45cf78, th=0xa470730) at ../../../threadweaver/Weaver/WorkingHardState.cpp:80
#6  0xb715355b in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0xa40c9c8, th=0xa470730) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#7  0xb71578d2 in ThreadWeaver::WorkingHardState::applyForWork (this=0xa45cf78, th=0xa470730) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#8  0xb7154533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xa40c9c8, th=0xa470730, previous=0xa48c7d0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#9  0xb715595e in ThreadWeaver::ThreadRunHelper::run (this=0xa9d5b2f4, parent=0xa40c9c8, th=0xa470730) at ../../../threadweaver/Weaver/Thread.cpp:87
#10 0xb715607b in ThreadWeaver::Thread::run (this=0xa470730) at ../../../threadweaver/Weaver/Thread.cpp:142
#11 0xb6150df9 in QThreadPrivate::start (arg=0xa470730) at thread/qthread_unix.cpp:266
#12 0xb60dacc9 in start_thread (arg=0xa9d5bb70) at pthread_create.c:304
#13 0xb53f969e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xa955ab70 (LWP 6550)):
[KCrash Handler]
#7  0xb5572506 in __dynamic_cast () from /usr/lib/libstdc++.so.6
#8  0xa9d7f5ca in CMakeManager::parse(KDevelop::ProjectFolderItem*) () from /usr/local/lib/kde4/kdevcmakemanager.so
#9  0xb4f69e95 in KDevelop::ImportProjectJobPrivate::import(KDevelop::ProjectFolderItem*) () from /usr/local/lib/libkdevplatformproject.so.4
#10 0xb4f69904 in QtConcurrent::VoidStoredMemberFunctionPointerCall1<void, KDevelop::ImportProjectJobPrivate, KDevelop::ProjectFolderItem*, KDevelop::ProjectFolderItem*>::runFunctor() () from /usr/local/lib/libkdevplatformproject.so.4
#11 0xb4f69a5e in QtConcurrent::RunFunctionTask<void>::run() () from /usr/local/lib/libkdevplatformproject.so.4
#12 0xb6145523 in QThreadPoolThread::run (this=0xa36c4e0) at concurrent/qthreadpool.cpp:106
#13 0xb6150df9 in QThreadPrivate::start (arg=0xa36c4e0) at thread/qthread_unix.cpp:266
#14 0xb60dacc9 in start_thread (arg=0xa955ab70) at pthread_create.c:304
#15 0xb53f969e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb2f70710 (LWP 6489)):
#0  0xb783c424 in __kernel_vsyscall ()
#1  0xb53eadf6 in __poll (fds=0xb5481ff4, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0xb3417d70 in ?? () from /usr/lib/libxcb.so.1
#3  0xb3419c02 in xcb_wait_for_reply () from /usr/lib/libxcb.so.1
#4  0xb4acac38 in _XReply () from /usr/lib/libX11.so.6
#5  0xb4ac8151 in XTranslateCoordinates () from /usr/lib/libX11.so.6
#6  0xb57e65c6 in QWidget::mapFromGlobal (this=0x9c2ee80, pos=...) at kernel/qwidget_x11.cpp:1327
#7  0xb57e661c in QWidget::mapFromGlobal (this=0x9dd8ce8, pos=...) at kernel/qwidget_x11.cpp:1320
#8  0xb57e661c in QWidget::mapFromGlobal (this=0x9e749f8, pos=...) at kernel/qwidget_x11.cpp:1320
#9  0xb57e661c in QWidget::mapFromGlobal (this=0x9e749d8, pos=...) at kernel/qwidget_x11.cpp:1320
#10 0xb57e661c in QWidget::mapFromGlobal (this=0x9e750c0, pos=...) at kernel/qwidget_x11.cpp:1320
#11 0xb573bb75 in QApplicationPrivate::pickMouseReceiver (candidate=0x9c2ee80, globalPos=..., pos=..., type=QEvent::MouseMove, buttons=..., buttonDown=0x0, alienWidget=0x9e750c0) at kernel/qapplication.cpp:2985
#12 0xb57cbc52 in QETWidget::translateMouseEvent (this=0x9c2ee80, event=0xbfd380fc) at kernel/qapplication_x11.cpp:4393
#13 0xb57cb151 in QApplication::x11ProcessEvent (this=0xbfd38658, event=0xbfd380fc) at kernel/qapplication_x11.cpp:3414
#14 0xb57fa36a in x11EventSourceDispatch (s=0x96004a8, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#15 0xb48d9855 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#16 0xb48dd668 in ?? () from /lib/libglib-2.0.so.0
#17 0xb48dd848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#18 0xb6281565 in QEventDispatcherGlib::processEvents (this=0x95e09e0, flags=...) at kernel/qeventdispatcher_glib.cpp:415
#19 0xb57f9be5 in QGuiEventDispatcherGlib::processEvents (this=0x95e09e0, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#20 0xb6251609 in QEventLoop::processEvents (this=0xbfd383f4, flags=) at kernel/qeventloop.cpp:149
#21 0xb6251a8a in QEventLoop::exec (this=0xbfd383f4, flags=...) at kernel/qeventloop.cpp:201
#22 0xb625600f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#23 0xb5736e07 in QApplication::exec () at kernel/qapplication.cpp:3672
#24 0x08053285 in main ()

Possible duplicates by query: bug 257095, bug 252016, bug 249625, bug 247555, bug 247378.

Reported using DrKonqi
Comment 1 Milian Wolff 2010-12-28 14:12:27 UTC
confirmed, Aleix can you fix this?
Comment 2 Aleix Pol 2010-12-28 14:49:13 UTC
commit d9a5cfc40e6a8952ddb377bcc53072c1da6a71bd
branch 4.2
Author: Aleix Pol <aleixpol@kde.org>
Date:   Tue Dec 28 14:45:59 2010 +0100

    Don't add to the tree unexisting directories.
    
    BUG: 261434

diff --git a/projectmanagers/cmake/cmakemanager.cpp b/projectmanagers/cmake/cmakemanager.cpp
index 099781a..bfb8b7f 100644
--- a/projectmanagers/cmake/cmakemanager.cpp
+++ b/projectmanagers/cmake/cmakemanager.cpp
@@ -422,6 +422,7 @@ QList<KDevelop::ProjectFolderItem*> CMakeManager::parse( KDevelop::ProjectFolder
             }
             path.adjustPath(KUrl::AddTrailingSlash);
             
+            if(QDir(path.toLocalFile()).exists())
             {
                 alreadyAdded.append(subf.name);
                 CMakeFolderItem* parent=folder;