Bug 324689 - KDevelop crashes on codecompletion
Summary: KDevelop crashes on codecompletion
Status: RESOLVED FIXED
Alias: None
Product: kdev-python
Classification: Developer tools
Component: Code completion (show other bugs)
Version: 1.5.x
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: 1.6.0
Assignee: Sven Brauch
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-09 10:02 UTC by Gerald Senarclens de Grancy
Modified: 2013-09-09 10:18 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test case to manually reproduce the crash (90 bytes, text/x-python)
2013-09-09 10:04 UTC, Gerald Senarclens de Grancy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Senarclens de Grancy 2013-09-09 10:02:55 UTC
Trying to port pulp-or to be both Python 2 and 3 compatible, I edited their file bootstrap.py.

Reproducible: Always

Steps to Reproduce:
1. ensure python autocompletion works
2. load the attached tc.py file
3. on the second line, type "o" directly after "... import url"
Actual Results:  
kdevelop crashes

Expected Results:  
autocompletion works (once Python3 support is finished)

(gdb) backtrace 
#0  KDevelop::DUContext::findDeclarations (this=this@entry=0x0, identifier=..., position=..., 
    dataType=..., topContext=topContext@entry=0x0, flags=...)
    at ../../language/duchain/ducontext.cpp:848
#1  0x00007fffc354484f in Python::PythonCodeCompletionContext::internalContextForDeclaration (
    this=this@entry=0x7fffbc0039b0, topContext=topContext@entry=0x0, remainingIdentifiers=...)
    at /home/gerald/downloads/kdev-python-v1.5.1/codecompletion/context.cpp:618
#2  0x00007fffc3544d33 in Python::PythonCodeCompletionContext::findIncludeItems (
    this=this@entry=0x7fffbc0039b0, item=...)
    at /home/gerald/downloads/kdev-python-v1.5.1/codecompletion/context.cpp:549
#3  0x00007fffc3545a4e in Python::PythonCodeCompletionContext::findIncludeItems (
    this=this@entry=0x7fffbc0039b0, items=...)
    at /home/gerald/downloads/kdev-python-v1.5.1/codecompletion/context.cpp:605
#4  0x00007fffc3546204 in Python::PythonCodeCompletionContext::includeItemsForSubmodule (
    this=this@entry=0x7fffbc0039b0, submodule=...)
    at /home/gerald/downloads/kdev-python-v1.5.1/codecompletion/context.cpp:672
#5  0x00007fffc3549bb0 in Python::PythonCodeCompletionContext::completionItems (
    this=this@entry=0x7fffbc0039b0, abort=@0x2a7af10: false, 
    fullCompletion=fullCompletion@entry=false)
    at /home/gerald/downloads/kdev-python-v1.5.1/codecompletion/context.cpp:295
#6  0x00007ffff1c9e2b9 in KDevelop::CodeCompletionWorker::computeCompletions (this=0x2a7aef0, 
    context=..., position=..., followingText=..., contextRange=..., contextText=...)
    at ../../language/codecompletion/codecompletionworker.cpp:166
#7  0x00007ffff1c9eaa9 in KDevelop::CodeCompletionWorker::computeCompletions (this=0x2a7aef0, 
    context=..., position=..., view=<optimized out>)
    at ../../language/codecompletion/codecompletionworker.cpp:128
#8  0x00007ffff1c9efd2 in qt_static_metacall (_a=<optimized out>, _id=<optimized out>, 
    _o=<optimized out>, _c=<optimized out>) at ./codecompletionworker.moc:61
#9  KDevelop::CodeCompletionWorker::qt_static_metacall (_o=0x2a7aef0, 
    _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x1) at ./codecompletionworker.moc:54
Comment 1 Gerald Senarclens de Grancy 2013-09-09 10:04:37 UTC
Created attachment 82231 [details]
Test case to manually reproduce the crash
Comment 2 Sven Brauch 2013-09-09 10:18:10 UTC
Git commit c4446784f353b970aa149eda7bf5685c6be7cc7d by Sven Brauch.
Committed on 09/09/2013 at 10:17.
Pushed by brauch into branch '1.5'.

>From the "why did this even work before" dept: fix crash in completion

M  +3    -0    codecompletion/context.cpp

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