Bug 381277 - kdev_includepathsconverter crash
Summary: kdev_includepathsconverter crash
Status: CONFIRMED
Alias: None
Product: kdevelop
Classification: Applications
Component: All build tools (other bugs)
Version First Reported In: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords: junior-jobs, regression
Depends on:
Blocks:
 
Reported: 2017-06-16 13:03 UTC by Lukas Jirkovsky
Modified: 2017-08-24 15:16 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 Lukas Jirkovsky 2017-06-16 13:03:37 UTC
kdev_includepathsconverter crashes on use:

Starting program: /usr/bin/kdev_includepathsconverter -a foo/bar /home/stativ/development/qux/include
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x000000000041a4a5 in GccLikeCompiler::GccLikeCompiler (this=0x64cf90, name=..., path=..., editable=<optimized out>, factoryName=...) at /home/stativ/aurbuild/kdevelop-git/src/kdevelop/languages/plugins/custom-definesandincludes/compilerprovider/gcclikecompiler.cpp:221
221         connect(ICore::self()->runtimeController(), &IRuntimeController::currentRuntimeChanged, this, &GccLikeCompiler::invalidateCache);
(gdb) bt
#0  0x000000000041a4a5 in GccLikeCompiler::GccLikeCompiler (this=0x64cf90, name=..., path=..., editable=<optimized out>, factoryName=...)
    at /home/stativ/aurbuild/kdevelop-git/src/kdevelop/languages/plugins/custom-definesandincludes/compilerprovider/gcclikecompiler.cpp:221
#1  0x0000000000418e60 in ClangFactory::createCompiler (this=<optimized out>, name=..., path=..., editable=<optimized out>) at /home/stativ/aurbuild/kdevelop-git/src/kdevelop/languages/plugins/custom-definesandincludes/compilerprovider/compilerfactories.cpp:37
#2  0x000000000041933d in ClangFactory::registerDefaultCompilers (this=0x64bfe0, provider=0x62c960 <SettingsManager::globalInstance()::s_globalInstance>)
    at /home/stativ/aurbuild/kdevelop-git/src/kdevelop/languages/plugins/custom-definesandincludes/compilerprovider/compilerfactories.cpp:44
#3  0x0000000000416fbb in CompilerProvider::CompilerProvider (this=0x62c960 <SettingsManager::globalInstance()::s_globalInstance>, settings=<optimized out>, parent=<optimized out>)
    at /home/stativ/aurbuild/kdevelop-git/src/kdevelop/languages/plugins/custom-definesandincludes/compilerprovider/compilerprovider.cpp:115
#4  0x000000000040dbfd in SettingsManager::SettingsManager (this=0x62c960 <SettingsManager::globalInstance()::s_globalInstance>) at /home/stativ/aurbuild/kdevelop-git/src/kdevelop/languages/plugins/custom-definesandincludes/compilerprovider/settingsmanager.cpp:268
#5  SettingsManager::globalInstance () at /home/stativ/aurbuild/kdevelop-git/src/kdevelop/languages/plugins/custom-definesandincludes/compilerprovider/settingsmanager.cpp:277
#6  0x000000000040b8e6 in IncludePathsConverter::addIncludePaths (this=this@entry=0x7fffffffe348, includeDirectories=..., projectConfigFile=..., subdirectory=...)
    at /home/stativ/aurbuild/kdevelop-git/src/kdevelop/languages/plugins/custom-definesandincludes/includepathsconverter.cpp:80
#7  0x000000000040ae6f in main (argc=<optimized out>, argv=<optimized out>) at /home/stativ/aurbuild/kdevelop-git/src/kdevelop/languages/plugins/custom-definesandincludes/includepathsconverter.cpp:235
(gdb)
Comment 1 Lukas Jirkovsky 2017-06-16 13:06:14 UTC
It's kdevelop master, 1a113601271917e4d47f42a391a757e25437cfcd
Comment 2 Kevin Funk 2017-06-16 13:11:44 UTC
CC'ing Aleix, he last touched that code. 5.1 version does not crash.
Comment 3 Lukas Jirkovsky 2017-08-24 15:16:36 UTC
I did a quick check in debugger and the problem is in the ICore::self() returning null. Apparently, there's nobody creating an ICore instance in kdev_includepathsconverter.