Bug 299608

Summary: kdev-python crashes when parsing pygments source files
Product: [Developer tools] kdev-python Reporter: Luca Beltrame <lbeltrame>
Component: Language supportAssignee: Sven Brauch <mail>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Backtrace of the crash using gdb

Description Luca Beltrame 2012-05-08 08:15:19 UTC
If Pygments is installed, KDevelop will cash when parsing its files. Specifically, in the Python site-packages dir, "pygments/lexers/functional.py". Backtrace is attached.

Reproducible: Always

Steps to Reproduce:
1. Load KDevelop
2. Wait for parsing to reach pygments/lexers/functional.py
Actual Results:  
KDevelop crashes.

Expected Results:  
KDevelop contines parsing.
Comment 1 Luca Beltrame 2012-05-08 08:17:27 UTC
Created attachment 70945 [details]
Backtrace of the crash using gdb
Comment 2 Sven Brauch 2012-05-19 16:43:49 UTC
I can reproduce this, I'm currently trying to find a fix.
Comment 3 Sven Brauch 2012-05-19 19:17:07 UTC
Git commit bf99fa429234ea7d66a121c6a7313f6e739a312d by Sven Brauch.
Committed on 19/05/2012 at 21:16.
Pushed by brauch into branch 'master'.

Proper fix for the "the python parser has no information about where a node ends" problem.

This adds a visitor which recursively fixes the missing ranges.
Hopefully also fixes
(my tests work)

M  +27   -27   duchain/contextbuilder.cpp
M  +1    -1    duchain/declarationbuilder.cpp
M  +1    -0    duchain/expressionvisitor.cpp
M  +17   -0    duchain/tests/pyduchaintest.cpp
M  +0    -1    duchain/usebuilder.cpp
M  +8    -7    parser/ast.h
M  +19   -0    parser/astbuilder.cpp

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