Summary: | KDevelop crashes during background parsing of a python project (kdevelop-python plugin related) | ||
---|---|---|---|
Product: | [Developer tools] kdev-python | Reporter: | Matěj Laitl <matej> |
Component: | general | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | mail, nalvarez |
Priority: | NOR | ||
Version: | 1.2.60 | ||
Target Milestone: | 1.2.3 | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Matěj Laitl
2011-09-03 15:00:33 UTC
Still occurs with: kdevplatfrom: git v1.2.3-768-gacabbf5 kdevelop: git v4.2.3-452-gba980fc kdev-python: git alpha3.1-2-g93c7b40 kdelibs: 4.7.1 I cannot reproduce this with current master (beta1-24-gb3246bb). Can you? (In reply to comment #2) > I cannot reproduce this with current master (beta1-24-gb3246bb). Can you? I confirm this does not crash anymore with today's master (kdevplatfrom, kdevelop, kdevelop-python), but it shows no semantic information in Python code at all. It seems that it doesn't load python plugin at all. (grep python /proc/`pidof kdevelop`/maps shows nothing - compared to grep php ...) However, kdevelop-python seems installed correctly: edgy /proc/14624 # equery files kdevelop-python | grep '\.so$\|\.desktop$' /usr/lib64/kde4/kdevpythonlanguagesupport.so /usr/lib64/libkdev4pythoncompletion.so /usr/lib64/libkdev4pythonduchain.so /usr/lib64/libkdev4pythonparser.so /usr/lib64/libpython2.7-kdevelop.so /usr/share/kde4/services/kdevpythonsupport.desktop It is installed in exact same locations as kdevelop-php, which works. Perpaps the problem is in the .desktop files? edgy /proc/14624 # grep 'X-' /usr/share/kde4/services/kdevpythonsupport.desktop /usr/share/kde4/services/kdevphpsupport.desktop /usr/share/kde4/services/kdevpythonsupport.desktop:X-KDE-Library=kdevpythonlanguagesupport /usr/share/kde4/services/kdevpythonsupport.desktop:X-KDevelop-Version=13 /usr/share/kde4/services/kdevpythonsupport.desktop:X-KDevelop-Language=Python /usr/share/kde4/services/kdevpythonsupport.desktop:X-KDevelop-Args=PYTHON /usr/share/kde4/services/kdevpythonsupport.desktop:X-KDevelop-Interfaces=ILanguageSupport /usr/share/kde4/services/kdevpythonsupport.desktop:X-KDevelop-SupportedMimeTypes=text/x-python /usr/share/kde4/services/kdevpythonsupport.desktop:X-KDE-PluginInfo-Name=kdevpythonsupport /usr/share/kde4/services/kdevpythonsupport.desktop:X-KDevelop-Mode=NoGUI /usr/share/kde4/services/kdevpythonsupport.desktop:X-KDE-PluginInfo-Category=Language Support /usr/share/kde4/services/kdevphpsupport.desktop:X-KDE-Library=kdevphplanguagesupport /usr/share/kde4/services/kdevphpsupport.desktop:X-KDevelop-Version=14 /usr/share/kde4/services/kdevphpsupport.desktop:X-KDevelop-Language=Php /usr/share/kde4/services/kdevphpsupport.desktop:X-KDevelop-Args=PHP /usr/share/kde4/services/kdevphpsupport.desktop:X-KDevelop-Interfaces=ILanguageSupport /usr/share/kde4/services/kdevphpsupport.desktop:X-KDevelop-SupportedMimeTypes=application/x-php /usr/share/kde4/services/kdevphpsupport.desktop:X-KDE-PluginInfo-Name=KDevPhpSupport /usr/share/kde4/services/kdevphpsupport.desktop:X-KDE-PluginInfo-Category=Language Support /usr/share/kde4/services/kdevphpsupport.desktop:X-KDevelop-Mode=NoGUI /usr/share/kde4/services/kdevphpsupport.desktop:X-KDevelop-LoadMode=AlwaysOn The current plugin master requires kdevplatform 1.3 beta, otherwise it won't load. (In reply to comment #4) > The current plugin master requires kdevplatform 1.3 beta, otherwise it won't > load. I do have kdevplatform v1.2.81-66-gccf92f2, interesting to see is that plugins from kdevplatfrom itself define X-KDevelop-Version=14: edgy ~ # grep KDevelop-Ver /usr/share/kde4/services/kdevgit.desktop X-KDevelop-Version=14 while kdevelop-python (git version 974f6698b7321a8e7) defines X-KDevelop-Version=13: edgy ~ # grep KDevelop-Ver /usr/share/kde4/services/kdevpythonsupport.desktop X-KDevelop-Version=13 To me it seems like kdevelop-python was not updated witch newest kdevplatform plugin version. You're running kdevplatform from git master (ccf92f2 is a master-only commit). git master currently has what will eventually be released as 1.4, but kdev-python is currently targeting kdevplatform 1.3. You need to *downgrade* your kdevplatform to 1.3 (use the 1.3 branch in git). At this early stage of development (not much has changed between 1.3 and 1.4 yet), you *could* also change kdevpythonsupport.desktop's X-KDevelop-Version to 14, but that's a bad idea in the general case. It will break as soon as kdevplatform 1.4 makes an incompatible change. (In reply to comment #6) > You're running kdevplatform from git master (ccf92f2 is a master-only commit). > git master currently has what will eventually be released as 1.4, but > kdev-python is currently targeting kdevplatform 1.3. You need to *downgrade* > your kdevplatform to 1.3 (use the 1.3 branch in git). Ahh, thanks for this explanation, I did not get it from Sven's comment, I thought my kdevlatform was too old. When I cheated and rewrite python plugin version to 14, I got following (different) backtrace also during background parsing: Thread 5 (Thread 0x7fd7d473b700 (LWP 8499)): [KCrash Handler] #6 0x0000000000000000 in ?? () #7 0x00007fd7d92f2945 in Python::DeclarationBuilder::visitArguments (this=0x9aa7550, node=0x9ee7990) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/duchain/declarationbuilder.cpp:1299 #8 0x00007fd7d92e4424 in Python::ContextBuilder::visitFunctionArguments (this=0x9aa7550, node=<optimized out>) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/duchain/contextbuilder.cpp:494 #9 0x00007fd7d92ed0ba in Python::DeclarationBuilder::visitFunctionDefinition (this=0x9aa7550, node=0x9ee78c0) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/duchain/declarationbuilder.cpp:1146 #10 0x00007fd7d952e492 in Python::AstDefaultVisitor::visitClassDefinition (this=0x9aa75b0, node=0x9ee5d90) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/parser/astdefaultvisitor.cpp:317 #11 0x00007fd7d92ec9b2 in Python::DeclarationBuilder::visitClassDefinition (this=<optimized out>, node=<optimized out>) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/duchain/declarationbuilder.cpp:1079 #12 0x00007fd7d952d9e2 in Python::AstDefaultVisitor::visitCode (this=0x9aa75b0, node=<optimized out>) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/parser/astdefaultvisitor.cpp:47 #13 0x00007fd7d92e0a16 in Python::ContextBuilder::visitCode (this=0x9aa7550, node=0x9eb44b0) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/duchain/contextbuilder.cpp:385 #14 0x00007fd7d92e7c3c in Python::DeclarationBuilder::visitCode (this=0x9aa7550, node=0x9eb44b0) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/duchain/declarationbuilder.cpp:285 #15 0x00007fd7d93018c9 in supportBuild (context=0x7fd7b549f2e0, node=0x9eb44b0, this=0x9aa7550) at /usr/include/kdevplatform/language/duchain/builders/abstractcontextbuilder.h:133 Should I try to reproduce this with kdevplatform 1.3 branch? Ah yeah, sorry, I guessed you'd just pick out the 1.3 beta version from the tag lists when reading my comment. I should have made it clear that it's a bit older, not newer. Don't bother trying with another kdevplatform version, that's not the issue here... I changed something, can you try again? Also, please close kdevelop, then clear the whole cache with rm -Rf ~/.kdevduchain before trying again. Thanks! (In reply to comment #8) > Don't bother trying with another kdevplatform version, that's not the issue > here... I changed something, can you try again? Also, please close kdevelop, > then clear the whole cache with rm -Rf ~/.kdevduchain before trying again. With 8a1f1579c427e3599fa001 I get nearly the same backtrace: #0 0x0000000000000000 in ?? () #1 0x00007fffcdd3287b in Python::DeclarationBuilder::visitArguments (this=0x7fffaca42d00, node=0x7fffadbab920) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/duchain/declarationbuilder.cpp:1296 #2 0x00007fffcdd243c4 in Python::ContextBuilder::visitFunctionArguments (this=0x7fffaca42d00, node=<optimized out>) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/duchain/contextbuilder.cpp:494 #3 0x00007fffcdd2c4ba in Python::DeclarationBuilder::visitFunctionDefinition (this=0x7fffaca42d00, node=0x7fffadbab850) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/duchain/declarationbuilder.cpp:1146 #4 0x00007fffcdf6e492 in Python::AstDefaultVisitor::visitClassDefinition (this=0x7fffaca42d60, node=0x7fffadba9d20) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/parser/astdefaultvisitor.cpp:317 #5 0x00007fffcdd2e212 in Python::DeclarationBuilder::visitClassDefinition (this=<optimized out>, node=<optimized out>) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/duchain/declarationbuilder.cpp:1079 #6 0x00007fffcdf6d9e2 in Python::AstDefaultVisitor::visitCode (this=0x7fffaca42d60, node=<optimized out>) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/parser/astdefaultvisitor.cpp:47 #7 0x00007fffcdd209b6 in Python::ContextBuilder::visitCode (this=0x7fffaca42d00, node=0x7fffad5e9e50) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/duchain/contextbuilder.cpp:385 #8 0x00007fffcdd27bdc in Python::DeclarationBuilder::visitCode (this=0x7fffaca42d00, node=0x7fffad5e9e50) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/duchain/declarationbuilder.cpp:285 #9 0x00007fffcdd417c9 in supportBuild (context=0x7fffb89495a0, node=0x7fffad5e9e50, this=0x7fffaca42d00) at /usr/include/kdevplatform/language/duchain/builders/abstractcontextbuilder.h:133 #10 KDevelop::AbstractTypeBuilder<Python::Ast, Python::Identifier, Python::ContextBuilder>::supportBuild (this=0x7fffaca42d00, node=0x7fffad5e9e50, context=<optimized out>) at /usr/include/kdevplatform/language/duchain/builders/abstracttypebuilder.h:85 Hm, okay, I cannot reproduce this... do you have some code to make it crash? (In reply to comment #10) > Hm, okay, I cannot reproduce this... do you have some code to make it crash? The latest kdevelop-python revision still crashes for me with following steps to reproduce (even with .kdevduchain wiped out): 1. git clone git://github.com/strohel/PyBayes.git 2. create a new project in that directory The backtrace is the same as in comment #9. I still cannot reproduce this crash. Can you please send me the "git describe" output of all three relevant projects? Mine is this: PyBayes: v0.3-43-g2f4c63e kdev-python: beta1-40-g0a019cd kdevplatform: v1.2.80 Maybe you could try with the same versions and see if it still happens? I'm using two threads for the background parser, are you using significantly more of them? (In reply to comment #12) > I still cannot reproduce this crash. > Can you please send me the "git describe" output of all three relevant > projects? > Mine is this: > PyBayes: v0.3-43-g2f4c63e > kdev-python: beta1-40-g0a019cd > kdevplatform: v1.2.80 > > Maybe you could try with the same versions and see if it still happens? > I'm using two threads for the background parser, are you using significantly > more of them? Hi, sorry for late reply. I am able to reproduce the crash with following versions: kdevplatform v1.2.81 kdevelop v4.2.81 kdev-python beta1-55-g0060b91 PyBayes v0.3-43-g2f4c63e ...with Tokyo submodule: `git submodule status` 896d046b62cf50faf7faa7e58a8705fb2f22f19a tokyo (heads/master) The exact steps to reproduce: 1. create new user with empty $HOME, login as that user to KDE 2. git clone git://github.com/strohel/PyBayes.git 3. cd PyBayes 4. git submodule update --init 5. Start KDevelop, create Generic Project Manager project at $HOME/PyBayes 6. KDevelop crashes reproducibly near 50% of the background parser. I use max. 2 threads for bg parser. The backtrace is somewhat different from the previous ones: Thread 4 (Thread 0x7ff511d19700 (LWP 9773)): [KCrash Handler] #6 0x00007ff53db1e555 in KDevelop::DUContext::findDeclarations (this=0x0, identifier=<optimized out>, position=..., topContext=0x0, flags=...) at /var/tmp/portage/dev-util/kdevplatform-1.2.81/work/kdevplatform-1.2.81/language/duchain/ducontext.cpp:1196 #7 0x00007ff5121521c0 in Python::DeclarationBuilder::findDeclarationInContext (this=<optimized out>, dottedNameIdentifier=..., ctx=0x7ff518668400) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/duchain/declarationbuilder.cpp:375 #8 0x00007ff51215caed in Python::DeclarationBuilder::createModuleImportDeclaration (this=0xb6bcfc0, dottedName=<optimized out>, declarationIdentifier=0xb765930, rangeNode=<optimized out>, createProblem=Python::DeclarationBuilder::DontCreateProblems) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/duchain/declarationbuilder.cpp:613 #9 0x00007ff51215eaec in Python::DeclarationBuilder::visitImportFrom (this=0xb6bcfc0, node=0xb7657c0) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/duchain/declarationbuilder.cpp:407 #10 0x00007ff512397ee2 in Python::AstDefaultVisitor::visitCode (this=0xb6bd020, node=<optimized out>) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/parser/astdefaultvisitor.cpp:47 #11 0x00007ff512149ef6 in Python::ContextBuilder::visitCode (this=0xb6bcfc0, node=0xb6b4020) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/duchain/contextbuilder.cpp:385 #12 0x00007ff5121510dc in Python::DeclarationBuilder::visitCode (this=0xb6bcfc0, node=0xb6b4020) at /var/tmp/portage/dev-util/kdevelop-python-9999/work/kdevelop-python-9999/duchain/declarationbuilder.cpp:298 #13 0x00007ff51216b019 in supportBuild (context=0x86525c0, node=0xb6b4020, this=0xb6bcfc0) at /usr/include/kdevplatform/language/duchain/builders/abstractcontextbuilder.h:133 Thanks for working with me to resolve this issue. Hmm, weird! It still parses the whole project for me without crashing. I have no idea... Hi Sven, I've got some new observations - it seems that the parser crash is related to scipy Python package. I can reproduce the crash by: 1) install Scipy (I have version 0.9.0) 2) create new KDevelop project, put the following to example.py: import scipy.io scipy.io.loadmat("file") 3) crash! Backtrace identical to the one from comment #13 4) KDevelop also crashes every time you start it and open this project. (during background parser run) Hi, I'm still not able to reproduce this! Could you please do rm -Rf ~/.kdevduchain (this clears all of the kdevelop cache completely -- exit any running instances of kdevelop before this) and see if the crash persists? Greetings Still not able to reproduce this. I'll set it to NEEDSINFO until there's some more reliable way to reproduce it... I'm no longer able to reproduce this with current kdev-python (& kdevelop & kdevplatform) git, so I'm marking this as fixed. Thanks! Fine, thanks. I'll mark it as fixed for now. (In reply to comment #19) > Fine, thanks. I'll mark it as fixed for now. But I have another bug for you: bug 301289. Does python plugin somehow set font weight out of 0 - 99? |