Bug 320715 - crash while importing gnuradio-3.6.5
Summary: crash while importing gnuradio-3.6.5
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: CMake (show other bugs)
Version: 4.4.1
Platform: Ubuntu Linux
: NOR crash
Target Milestone: 4.3.0
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-04 13:06 UTC by happy
Modified: 2016-11-17 09:34 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.0.2


Attachments
New crash information added by DrKonqi (18.65 KB, text/plain)
2013-06-07 11:38 UTC, happy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description happy 2013-06-04 13:06:45 UTC
Application: kdevelop (4.4.1)
KDE Platform Version: 4.10.3
Qt Version: 4.8.4
Operating System: Linux 3.8.0-24-generic x86_64
Distribution: Ubuntu 13.04

-- Information about the crash:
- What I was doing when the application crashed:
I tried to import the CMakeLists.txt from gnuradio-3.6.5
<http://gnuradio.org/releases/gnuradio/gnuradio-3.6.5.tar.gz>

tried several times, first time with existing 'build' directory, then without

may have something to do with hybrid c++ python project?

The crash can be reproduced every time.

-- Backtrace:
Application: KDevelop (kdevelop), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
[Current thread is 1 (Thread 0x7f5bfd7d77c0 (LWP 18516))]

Thread 10 (Thread 0x7f5be0cc3700 (LWP 18518)):
#0  0x00007f5bf9336075 in __GI___pthread_mutex_lock (mutex=0x7f5bdc000a60) at pthread_mutex_lock.c:95
#1  0x00007f5bf442e5c1 in g_mutex_lock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f5bf43ef190 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f5bf43ef304 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f5bfb3f0036 in QEventDispatcherGlib::processEvents (this=0x7f5bdc0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#5  0x00007f5bfb3c038f in QEventLoop::processEvents (this=this@entry=0x7f5be0cc2d90, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007f5bfb3c0618 in QEventLoop::exec (this=this@entry=0x7f5be0cc2d90, flags=...) at kernel/qeventloop.cpp:204
#7  0x00007f5bfb2c2410 in QThread::exec (this=this@entry=0x107b1c0) at thread/qthread.cpp:542
#8  0x00007f5bfb3a1edf in QInotifyFileSystemWatcherEngine::run (this=0x107b1c0) at io/qfilesystemwatcher_inotify.cpp:256
#9  0x00007f5bfb2c4bec in QThreadPrivate::start (arg=0x107b1c0) at thread/qthread_unix.cpp:338
#10 0x00007f5bf9333f8e in start_thread (arg=0x7f5be0cc3700) at pthread_create.c:311
#11 0x00007f5bf9fcae1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 9 (Thread 0x7f5bdb4da700 (LWP 18568)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00007f5bfb2c50a7 in wait (time=1000, this=0x24e1b80) at thread/qwaitcondition_unix.cpp:84
#2  QWaitCondition::wait (this=this@entry=0x24e0538, mutex=mutex@entry=0x24e0540, time=time@entry=1000) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f5bf742127b in KDevelop::DUChainPrivate::CleanupThread::run (this=0x24e0520) at ../../language/duchain/duchain.cpp:282
#4  0x00007f5bfb2c4bec in QThreadPrivate::start (arg=0x24e0520) at thread/qthread_unix.cpp:338
#5  0x00007f5bf9333f8e in start_thread (arg=0x7f5bdb4da700) at pthread_create.c:311
#6  0x00007f5bf9fcae1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 8 (Thread 0x7f5bc4f4f700 (LWP 18580)):
#0  0x00007f5bf442e359 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f5bf442e5b9 in g_mutex_lock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f5bf43ee34e in g_main_context_acquire () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f5bf43ef0b4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f5bf43ef304 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f5bfb3f0036 in QEventDispatcherGlib::processEvents (this=0x7f5bc00008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#6  0x00007f5bfb3c038f in QEventLoop::processEvents (this=this@entry=0x7f5bc4f4ed90, flags=...) at kernel/qeventloop.cpp:149
#7  0x00007f5bfb3c0618 in QEventLoop::exec (this=this@entry=0x7f5bc4f4ed90, flags=...) at kernel/qeventloop.cpp:204
#8  0x00007f5bfb2c2410 in QThread::exec (this=this@entry=0x3365b50) at thread/qthread.cpp:542
#9  0x00007f5bfb3a1edf in QInotifyFileSystemWatcherEngine::run (this=0x3365b50) at io/qfilesystemwatcher_inotify.cpp:256
#10 0x00007f5bfb2c4bec in QThreadPrivate::start (arg=0x3365b50) at thread/qthread_unix.cpp:338
#11 0x00007f5bf9333f8e in start_thread (arg=0x7f5bc4f4f700) at pthread_create.c:311
#12 0x00007f5bf9fcae1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 7 (Thread 0x7f5bbffff700 (LWP 18619)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f5bf67a2e77 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#2  0x00007f5bf67a2ea9 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#3  0x00007f5bf9333f8e in start_thread (arg=0x7f5bbffff700) at pthread_create.c:311
#4  0x00007f5bf9fcae1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 6 (Thread 0x7f5bbe99b700 (LWP 18636)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f5bf146e575 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#2  0x00007f5bf146e5c9 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#3  0x00007f5bf9333f8e in start_thread (arg=0x7f5bbe99b700) at pthread_create.c:311
#4  0x00007f5bf9fcae1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 5 (Thread 0x7f5bbf19c700 (LWP 18637)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f5bf11b49f9 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#2  0x00007f5bf149ccde in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#3  0x00007f5bf9333f8e in start_thread (arg=0x7f5bbf19c700) at pthread_create.c:311
#4  0x00007f5bf9fcae1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 4 (Thread 0x7f5bbd61f700 (LWP 18638)):
#0  0x00007f5bf9fbe3cd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f5bf43ef1dc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f5bf43ef304 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f5bfb3f0036 in QEventDispatcherGlib::processEvents (this=0x7f5bb8020250, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f5bfb3c038f in QEventLoop::processEvents (this=this@entry=0x7f5bbd61edc0, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f5bfb3c0618 in QEventLoop::exec (this=this@entry=0x7f5bbd61edc0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f5bfb2c2410 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:542
#7  0x00007f5bfb2c4bec in QThreadPrivate::start (arg=0x34e47f0) at thread/qthread_unix.cpp:338
#8  0x00007f5bf9333f8e in start_thread (arg=0x7f5bbd61f700) at pthread_create.c:311
#9  0x00007f5bf9fcae1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 3 (Thread 0x7f5bb7dcf700 (LWP 18857)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f5bfb2c514b in wait (time=18446744073709551615, this=0x4a8f020) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x4a4c648, mutex=0x49fabb0, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f5bf1f24041 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x4a4c620, th=0x48262d0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007f5bf1f2694b in ThreadWeaver::WorkingHardState::applyForWork (this=0x4b87f30, th=0x48262d0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007f5bf1f2563f in ThreadWeaver::ThreadRunHelper::run (this=this@entry=0x7f5bb7dcedc0, parent=0x4a4c620, th=th@entry=0x48262d0) at ../../../threadweaver/Weaver/Thread.cpp:87
#6  0x00007f5bf1f256cb in ThreadWeaver::Thread::run (this=0x48262d0) at ../../../threadweaver/Weaver/Thread.cpp:142
#7  0x00007f5bfb2c4bec in QThreadPrivate::start (arg=0x48262d0) at thread/qthread_unix.cpp:338
#8  0x00007f5bf9333f8e in start_thread (arg=0x7f5bb7dcf700) at pthread_create.c:311
#9  0x00007f5bf9fcae1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 2 (Thread 0x7f5bb75ce700 (LWP 18858)):
[KCrash Handler]
#6  ref (this=0x25) at /usr/include/qt4/QtCore/qatomic_x86_64.h:121
#7  QString (other=..., this=0x7f5bb75cd530) at /usr/include/qt4/QtCore/qstring.h:726
#8  CMakeParserUtils::includeScript (file=..., parent=..., data=data@entry=0x7f5b5c003958, sourcedir=..., env=...) at ../../../projectmanagers/cmake/parser/cmakeparserutils.cpp:159
#9  0x00007f5bb7decaa4 in CMakeManager::includeScript (this=this@entry=0x4820460, file=..., project=project@entry=0x4a28620, dir=..., parent=...) at ../../../projectmanagers/cmake/cmakemanager.cpp:669
#10 0x00007f5bb7dee4b1 in CMakeManager::parse (this=0x4820460, item=0x7f5b5c3a3ab0) at ../../../projectmanagers/cmake/cmakemanager.cpp:751
#11 0x00007f5bf7a09fd9 in import (folder=<optimized out>, this=0x4a4c820) at ../../project/importprojectjob.cpp:53
#12 import (folder=<optimized out>, this=0x4a4c820) at ../../project/importprojectjob.cpp:57
#13 KDevelop::ImportProjectJobPrivate::import (this=0x4a4c820, folder=<optimized out>) at ../../project/importprojectjob.cpp:57
#14 0x00007f5bf7a09c56 in run (this=0x4b841c0) at /usr/include/qt4/QtCore/qtconcurrentrunbase.h:134
#15 QtConcurrent::RunFunctionTask<void>::run (this=0x4b841c0) at /usr/include/qt4/QtCore/qtconcurrentrunbase.h:125
#16 0x00007f5bfb2b855d in QThreadPoolThread::run (this=0x4b7daa0) at concurrent/qthreadpool.cpp:107
#17 0x00007f5bfb2c4bec in QThreadPrivate::start (arg=0x4b7daa0) at thread/qthread_unix.cpp:338
#18 0x00007f5bf9333f8e in start_thread (arg=0x7f5bb75ce700) at pthread_create.c:311
#19 0x00007f5bf9fcae1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 1 (Thread 0x7f5bfd7d77c0 (LWP 18516)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f5bfb2c514b in wait (time=18446744073709551615, this=0x4bb4be0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x4b7dba0, mutex=0x4b7db78, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f5bfb2b7d2f in QThreadPoolPrivate::waitForDone (this=0x4b7daf0, msecs=msecs@entry=-1) at concurrent/qthreadpool.cpp:298
#4  0x00007f5bfb2b97dd in QThreadPool::~QThreadPool (this=0x482f1e0, __in_chrg=<optimized out>) at concurrent/qthreadpool.cpp:440
#5  0x00007f5bfb2b9819 in QThreadPool::~QThreadPool (this=0x482f1e0, __in_chrg=<optimized out>) at concurrent/qthreadpool.cpp:442
#6  0x00007f5bfb2b9845 in QGlobalStaticDeleter<QThreadPool>::~QGlobalStaticDeleter (this=0x7f5bfb71f008 <theInstance()::cleanup>, __in_chrg=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qglobal.h:1950
#7  0x00007f5bf9f0d121 in __run_exit_handlers (status=1, listp=0x7f5bfa2926a8 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true) at exit.c:77
#8  0x00007f5bf9f0d1a5 in __GI_exit (status=<optimized out>) at exit.c:99
#9  0x00007f5bfa7d1348 in qt_xio_errhandler () at kernel/qapplication_x11.cpp:782
#10 0x00007f5bfbbc2888 in KApplication::xioErrhandler (this=0x7fff0ca587f0, dpy=0xe54f10) at ../../kdeui/kernel/kapplication.cpp:419
#11 0x00007f5bf56806de in _XIOError () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#12 0x00007f5bf567e16d in _XEventsQueued () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#13 0x00007f5bf566f75b in XEventsQueued () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#14 0x00007f5bfa80cbdc in x11EventSourceCheck (s=0xe37b30) at kernel/qguieventdispatcher_glib.cpp:85
#15 0x00007f5bf43eec69 in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#16 0x00007f5bf43ef175 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#17 0x00007f5bf43ef304 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007f5bfb3f0016 in QEventDispatcherGlib::processEvents (this=0xe06ad0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#19 0x00007f5bfa80d1ae in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#20 0x00007f5bfb3c038f in QEventLoop::processEvents (this=this@entry=0x7fff0ca582b0, flags=...) at kernel/qeventloop.cpp:149
#21 0x00007f5bfb3c0618 in QEventLoop::exec (this=this@entry=0x7fff0ca582b0, flags=...) at kernel/qeventloop.cpp:204
#22 0x00007f5bfb3c5cf6 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218
#23 0x00007f5bfa765ffc in QApplication::exec () at kernel/qapplication.cpp:3828
#24 0x000000000040e71a in main (argc=<optimized out>, argv=<optimized out>) at ../../app/main.cpp:519

