When starting KDevelop using kdev-python, if Biopython is installed, kdev-python will crash when parsing CodonTable from Bio.Data The relevant lines from the log. ====> AST ====> building abstract syntax tree for "/usr/lib64/python2.7/site-packages/Bio/Data/CodonTable.py" ====> DUCHAIN ====> building duchain for "/usr/lib64/python2.7/site-packages/Bio/Data/CodonTable.py" Notice that if you remove Bio from PYTHONPATH, no crash occurs. DrKonqui doesn't manage to get a backtrace, so I generated one with gdb, which is attached to this report. Reproducible: Always Steps to Reproduce: 1. Install Biopython (through pip) 2. Load KDevelop 3. Wait for parsing to reach the Bio module Actual Results: KDevelop crashes. Expected Results: No crash occurs. This is current git master, on top of latest 4.8 kdelibs and latest KDevelop and KDevPlatform git master.
Created attachment 70691 [details] Backtrace from relevant thread using gdb
Upon further investigation, there is code that is being executed in the module upon import, including a "sanity test" that involves a number of asserts, and other modifications being made run-time.
KDevelop does not run any code, so that's not the reason. There's a fancy list comprehension which the parser chokes on. I'll investigate the issue and let you know as soon as it's fixed.
Git commit de51c8bf4643462a5f09f16f079bee7b48b93b80 by Sven Brauch. Committed on 28/04/2012 at 00:19. Pushed by brauch into branch 'master'. Fix a crash with fancy generator ranges, and add a unit test for that M +27 -54 duchain/contextbuilder.cpp M +15 -16 duchain/declarationbuilder.cpp M +3 -0 duchain/tests/pyduchaintest.cpp M +1 -1 parser/astvisitor.h http://commits.kde.org/kdev-python/de51c8bf4643462a5f09f16f079bee7b48b93b80
Try again with current master, please. The issue should be fixed.
> Try again with current master, please. The issue should be fixed. Sorry for the delay in the response. It is indeed fixed.