python bug 288224: ASSERT: "listIndex != -1"

Sven Brauch svenbrauch at googlemail.com
Sun Dec 18 09:53:05 UTC 2011


Hi all,

I'm having trouble fixing bug 288224 [1].
It's very easy to reproduce, just create a python file with these contents:

class Test():
  def myfun(self): pass

then change the "Test" to something else. If kdevplatform is compiled
with debugging symbols, it will crash with the following assert:
  ASSERT: "listIndex != -1" in file language/duchain/codemodel.cpp, line 310
The full backtrace is here [2]. The crash happens in the code in
kdev-python which is responsible for creating the function declaration
for myfun.

It seems duchain is trying to update an item which since has been
deleted; likely reason is that finding the function by its name and
node range still works after renaming the class, but it's deleted as
soon as the class context range is encountered. I'm not sure how to
fix this correctly. Any ideas?

Cheers,
Sven

[1] https://bugs.kde.org/show_bug.cgi?id=288224
[2] http://paste.kde.org/175256/




More information about the KDevelop-devel mailing list