Possible duplicates by query: bug 320181, bug 319464, bug 309111, bug 308789, bug 302670.

Reported using DrKonqi
Comment 1 happy 2013-06-07 11:38:37 UTC
Created attachment 80374 [details]
New crash information added by DrKonqi

kdevelop (4.5.60) on KDE Platform 4.10.3 using Qt 4.8.4

most of the way through importing CMake project from gnuradio.

As far as I can tell, this bug is related to cmake handling of CMAKE_SOURCE_DIR; I realise that this variable can contain multiple values, but it can also contain zero it seems.

Example of problem parsing a CMakeLists.txt that does _NOT_ have a value for CMAKE_SOURCE_DIR in this code:

(kdevelop/projectmanagers/cmake/parser/cmakeparserutils.cpp)
    KDevelop::ReferencedTopDUContext includeScript(const QString& file, KDevelop::ReferencedTopDUContext parent,
                    CMakeProjectData* data, const QString& sourcedir, const QMap<QString,QString>& env)
    {
        kDebug(9042) << "Running cmake script: " << file;
        CMakeFileContent f = CMakeListsParser::readCMakeFile(file);
        data->vm.insert("CMAKE_CURRENT_LIST_FILE", QStringList(file));
        data->vm.insert("CMAKE_CURRENT_LIST_DIR", QStringList(QFileInfo(file).dir().absolutePath()));

        const QString projectSourceDir = data->vm.value("CMAKE_SOURCE_DIR").first();  <-- ** BOOM **

out:

kdevelop(19645)/kdevelop (cmake support debug) CMakeParserUtils::includeScript: Running cmake script:  "/xxx/gnuradio_current/gnuradio-3.6.5/docs/CMakeLists.txt"
ASSERT: "!isEmpty()" in file /usr/include/qt4/QtCore/qlist.h, line 282  <-- ** .first()

offending CMakeLists.txt

(gnuradio-3.6.5/docs/CMakeLists.txt)
---------
# Copyright 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING.  If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.

########################################################################
# Setup dependencies
########################################################################
find_package(Doxygen)
find_package(Sphinx)

########################################################################
# Register component
########################################################################
include(GrComponent)
GR_REGISTER_COMPONENT("doxygen" ENABLE_DOXYGEN DOXYGEN_FOUND)
GR_REGISTER_COMPONENT("sphinx"  ENABLE_SPHINX  SPHINX_FOUND)

########################################################################
# Begin conditional configuration
########################################################################
if(ENABLE_DOXYGEN)

########################################################################
# Setup CPack components
########################################################################
include(GrPackage)
CPACK_COMPONENT("docs"
    DISPLAY_NAME "Documentation"
    DESCRIPTION  "Doxygen generated documentation"
)

########################################################################
# Add subdirectories
########################################################################
add_subdirectory(doxygen)

endif(ENABLE_DOXYGEN)


########################################################################
# Begin conditional configuration
########################################################################
if(ENABLE_SPHINX)

########################################################################
# Setup CPack components
########################################################################
include(GrPackage)
CPACK_COMPONENT("docs"
    DISPLAY_NAME "Documentation"
    DESCRIPTION  "Sphinx generated documentation"
)

########################################################################
# Add subdirectories
########################################################################
add_subdirectory(sphinx)

endif(ENABLE_SPHINX)
---------

-- Backtrace (Reduced):
#6  0x00007fd3707b5037 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#7  0x00007fd3707b8698 in __GI_abort () at abort.c:90
[...]
#11 0x00007fd371b67b06 in qt_assert (assertion=assertion@entry=0x7fd34dc86d0e "!isEmpty()", file=file@entry=0x7fd34dc86708 "/usr/include/qt4/QtCore/qlist.h", line=line@entry=282) at global/qglobal.cpp:2021
#12 0x00007fd34dc4f359 in QList<QString>::first (this=this@entry=0x7fd2dfffdd70) at /usr/include/qt4/QtCore/qlist.h:282
#13 0x00007fd34dc78db4 in CMakeParserUtils::includeScript (file=..., parent=..., data=data@entry=0x7fd2d8002ee8, sourcedir=..., env=...) at /home/dean/wip/kde/kdevelop/projectmanagers/cmake/parser/cmakeparserutils.cpp:166
Comment 2 Aleix Pol 2013-06-11 23:25:17 UTC
Can you please give me a link to the project, so that I can try to reproduce?

I don't see why it can be that there's no CMAKE_SOURCE_DIR variable value.

Let's have this fixed!
Comment 3 happy 2013-06-12 08:26:50 UTC
Aleix, bit confused about status of the bug, but if you're still trying to confirm, there's a tar file of the project here:
<http://gnuradio.org/releases/gnuradio/gnuradio-3.6.5.tar.gz

A console build with CMake works fine, Qt Creator also seems fine.
Comment 4 Aleix Pol 2013-06-17 02:16:46 UTC
Git commit ca18aeb440e5f91513443c2013f7d5dcccf90f0a by Aleix Pol.
Committed on 17/06/2013 at 04:15.
Pushed by apol into branch 'master'.

take() variables when they go out of scope

Instead of remove() that would remove all uses of the variable, with
ugly cases.

This solves a problem in a project that was modifying CMAKE_SOURCE_DIR

M  +1    -1    projectmanagers/cmake/parser/variablemap.cpp

http://commits.kde.org/kdevelop/ca18aeb440e5f91513443c2013f7d5dcccf90f0a