Bug 120928 - CompletionImpl.insertCommonPrefix lockups on loaded machine during editing
CompletionImpl.insertCommonPrefix lockups on loaded machine during editing
Status: RESOLVED FIXED
Product: editor
Classification: Unclassified
Component: Completion & Templates
5.x
All All
: P3 (vote)
: 6.x
Assigned To: Dusan Balek
issues@editor
: THREAD
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-02 09:05 UTC by greggwon
Modified: 2008-03-14 17:20 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description greggwon 2007-11-02 09:05:36 UTC
The stack traces below came out of two different lockups of Netbeans 5.5.1 while trying to use code completion.
My machine was a little bit loaded at the time with other processes operating.  It might be possible to test netbeans
and recreate this by using another Java application which is doing lots of socket I/O and heavy graphics and CPU like
my machine was subject to.  Then, just use code completion trying both ENTER and TAB as signals to complete with the
current selection.




"AWT-EventQueue-1" prio=6 tid=0x2ef6fc00 nid=0x2cc50 runnable [0x2f65f000..0x2f65fd94]
   java.lang.Thread.State: RUNNABLE
        at java.lang.String.<init>(String.java:216)
        at java.lang.StringBuilder.toString(StringBuilder.java:430)
        at javax.swing.JComponent.paramString(JComponent.java:5443)
        at javax.swing.text.JTextComponent.paramString(JTextComponent.java:3921)
        at javax.swing.JEditorPane.paramString(JEditorPane.java:1641)
        at java.awt.Component.toString(Component.java:7597)
        at java.lang.String.valueOf(String.java:2827)
        at java.lang.StringBuilder.append(StringBuilder.java:115)
        at java.awt.AWTEvent.toString(AWTEvent.java:328)
        at java.lang.String.valueOf(String.java:2827)
        at java.lang.StringBuffer.append(StringBuffer.java:219)
        - locked <0x02f105e8> (a java.lang.StringBuffer)
        at org.netbeans.modules.collab.ui.IdleDetectionListener.eventDispatched(IdleDetectionListener.java:126)
        - locked <0x06b9db48> (a java.lang.Object)
        at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit.java:2360)
        at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2252)
        at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2251)
        at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2251)
        at java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:2210)
        at java.awt.Component.dispatchEventImpl(Component.java:4308)
        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:693)
        at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:958)
        at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:830)
        at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:657)
        at java.awt.Component.dispatchEventImpl(Component.java:4282)
        at java.awt.Container.dispatchEventImpl(Container.java:2116)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at org.netbeans.modules.editor.completion.CompletionImpl.insertCommonPrefix(CompletionImpl.java:638)
        at org.netbeans.modules.editor.completion.CompletionImpl.access$1300(CompletionImpl.java:70)
        at org.netbeans.modules.editor.completion.CompletionImpl$7.run(CompletionImpl.java:1106)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        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)






"AWT-EventQueue-1" prio=6 tid=0x2e989800 nid=0x1d5d8 runnable [0x2f66f000..0x2f66fa14]
   java.lang.Thread.State: RUNNABLE
        at java.lang.Object.hashCode(Native Method)
        at java.util.HashMap.get(HashMap.java:300)
        at sun.awt.AppContext.get(AppContext.java:575)
        - locked <0x04ca0528> (a java.util.HashMap)
        at java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager(KeyboardFocusManager.java:162)
        - locked <0x2301ac80> (a java.lang.Class for java.awt.KeyboardFocusManager)
        at java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager(KeyboardFocusManager.java:156)
        at java.awt.Component.dispatchEventImpl(Component.java:4317)
        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:693)
        at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:958)
        at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:830)
        at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:657)
        at java.awt.Component.dispatchEventImpl(Component.java:4282)
        at java.awt.Container.dispatchEventImpl(Container.java:2116)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at org.netbeans.modules.editor.completion.CompletionImpl.insertCommonPrefix(CompletionImpl.java:638)
        at org.netbeans.modules.editor.completion.CompletionImpl.access$1300(CompletionImpl.java:70)
        at org.netbeans.modules.editor.completion.CompletionImpl$7.run(CompletionImpl.java:1106)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        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)
Comment 1 Jiri Prox 2007-11-02 09:51:16 UTC
Can you please provide full threaddumps?
I cannot see any lockup in the threads you have attached, both are in Runnable state. So maybe the operation is only
taking too long time to complete.
Comment 2 Vitezslav Stejskal 2007-11-02 10:50:21 UTC
Please attach the full stack trace to see if there really was a deadlock or if the IDE only was busy, but would
eventually finish its work. The stacktraces you attached don't suggest a deadlock. They don't even hang around in the
editor, the first one is showing some activity in your collaboration module and the second one in java.awt classes.
Also, have you tried this in Nb6 betas or dev builds? The java infrastructure and code completion has gone through an
extensive overhaul in Nb6 and should perform much better.
Comment 3 Dusan Balek 2008-03-14 17:20:11 UTC
Should be fixed in NB6.0 since this part of code completion has been completely rewritten.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo