Summary: | KDevelop crashes during Python parsing | ||
---|---|---|---|
Product: | [Developer tools] kdev-python | Reporter: | Adrián Chaves (Gallaecio) <adrian> |
Component: | Language support | Assignee: | Sven Brauch <mail> |
Status: | CLOSED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdev-python/43753aac0da0210dc7fcc103a3dca054e2271f8b | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | DrKonqi crash file |
Description
Adrián Chaves (Gallaecio)
2012-08-11 21:43:42 UTC
Created attachment 73144 [details]
DrKonqi crash file
Saved from DrKonqi following crash.
Hi there, does the project happen to be public? For finding the bug, it would be useful to have a file which reproduces it. Greetings, Sven Mine was not public yet, but hey, this is the perfect excuse :) https://gitorious.org/chakra-network/chakra-network-django/trees/master The issue happens when opening a KDevelop project at the root (the folder where code, files and templates are). Git commit 1fed938f585e7f4de0f7ccace62dfedf53683cb1 by Sven Brauch. Committed on 14/08/2012 at 19:58. Pushed by brauch into branch 'master'. Fix negative tuple indices from crashing the parser. M +4 -1 duchain/expressionvisitor.cpp M +1 -0 duchain/tests/pyduchaintest.cpp http://commits.kde.org/kdev-python/1fed938f585e7f4de0f7ccace62dfedf53683cb1 Haha, nice find: a newly introduced feature guessing the type of d in t = (1, 2, 3); d = t[2] Smart as I am, I only checked that the index used for accessing the slice is smaller than the numer of entries in the slice -- not that it is positive. This should be fixed now. By the way: If you build with -DCMAKE_BUILD_TYPE=debug, this would have triggered an assertion, which would have made it fixable from the backtrace. :) Thanks for reporting, hope it works now. Please set the status to Closed - Fixed if the fix works for you. Probably not because of the same, but I am still getting a crash (further in the parsing process): http://paste.kde.org/534464/ Hmm, I cannot reproduce that crash... Maybe the cache is corrupted? Try closing kdevelop, then rm -Rf ~/.kdevduchain (that deletes kdevelop's persistent cache directory), and retry. Actually, when I run it after removing that folder, Dr. Konqui gets just a segmentation fault. The terminal output goes like this: http://paste.kde.org/534506/ The backtrace only appears when I run KDevelop again after that. Might there by another configuration file or folder getting in the way? Can you run kdevelop with "gdb kdevelop", then "thread apply all bt" when it crashes? Then you'll get a backtrace even if drkonqui doesn't work as intended. phew... I'm sorry, I don't see the problem from code+backtrace, and I can't reproduce it either. Can you disable debug output for kdev-python in the "kdebugdialog" program? Then, it'll be easily visible from the remaining output which file is being parsed when the crash happens... Ok, so I disabled the KDevelop Python support debug output… And no crash. Which is great because I will be able to use KDevelop again, I guess. But getting back the Python support debug output, I pasted output enough to see the problematic file: http://paste.kde.org/534686/ It turns out it is not one of the project’s, but one of Django’s. I have the latest version installed (1.4.1), and the file where the crash happens is “/usr/lib/python2.7/site-packages/django/db/models/deletion.py”. Ah, now I can reproduce it, it crashes in doing debug output. I had it disabled, thus it worked for me. I'll try to fix it. Git commit 43753aac0da0210dc7fcc103a3dca054e2271f8b by Sven Brauch. Committed on 15/08/2012 at 10:27. Pushed by brauch into branch 'master'. Don't add invalid or null types to tuples, but use mixed instead. This should finally fix M +6 -1 duchain/expressionvisitor.cpp http://commits.kde.org/kdev-python/43753aac0da0210dc7fcc103a3dca054e2271f8b Next try -- I hope it works now! Just perfect, thanks a lot! |