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.
Summary: | Exception when selecting method from code completion | ||
---|---|---|---|
Product: | javascript | Reporter: | zdro <zdro> |
Component: | Editor | Assignee: | martin_adamek <martin_adamek> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | pjiricka |
Priority: | P1 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
zdro
2008-07-08 18:46:03 UTC
Assign to correct component. Can you please provide code sample where this happened, together with cursor position where to invoke completion? Thanks. I wasn't able to reproduce, so tried blind fix. http://hg.netbeans.org/main/rev/ce6d5b4349aa Integrated into 'main-golden', available in build *200807310201* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/ce6d5b4349aa User: Martin Adamek <martin_adamek@netbeans.org> Log: Blind fix for #139300: Exception when selecting method from code completion Apologies for the delay. This problem is a bit obscure, so it took me some time to narrow it down to a specific code example. As it turns out, it's quite simple: for (var i = 0 ; i < 10 ; i++) // '{' on the NEXT LINE!!! { // any code } // Put cursor at the end of this line, and start the completion template for // the 'eval' function window.eva I then get the "NoSuchElementException at java.util.LinkedList.getFirst(LinkedList.java:109)". Things are then in a bad state, and if I put the brace on the line of the 'for', restart the template for the eval() function, and hit RETURN, I get the exception below. I can not get out of this state unless I reopen the file. java.lang.NullPointerException at org.netbeans.lib.editor.codetemplates.CodeTemplateInsertHandler.release(CodeTemplateInsertHandler.java:425) at org.netbeans.lib.editor.codetemplates.CodeTemplateInsertHandler.released (CodeTemplateInsertHandler.java:452) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionEditing.releaseActiveGroup (TextRegionEditing.java:271) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionEditing.activateTextSync (TextRegionEditing.java:225) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionEditing.enterAction(TextRegionEditing.java:306) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionEditing$OverrideAction.actionPerformed (TextRegionEditing.java:452) at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1636) at javax.swing.JComponent.processKeyBinding(JComponent.java:2849) at javax.swing.JComponent.processKeyBindings(JComponent.java:2884) at javax.swing.JComponent.processKeyEvent(JComponent.java:2812) at java.awt.Component.processEvent(Component.java:5815) at java.awt.Container.processEvent(Container.java:2058) at java.awt.Component.dispatchEventImpl(Component.java:4410) at java.awt.Container.dispatchEventImpl(Container.java:2116) at java.awt.Component.dispatchEvent(Component.java:4240) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:697) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:962) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:834) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:661) at java.awt.Component.dispatchEventImpl(Component.java:4282) at java.awt.Container.dispatchEventImpl(Container.java:2116) at java.awt.Window.dispatchEventImpl(Window.java:2429) at java.awt.Component.dispatchEvent(Component.java:4240) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121) Exactly that NoSuchElementException was fixed on Wed Jul 30. Can you please check the build number you are using? Btw, with you recent steps to reproduce I was able to reproduce it in older build easily. But mentioned problem is fixed in latest builds. The build is the same as in my opening comments. I trust that it is fixed. I'm just glad that we were able to confirm that it was the same problem I was seeing. Ok, your steps to reproduce helped, thanks! *** Issue 142104 has been marked as a duplicate of this issue. *** |