Bug 299608 - kdev-python crashes when parsing pygments source files
Summary: kdev-python crashes when parsing pygments source files
Status: RESOLVED FIXED
Alias: None
Product: kdev-python
Classification: Developer tools
Component: Language support (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Sven Brauch
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-08 08:15 UTC by Luca Beltrame
Modified: 2012-05-19 19:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Backtrace of the crash using gdb (23.49 KB, text/plain)
2012-05-08 08:17 UTC, Luca Beltrame
Details

Note You need to log in before you can comment on or make changes to this bug.
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