Summary: | crash while importing gnuradio-3.6.5 | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | happy <hh.kde.crash> |
Component: | Build tools: CMake | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | aleixpol, hh.kde.crash |
Priority: | NOR | ||
Version: | 4.4.1 | ||
Target Milestone: | 4.3.0 | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdevelop/ca18aeb440e5f91513443c2013f7d5dcccf90f0a | Version Fixed In: | 5.0.2 |
Sentry Crash Report: | |||
Attachments: | New crash information added by DrKonqi |
Description
happy
2013-06-04 13:06:45 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
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! 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. 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 |