| Summary: | kdevelop crashed while reading code [Php::findContext] | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Renato Carena <renato.carena> |
| Component: | Language Support: PHP | Assignee: | kdevelop-bugs-null |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | CC: | aleixpol, kde, vitalif |
| Priority: | NOR | ||
| Version First Reported In: | 4.2.2 | ||
| Target Milestone: | 4.2.3 | ||
| Platform: | Debian testing | ||
| OS: | Linux | ||
| Latest Commit: | http://commits.kde.org/kdev-php/b8067b9226c5f40c1c9dbcd40bd8c5e009f5fc85 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
| Attachments: | New crash information added by DrKonqi | ||
|
Description
Renato Carena
2011-10-04 22:36:56 UTC
I'm also experiencing this crash, on KDevelop 4.3, KDE 4.7 and Bitrix CMS sources :) I don't know the exact file which caused this problem, because this information isn't in the stack trace, but maybe someone could point out how to determine it? Debugged it for a while and found a minimal reproducing test.
This example crashes KDevelop!
<?php
$a = new A();
$a->x = 1;
class A {
var $x = 1;
}
I'm seeing KDevelop sources for the first time so I don't know how it works, but I'll try to patch it... What if I succeed? :D
The key is to get class context from outside of that class...
Also, this bug is related to bug 241750 - the change from it causes the crash. the two crashes are different, but the latter is easy to reproduce, thanks. I'll fix it ASAP. would be cool if you could create a separate bugreport for this. bye Okay, filled bug 295866. Created attachment 72650 [details] New crash information added by DrKonqi kdevelop (4.3.1) on KDE Platform 4.8.4 (4.8.4) "release 513" using Qt 4.8.2 I got this crash when I opened a new PHP file, in this case the add-to-any.php from http://wordpress.org/extend/plugins/add-to-any version 1.0.3. -- Backtrace (Reduced): #6 KDevelop::DUChainPointerData::base (this=0x0) at /usr/src/debug/kdevplatform-1.3.1/language/duchain/duchainpointer.cpp:32 #7 0x00007f9d1c9429ab in operator-> (this=0x7a96880) at /usr/include/kdevplatform/language/duchain/duchainpointer.h:144 #8 Php::MagicConstantNavigationContext::html (this=0x7a967e0) at /usr/src/debug/kdevelop-php-1.3.1/duchain/navigation/magicconstantnavigationcontext.cpp:69 #9 0x00007f9d3ed5bf6f in KDevelop::AbstractNavigationWidget::update (this=0x7a91810) at /usr/src/debug/kdevplatform-1.3.1/language/duchain/navigation/abstractnavigationwidget.cpp:149 #10 0x00007f9d3ed5c617 in KDevelop::AbstractNavigationWidget::setContext (this=0x7a91810, context=<optimized out>, initBrows=<optimized out>) at /usr/src/debug/kdevplatform-1.3.1/language/duchain/navigation/abstractnavigationwidget.cpp:125 *** Bug 282299 has been marked as a duplicate of this bug. *** Git commit b8067b9226c5f40c1c9dbcd40bd8c5e009f5fc85 by Milian Wolff. Committed on 13/01/2013 at 19:45. Pushed by mwolff into branch '1.5'. Don't try to show magic constant widget if we couldn't find a context. This could happen when you hovered a magic constant in a file that was not yet parsed. M +5 -1 phplanguagesupport.cpp http://commits.kde.org/kdev-php/b8067b9226c5f40c1c9dbcd40bd8c5e009f5fc85 |