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 223925 - Missing READ-LOCK when accessing TokenHierarchy (CompletionSupport.isPreprocessorDirectiveCompletionEnabled)
Summary: Missing READ-LOCK when accessing TokenHierarchy (CompletionSupport.isPreproce...
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-17 12:36 UTC by Alexander Simon
Modified: 2013-05-14 02:23 UTC (History)
1 user (show)

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 Alexander Simon 2012-12-17 12:36:08 UTC
INFO [org.netbeans.spi.lexer.MutableTextInput]: !!WARNING!! Missing READ-LOCK when accessing TokenHierarchy: input-source:org.netbeans.modules.editor.NbEditorDocument@990e0a, mimeType='text/x-c++', kitClass=null, length=6785, version=1, file=org.netbeans.modules.cnd.source.CCDataObject@168e09a[/home/alsimon/SolStudioProjects/Fractal_1/fractal.cc@48d48c6c:19baf0e]
java.lang.Exception
	at org.netbeans.lib.lexer.TokenHierarchyOperation.ensureReadLocked(TokenHierarchyOperation.java:397)
	at org.netbeans.lib.lexer.TokenHierarchyOperation.tokenSequence(TokenHierarchyOperation.java:422)
	at org.netbeans.lib.lexer.TokenHierarchyOperation.tokenSequence(TokenHierarchyOperation.java:418)
	at org.netbeans.api.lexer.TokenHierarchy.tokenSequence(TokenHierarchy.java:186)
	at org.netbeans.api.lexer.TokenHierarchy.embeddedTokenSequences(TokenHierarchy.java:265)
	at org.netbeans.cnd.api.lexer.CndLexerUtilities.getCppTokenSequence(CndLexerUtilities.java:137)
	at org.netbeans.modules.cnd.completion.cplusplus.ext.CompletionSupport.isPreprocessorDirectiveCompletionEnabled(CompletionSupport.java:138)
	at org.netbeans.modules.cnd.completion.cplusplus.ext.CompletionSupport.isPreprocCompletionEnabled(CompletionSupport.java:134)
	at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery._checkCondition(CsmCompletionQuery.java:260)
	at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery.checkCondition(CsmCompletionQuery.java:239)
	at org.netbeans.modules.cnd.completion.cplusplus.CsmCompletionProvider.createTask(CsmCompletionProvider.java:117)
	at org.netbeans.modules.editor.completion.CompletionImpl.completionQuery(CompletionImpl.java:696)
	at org.netbeans.modules.editor.completion.CompletionImpl.showCompletion(CompletionImpl.java:900)
	at org.netbeans.modules.editor.completion.CompletionImpl.access$2400(CompletionImpl.java:110)
	at org.netbeans.modules.editor.completion.CompletionImpl$CompletionShowAction.actionPerformed(CompletionImpl.java:1568)
	at org.netbeans.modules.editor.completion.CompletionImpl.dispatchKeyEvent(CompletionImpl.java:620)
	at org.netbeans.modules.editor.completion.CompletionImpl.keyPressed(CompletionImpl.java:380)
	at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:233)
	at java.awt.Component.processKeyEvent(Component.java:6255)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2809)
	at java.awt.Component.processEvent(Component.java:6074)
	at java.awt.Container.processEvent(Container.java:2039)
	at java.awt.Component.dispatchEventImpl(Component.java:4660)
	at java.awt.Container.dispatchEventImpl(Container.java:2097)
	at java.awt.Component.dispatchEvent(Component.java:4488)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1856)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:722)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1000)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:865)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:686)
	at java.awt.Component.dispatchEventImpl(Component.java:4532)
	at java.awt.Container.dispatchEventImpl(Container.java:2097)
	at java.awt.Window.dispatchEventImpl(Window.java:2489)
	at java.awt.Component.dispatchEvent(Component.java:4488)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:668)
	at java.awt.EventQueue.access$400(EventQueue.java:81)
	at java.awt.EventQueue$2.run(EventQueue.java:627)
	at java.awt.EventQueue$2.run(EventQueue.java:625)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:641)
	at java.awt.EventQueue$3.run(EventQueue.java:639)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:638)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
	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 1 soldatov 2013-01-17 11:58:16 UTC
I see this exception in NetBeans 7.3rc1 too. It is a bad if any Ctrl-Space will generate exception into log in 7.3.
Comment 2 Vladimir Voskresensky 2013-01-17 16:14:04 UTC
Valera, if I understand the issue, it is reported only once, not each time Ctrl-Space is used. Is it showstopper in this case?
Comment 3 soldatov 2013-01-18 07:52:04 UTC
(In reply to comment #2)
> Valera, if I understand the issue, it is reported only once, not each time
> Ctrl-Space is used. Is it showstopper in this case?
why not if fix is easy and safe?
Comment 4 soldatov 2013-01-18 08:24:42 UTC
(In reply to comment #2)
> issue, it is reported only once, not each time Ctrl-Space is used.
Yes. First Ctrl-Space after restart generates this exception only
Comment 5 Vladimir Voskresensky 2013-01-18 09:32:41 UTC
thanks, I will remove 7.3 blocker marker.
Comment 6 Vladimir Voskresensky 2013-05-13 12:47:12 UTC
http://hg.netbeans.org/cnd-main/rev/60ec3aa20c12
Comment 7 Quality Engineering 2013-05-14 02:23:36 UTC
Integrated into 'main-golden', will be available in build *201305132300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/60ec3aa20c12
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #223925 - Missing READ-LOCK when accessing TokenHierarchy (CompletionSupport.isPreprocessorDirectiveCompletionEnabled)