Summary: | Kdevelop crashes when importing cmake project | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Andries Radu <admiral0> |
Component: | general | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | aleixpol, alinm.elena, david.nolden.kde, shafff, sputnick |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Andries Radu
2008-11-28 22:18:26 UTC
This backtrace looks similar to the one posted in bug 167283 comment 11 Could you tell me what is this project from? I can't reproduce it... It can be reproduced only when it's compiled as RELEASE. In DEBUGFULL it works. I have tried several projects. All of them based on cmake. Yes, looks to be the same issue as bug 167283 indeed. Also only happens in release mode and for most if not all projects I've tried so far. I've done A RelWithDebugInfo build, and there it doesn't crash. I have a single-core machine btw. Some informations would be useful: - Did you have a CMakeLists.txt open in the editor? Probably not - Please add the following debug-output to the beginning of DocumentRangeObject::syncFromSmart: kDebug() << "dd_ptr:" << dd_ptr; kDebug() << dd_ptr->m_smartMutex << dd_ptr->m_smartRange; And then send what was printed right before the crash. qWarning() << "dd_ptr11:" << this; prints 0 Where exactly did you add that line? So "DocumentRangeObject* this" is zero? in the beginning of DocumentRangeObject::range Ok then. can you add "Q_ASSERT(this);" at documentrangeobject.cpp:173, "Q_ASSERT(newDeclaration);" at ducontext.cpp:333, "Q_ASSERT(this); this->range();" at declaration.cpp:359, and see what happens? the problem is, Q_ASSERTs don't work in release mode. so i used qwarnings. look for 'Q_ASSERT(child);' in ducontext.cpp: child is 0 Ok, I've just added committed some kFatals() to svn to find the root if this problem. Can you update, re-try, and tell me whether you hit any of them? kdevelop(31639)/kdevplatform (language): Could not re-retrieve declaration Ok, can you update once again, and also send the warnings given out before the error? (this include warnings added by me - they include nema of function they reside in) DocumentRangeObject::range 0x82e9b78 Declaration::setContext 0x856c008 DocumentRangeObject::range 0x856c008 kdevelop(1023)/kdevplatform (language): Could not re-retrieve declaration index: 1 KCrash: Application 'kdevelop' crashing... Argh, sorry actually the check was broken. Please update to rev. 895438 and check again. wow! it works now! i'm enjoing ctrl-code-browsing now ))) i hope to meet you in Mykolayiv ) Ah ok. Yeah I will be there in Ukraine, you too? The problem is only workarounded now, by giving a warning instead of crashing. Actually I would expect it to crash at a later point with this problem. You should check the console whether it's full of "child-declaration number _nr_ of _count_ is invalid" during the cmake project parsing. yes, it actually crashed a bit later kdevelop(7194)/kdevplatform (language) KDevelop::DUContextDynamicData::addDeclaration: child declaration number 18 of 19 is invalid ...and so on till... kdevelop(7194)/kdevplatform (language) KDevelop::DUContextDynamicData::addDeclaration: child declaration number 0 of 19 is invalid so i guess the reason of non-validity should be investigated now last lines of backtrace: #5 0xb6170d98 in QVector<KDevelop::TopDUContextDynamicData::ItemDataInfo>::realloc () from /home/kde-devel/kde/lib/libkdevplatformlanguage.so.1 #6 0xb617119f in QVector<KDevelop::TopDUContextDynamicData::ItemDataInfo>::resize () from /home/kde-devel/kde/lib/libkdevplatformlanguage.so.1 #7 0xb616d242 in KDevelop::TopDUContextDynamicData::loadData () from /home/kde-devel/kde/lib/libkdevplatformlanguage.so.1 #8 0xb616efe0 in KDevelop::TopDUContextDynamicData::getDeclarationForIndex () from /home/kde-devel/kde/lib/libkdevplatformlanguage.so.1 #9 0xb6174251 in KDevelop::IndexedDeclaration::declaration () from /home/kde-devel/kde/lib/libkdevplatformlanguage.so.1 #10 0xb6166773 in KDevelop::TopDUContext::DeclarationChecker::operator() () from /home/kde-devel/kde/lib/libkdevplatformlanguage.so.1 #11 0xb6166afc in KDevelop::TopDUContext::FindDeclarationsAcceptor::operator() () from /home/kde-devel/kde/lib/libkdevplatformlanguage.so.1 #12 0xb6168fe1 in KDevelop::TopDUContext::applyAliases<KDevelop::TopDUContext::FindDeclarationsAcceptor> () from /home/kde-devel/kde/lib/libkdevplatformlanguage.so.1 #13 0xb615ffb1 in KDevelop::TopDUContext::findDeclarationsInternal () from /home/kde-devel/kde/lib/libkdevplatformlanguage.so.1 *** Bug 177443 has been marked as a duplicate of this bug. *** |