This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 178781 - crash on autocomplete in phpdoc
Summary: crash on autocomplete in phpdoc
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-17 05:30 UTC by daorus
Modified: 2010-02-08 21:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description daorus 2009-12-17 05:30:30 UTC
When use autocomplete in open comment block after
@return tag, there is a an error if the comment
block is not closed yet by */. If the block is closed
there is no error on autocomplete.

This is important, because if there is no @return
before the function, autocomplete for returning
result variable could not understand the type itself.

example with error

. . . . class CrashBlank {};

. . . . /** @return <- here press Ctrl+Space generates error
. . . . function GetBlank() { return new CrashBlank(); }


example without error

. . . . class CrashBlank {};

. . . . /** @return <- here press Ctrl+Space - no error */
. . . . function GetBlank() { return new CrashBlank(); }
Comment 1 rmatous 2009-12-17 10:23:10 UTC
Cannot reproduce. Can you attach exception?
Comment 2 daorus 2009-12-17 12:00:01 UTC
java.lang.AssertionError: currentIndent < 0
	at org.netbeans.modules.php.editor.indent.PHPFormatter$2.run(PHPFormatter.java:335)
	at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:327)
	at org.netbeans.modules.php.editor.indent.PHPFormatter.astReformat(PHPFormatter.java:299)
	at org.netbeans.modules.php.editor.indent.PHPFormatter.reformat(PHPFormatter.java:117)
	at org.netbeans.modules.csl.core.GsfReformatTask$1.run(GsfReformatTask.java:102)
	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:129)
	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:113)
	at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:190)
	at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:99)
	at org.netbeans.modules.csl.core.GsfReformatTask.reformat(GsfReformatTask.java:92)
	at org.netbeans.modules.editor.indent.TaskHandler$MimeItem.runTask(TaskHandler.java:547)
	at org.netbeans.modules.editor.indent.TaskHandler.runTasks(TaskHandler.java:314)
	at org.netbeans.modules.editor.indent.IndentImpl.reformat(IndentImpl.java:293)
	at org.netbeans.modules.editor.indent.FormatterImpl.reformat(FormatterImpl.java:187)
	at org.netbeans.lib.editor.codetemplates.CodeTemplateInsertHandler.run(CodeTemplateInsertHandler.java:343)
	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:357)
	at org.netbeans.lib.editor.codetemplates.CodeTemplateInsertHandler.insertTemplate(CodeTemplateInsertHandler.java:259)
	at org.netbeans.lib.editor.codetemplates.CodeTemplateInsertHandler.processTemplate(CodeTemplateInsertHandler.java:221)
	at org.netbeans.lib.editor.codetemplates.CodeTemplateManagerOperation.insert(CodeTemplateManagerOperation.java:238)
	at org.netbeans.lib.editor.codetemplates.api.CodeTemplate.insert(CodeTemplate.java:104)
	at org.netbeans.modules.csl.editor.completion.GsfCompletionItem$DelegatedItem.defaultSubstituteText(GsfCompletionItem.java:341)
	at org.netbeans.modules.csl.editor.completion.GsfCompletionItem$DelegatedItem.substituteText(GsfCompletionItem.java:311)
	at org.netbeans.modules.csl.editor.completion.GsfCompletionItem.defaultAction(GsfCompletionItem.java:461)
	at org.netbeans.modules.editor.completion.CompletionImpl.dispatchKeyEvent(CompletionImpl.java:595)
	at org.netbeans.modules.editor.completion.CompletionImpl.keyPressed(CompletionImpl.java:368)
	at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:233)
	at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:232)
	at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:232)
	at java.awt.Component.processKeyEvent(Component.java:6221)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2801)
	at java.awt.Component.processEvent(Component.java:6040)
	at java.awt.Container.processEvent(Container.java:2041)
	at java.awt.Component.dispatchEventImpl(Component.java:4630)
	at java.awt.Container.dispatchEventImpl(Container.java:2099)
	at java.awt.Component.dispatchEvent(Component.java:4460)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:704)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:969)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:841)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:668)
	at java.awt.Component.dispatchEventImpl(Component.java:4502)
	at java.awt.Container.dispatchEventImpl(Container.java:2099)
	at java.awt.Window.dispatchEventImpl(Window.java:2475)
	at java.awt.Component.dispatchEvent(Component.java:4460)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:125)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Comment 3 rmatous 2009-12-17 13:25:31 UTC
AssertionError => not 6.8 FCS?
Comment 4 daorus 2009-12-17 17:31:44 UTC
> AssertionError => not 6.8 FCS?

Could not understand the question...
How can I help you? What and where from exactly I shoud take information for you?

This is what is in my Help -> About

Product Version: NetBeans IDE Dev (Build nbms-and-javadoc-4471-on-091204)
Java: 1.6.0_16; Java HotSpot(TM) Client VM 14.2-b01
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)

Have you asked about that?
Comment 5 Petr Pisl 2010-02-08 07:12:36 UTC
I can not reproduce this as well, but I know this assertion. It doesn't have to be there and the situation when currentIndent is < 0, can be handled without the assertion. I changes handling the situation and instead assertion there is warning message. 

changeset:   159425:0693994ab88e
Comment 6 Quality Engineering 2010-02-08 21:41:38 UTC
Integrated into 'main-golden', will be available in build *201002090200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/0693994ab88e
User: Petr Pisl <ppisl@netbeans.org>
Log: #178781 -  crash on autocomplete in phpdoc