Bug 341283 - Crash when loading project
Summary: Crash when loading project
Status: RESOLVED FIXED
Alias: None
Product: kdev-python
Classification: Developer tools
Component: general (show other bugs)
Version: frameworks
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Sven Brauch
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-26 09:23 UTC by Radek Novacek
Modified: 2014-11-28 08:30 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 Radek Novacek 2014-11-26 09:23:31 UTC
KDevelop crashes when I try to load project that is mainly written in python. Please note that I'm using frameworks branch of kdev-python together with master of both kdevplatform and kdevelop.

Backtrace:
#0  0x00007fffebde85f2 in KDevelop::DUContext::findDeclarations(KDevelop::QualifiedIdentifier const&, KDevelop::CursorInRevision const&, KDevelop::TypePtr<KDevelop::AbstractType> const&, KDevelop::TopDUContext const*, QFlags<KDevelop::DUContext::SearchFlag>) const (this=0x0, identifier=..., position=..., dataType=..., topContext=topContext@entry=0x0, flags=...) at ../../language/duchain/ducontext.cpp:775
#1  0x00007fffad12fe4f in Python::ExpressionVisitor::<lambda(const Ptr&)>::operator()(const KDevelop::AbstractType::Ptr &) const (__closure=__closure@entry=0x7fffaea2aef0, p=...) at ../../duchain/expressionvisitor.cpp:675
#2  0x00007fffad1300d0 in Python::ExpressionVisitor::fromBinaryOperator(KDevelop::TypePtr<KDevelop::AbstractType>, KDevelop::TypePtr<KDevelop::AbstractType>, QString const&) (this=this@entry=0x7fffaea2b170, lhs=..., rhs=..., op=...) at ../../duchain/expressionvisitor.cpp:683
#3  0x00007fffad1303a0 in Python::ExpressionVisitor::visitBinaryOperation(Python::BinaryOperationAst*) (this=0x7fffaea2b170, node=0x7fffa0268690) at ../../duchain/expressionvisitor.cpp:703
#4  0x00007fffad157bba in Python::DeclarationBuilder::visitReturn(Python::ReturnAst*) (this=0x7fffa00dd570, node=0x7fffa0268650) at ../../duchain/declarationbuilder.cpp:1779
#5  0x00007fffad14e485 in Python::ContextBuilder::visitFunctionBody(Python::FunctionDefinitionAst*) (l=..., this=0x7fffa00dd570) at ../../duchain/contextbuilder.h:179
#6  0x00007fffad14e485 in Python::ContextBuilder::visitFunctionBody(Python::FunctionDefinitionAst*) (this=0x7fffa00dd570, node=<optimized out>) at ../../duchain/contextbuilder.cpp:476
#7  0x00007fffad16184c in Python::DeclarationBuilder::visitFunctionDefinition(Python::FunctionDefinitionAst*) (this=0x7fffa00dd570, node=0x7fffa0268240) at ../../duchain/declarationbuilder.cpp:1568
#8  0x00007fffad160f5b in Python::DeclarationBuilder::visitClassDefinition(Python::ClassDefinitionAst*) (this=0x7fffa00dd570, node=0x7fffa0248b40) at ../../duchain/declarationbuilder.cpp:1482
#9  0x00007fffad3a51fd in Python::AstDefaultVisitor::visitCode(Python::CodeAst*) (this=this@entry=0x7fffa00dd5c8, node=node@entry=0x7fffa00e8ef0) at ../../parser/astdefaultvisitor.cpp:77
#10 0x00007fffad1504e0 in Python::ContextBuilder::visitCode(Python::CodeAst*) (this=0x7fffa00dd570, node=0x7fffa00e8ef0) at ../../duchain/contextbuilder.cpp:321
#11 0x00007fffad168658 in KDevelop::AbstractTypeBuilder<Python::Ast, Python::Identifier, Python::ContextBuilder>::supportBuild(Python::Ast*, KDevelop::DUContext*) (context=0x7fffa00f1fb0, node=0x7fffa00e8ef0, this=0x7fffa00dd570) at /usr/include/kdevplatform/language/duchain/builders/abstractcontextbuilder.h:134
#12 0x00007fffad168658 in KDevelop::AbstractTypeBuilder<Python::Ast, Python::Identifier, Python::ContextBuilder>::supportBuild(Python::Ast*, KDevelop::DUContext*) (this=0x7fffa00dd570, node=0x7fffa00e8ef0, context=<optimized out>) at /usr/include/kdevplatform/language/duchain/builders/abstracttypebuilder.h:85
#13 0x00007fffad14f3ad in Python::ContextBuilder::build(KDevelop::IndexedString const&, Python::Ast*, KDevelop::ReferencedTopDUContext) (updateContext=..., node=0x7fffa00e8ef0, url=..., this=0x7fffa00dd570)
    at /usr/include/kdevplatform/language/duchain/builders/abstractcontextbuilder.h:114
