| Summary: | Ctrl+space crashes Kdevelop with PHP | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Niels <niels.misc> |
| Component: | Language Support: PHP | Assignee: | kdevelop-bugs-null |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | CC: | lzap |
| Priority: | NOR | ||
| Version First Reported In: | 3.2.91 | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Niels
2005-10-06 04:01:18 UTC
I can confirm this using current 3.5 branch (rev. 467250) *** Bug 137340 has been marked as a duplicate of this bug. *** I can't reproduce this bug in 3.4, if somebody can please re-open. Nice, just after closing it I managed to crash kdevelop. Re-opening. What I did was disabling the code-completion/hinting and also the realtime-parser. Then go to a member function of a class and type return $this-><ctrl+space>. Backtrace is the same is in the original report. SVN commit 623352 by apaku:
Don't try to access variables that might not have been initialized properly.
BUG: 113940
M +6 -4 phpcodecompletion.cpp
--- branches/kdevelop/3.4/languages/php/phpcodecompletion.cpp #623351:623352
@@ -36,7 +36,7 @@
using namespace std;
-PHPCodeCompletion::PHPCodeCompletion(PHPSupportPart *phpSupport, PHPConfigData *config) {
+PHPCodeCompletion::PHPCodeCompletion(PHPSupportPart *phpSupport, PHPConfigData *config) : QObject(), m_cursorInterface(0), m_codeInterface(0), m_editInterface(0), m_selectionInterface(0) {
m_phpSupport = phpSupport;
m_config = config;
@@ -128,6 +128,8 @@
void PHPCodeCompletion::cursorPositionChanged(){
uint line, col;
+ if( !m_cursorInterface || !m_selectionInterface || !m_codeInterface || !m_editInterface )
+ return;
m_cursorInterface->cursorPositionReal(&line, &col);
kdDebug(9018) << "cursorPositionChanged:" << line << ":" << col << endl;
@@ -237,7 +239,7 @@
e.prefix = nClass->name() + " ::";
e.text = nFunc->name();
ArgumentDom pArg = (*funcIt)->argumentList().first();
- if (pArg)
+ if (pArg)
e.postfix = "(" + pArg->type() +")";
else
e.postfix = "()";
@@ -305,7 +307,7 @@
list = getClasses(extends.cap(1));
return showCompletionBox(list, extends.cap(1).length());
}
-
+
return false;
}
@@ -653,7 +655,7 @@
m_codeInterface->showArgHint ( argsList, "()", "," );
return true;
}
- }
+ }
}
if (line.findRev("->") != -1) {
|