Bug 319045

Summary: KDevelop crach after import twisted.internet.ssl
Product: [Developer tools] kdev-python Reporter: Alexandr Zamaraev (aka Tonal) <tonal.promsoft>
Component: Language supportAssignee: Sven Brauch <mail>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: 1.4.0 / 1.4.1 (stable)   
Target Milestone: 1.6.0   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Alexandr Zamaraev (aka Tonal) 2013-04-29 05:46:55 UTC
KDevelop crach after import twisted.internet.ssl


Reproducible: Always

Steps to Reproduce:
1. Create new simple python project
2. type in main file
import twisted.internet.ssl
3. KDevelop crashed with message:
Application: KDevelop (kdevelop), signal: Aborted
In console:
$ kdevelop
... 
 ====> PARSING ====> parsing file  "/usr/lib/python2.7/dist-packages/twisted/protocols/__init__.py" ; has priority 99993 
 ====> AST     ====>     building abstract syntax tree for  "/usr/lib/python2.7/dist-packages/twisted/protocols/__init__.py" 
 ====> DUCHAIN ====>     building duchain for "/usr/lib/python2.7/dist-packages/twisted/protocols/__init__.py" 
 ====> DUCHAIN ====>     rebuilding duchain for "/usr/lib/python2.7/dist-packages/twisted/protocols/__init__.py" (was built before) 
 ====> PARSING ====> parsing file  "/usr/lib/python2.7/dist-packages/twisted/internet/ssl.py" ; has priority 99993 
 ====> AST     ====>     building abstract syntax tree for  "/usr/lib/python2.7/dist-packages/twisted/internet/ssl.py" 
 ====> DUCHAIN ====>     building duchain for "/usr/lib/python2.7/dist-packages/twisted/internet/ssl.py" 
ASSERT: "comprehensionContext" in file /media/my_book/lang/work/kdev-python/duchain/expressionvisitor.cpp, line 606
KCrash: Application 'kdevelop' crashing...
...
Comment 1 Sven Brauch 2013-04-29 09:44:28 UTC
Git commit 257bcbba297de43da726893d9016f41f39de23ec by Sven Brauch.
Committed on 29/04/2013 at 11:44.
Pushed by brauch into branch '1.5'.

Don't visit decorators and base classes twice

This led to crashes because the second turn was done within
the class context.

M  +4    -5    duchain/declarationbuilder.cpp
M  +5    -0    duchain/tests/pyduchaintest.cpp

http://commits.kde.org/kdev-python/257bcbba297de43da726893d9016f41f39de23ec
Comment 2 Alexandr Zamaraev (aka Tonal) 2013-04-30 05:50:11 UTC
How about bakport to 1.4 branch?
Comment 3 Sven Brauch 2013-05-01 11:22:31 UTC
Git commit c21e6c782a42328ce59aeddd928be8d08c62ceb6 by Sven Brauch.
Committed on 29/04/2013 at 11:44.
Pushed by brauch into tag 'v1.4.2'.

Don't visit decorators and base classes twice

Backported to 1.4 for 1.4.2 release
This led to crashes because the second turn was done within
the class context.

Conflicts:
	duchain/tests/pyduchaintest.cpp

M  +4    -5    duchain/declarationbuilder.cpp
M  +7    -1    duchain/tests/pyduchaintest.cpp

http://commits.kde.org/kdev-python/c21e6c782a42328ce59aeddd928be8d08c62ceb6