#14 0x00007fffad14f3ad in Python::ContextBuilder::build(KDevelop::IndexedString const&, Python::Ast*, KDevelop::ReferencedTopDUContext) (this=this@entry=0x7fffa00dd570, url=..., node=node@entry=0x7fffa00e8ef0, updateContext=...) at ../../duchain/contextbuilder.cpp:76
#15 0x00007fffad159b33 in Python::DeclarationBuilder::build(KDevelop::IndexedString const&, Python::Ast*, KDevelop::ReferencedTopDUContext) (this=this@entry=0x7fffa00dd570, url=..., node=node@entry=0x7fffa00e8ef0, updateContext=...) at ../../duchain/declarationbuilder.cpp:109
#16 0x00007fffad159a67 in Python::DeclarationBuilder::build(KDevelop::IndexedString const&, Python::Ast*, KDevelop::ReferencedTopDUContext) (this=this@entry=0x7fffaea2bac0, url=..., node=0x7fffa00e8ef0, updateContext=...)
    at ../../duchain/declarationbuilder.cpp:102
#17 0x00007fffad816a58 in Python::ParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) (this=0x2291e20, self=..., thread=<optimized out>) at ../pythonparsejob.cpp:147
#18 0x00007fffee10e920 in ThreadWeaver::IdDecorator::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) () at /lib64/libKF5ThreadWeaver.so.5
#19 0x00007fffee10f060 in ThreadWeaver::Executor::run(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () at /lib64/libKF5ThreadWeaver.so.5
#20 0x00007fffee10df3a in ThreadWeaver::Job::execute(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () at /lib64/libKF5ThreadWeaver.so.5
#21 0x00007fffee10d6aa in ThreadWeaver::Thread::run() () at /lib64/libKF5ThreadWeaver.so.5
#22 0x00007fffef1bf93e in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#23 0x00007fffe74d852a in start_thread () at /lib64/libpthread.so.0
#24 0x00007fffee63877d in clone () at /lib64/libc.so.6


Last lines from kdevelop command output:
---- Parsing Succeeded ----
 ====> PARSING ====> parsing file   QUrl( "file:///usr/lib64/python3.4/genericpath.py" )  ; has priority -10007
 ====> AST     ====>     building abstract syntax tree for  "/usr/lib64/python3.4/genericpath.py"
 ====> DUCHAIN ====>     building duchain for "/usr/lib64/python3.4/string.py"
kdev.python.duchain: tuple type object is not available
kdev.python.duchain: tuple type object is not available
kdev.python.duchain: tuple type object is not available
kdev.python.duchain:  [ !!! ] did not get a typetrack container object when expecting one! Fix code / setup.
kdev.python.duchain: tuple type object is not available
 ====> DUCHAIN ====>     rebuilding duchain for "/usr/lib64/python3.4/string.py" (was built before)
kdev.python.duchain: tuple type object is not available
kdev.python.duchain: tuple type object is not available
kdev.python.duchain: tuple type object is not available
 ====> DUCHAIN ====>     building duchain for "/usr/lib64/python3.4/genericpath.py"
kdev.python.duchain:  [ !!! ] did not get a typetrack container object when expecting one! Fix code / setup.
kdev.python.duchain: tuple type object is not available
kdev.python.duchain:  [ !!! ] did not get a typetrack container object when expecting one! Fix code / setup.
kdev.python.duchain: tuple type object is not available
kdev.python.duchain: tuple type object is not available
 ====> DUCHAIN ====>     rebuilding duchain for "/usr/lib64/python3.4/genericpath.py" (was built before)
kdev.python.duchain:  [ !!! ] did not get a typetrack container object when expecting one! Fix code / setup.
kdev.python.duchain: tuple type object is not available
kdev.python.duchain: tuple type object is not available
Document needs update because of unresolved identifiers:  true
---- Parsing Succeeded ----
 ====> PARSING ====> parsing file   QUrl( "file:///usr/lib64/python3.4/collections/__init__.py" )  ; has priority -10008
 ====> AST     ====>     building abstract syntax tree for  "/usr/lib64/python3.4/collections/__init__.py"
Document needs update because of unresolved identifiers:  true
---- Parsing Succeeded ----
 ====> DUCHAIN ====>     building duchain for "/usr/lib64/python3.4/collections/__init__.py"
kdev.python.duchain:  [ !!! ] did not get a typetrack container object when expecting one! Fix code / setup.
kdev.python.duchain: tuple type object is not available
kdev.python.duchain: tuple type object is not available
kdev.python.duchain: tuple type object is not available
kdev.python.duchain: tuple type object is not available
kdev.python.duchain: tuple type object is not available
kdev.python.duchain:  [ !!! ] did not get a typetrack container object when expecting one! Fix code / setup.
kdev.python.duchain: tuple type object is not available
kdev.python.duchain: tuple type object is not available
kdev.python.duchain: tuple type object is not available

Program received signal SIGSEGV, Segmentation fault.

To me, it seems that the problem happens to be that Helper::getDocumentationFileContext() returns NULL pointer.

Reproducible: Always
Comment 1 Radek Novacek 2014-11-26 09:25:59 UTC
Removing ~/.cache/kdevduchain/kdevelop-{UUID} did not help.
Comment 2 Sven Brauch 2014-11-26 12:32:52 UTC
Sorry, the frameworks branch is not ready to be used yet. Such bugs are known and to be expected. If you can reproduce this in 1.7 as well, please let me know.
Comment 3 Radek Novacek 2014-11-28 08:30:21 UTC
Some of the recent commits in the frameworks branch fixed the issue.