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 189608 - IllegalStateException: Race condition: usageCount = 1
Summary: IllegalStateException: Race condition: usageCount = 1
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: issues@editor
URL:
Keywords:
: 189214 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-17 18:20 UTC by Jesse Glick
Modified: 2010-09-08 03:31 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 171989


Attachments
stacktrace (8.91 KB, text/plain)
2010-08-17 18:20 UTC, Jesse Glick
Details
stacktrace (8.91 KB, text/plain)
2010-08-17 18:23 UTC, Jesse Glick
Details
stacktrace (5.16 KB, text/plain)
2010-08-19 11:53 UTC, Jaromir Uhrik
Details
stacktrace (8.76 KB, text/plain)
2010-08-19 17:05 UTC, misterm
Details
stacktrace (5.16 KB, text/plain)
2010-08-19 17:17 UTC, misterm
Details
stacktrace (5.16 KB, text/plain)
2010-08-19 17:23 UTC, misterm
Details
Nested reuse of HighlightViewFactory (7.70 KB, text/plain)
2010-09-03 16:14 UTC, Miloslav Metelka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2010-08-17 18:20:20 UTC
Build: NetBeans IDE Dev (Build 100817-7dddd6ba7dde)
VM: Java HotSpot(TM) Client VM, 17.0-b16, Java(TM) SE Runtime Environment, 1.6.0_21-b06
OS: Linux

User Comments:
jglick: Changing editor font. Linewrap on, word style.




Stacktrace: 
java.lang.IllegalStateException: Race condition: usageCount = 1
   at org.netbeans.modules.editor.lib2.view.HighlightsViewFactory.restart(HighlightsViewFactory.java:150)
   at org.netbeans.modules.editor.lib2.view.ViewBuilder$FactoryState.init(ViewBuilder.java:619)
   at org.netbeans.modules.editor.lib2.view.ViewBuilder.<init>(ViewBuilder.java:253)
   at org.netbeans.modules.editor.lib2.view.ViewUpdates.initChildren(ViewUpdates.java:159)
   at org.netbeans.modules.editor.lib2.view.DocumentView.initChildren(DocumentView.java:500)
   at org.netbeans.modules.editor.lib2.view.EditorBoxViewChildren.getWithChildrenValid(EditorBoxViewChildren.java:297)
Comment 1 Jesse Glick 2010-08-17 18:20:25 UTC
Created attachment 101463 [details]
stacktrace
Comment 2 Jesse Glick 2010-08-17 18:23:36 UTC
Created attachment 101464 [details]
stacktrace
Comment 3 Exceptions Reporter 2010-08-18 08:02:38 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=171989
Comment 4 Jaromir Uhrik 2010-08-19 11:53:42 UTC
Created attachment 101526 [details]
stacktrace

Deleted property file and the exception appeared...
Comment 5 misterm 2010-08-19 17:05:43 UTC
Created attachment 101535 [details]
stacktrace
Comment 6 misterm 2010-08-19 17:17:43 UTC
Created attachment 101536 [details]
stacktrace
Comment 7 misterm 2010-08-19 17:23:43 UTC
Created attachment 101537 [details]
stacktrace
Comment 8 Miloslav Metelka 2010-08-26 12:30:22 UTC
I have added remembering of the thread that uses HighlightsViewFactory. With this I should be able to find the problem more easily.

http://hg.netbeans.org/jet-main/rev/8a7413bc7004
Comment 9 Miloslav Metelka 2010-08-26 12:31:40 UTC
*** Bug 189214 has been marked as a duplicate of this bug. ***
Comment 10 Quality Engineering 2010-08-27 03:17:18 UTC
Integrated into 'main-golden', will be available in build *201008270001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/8a7413bc7004
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #189608 - IllegalStateException: Race condition: usageCount = 1 - added last usage's stack remembering to find the culprit thread.
Comment 11 Miloslav Metelka 2010-09-03 16:12:09 UTC
I was finally able to reproduce - though only in a test. There is no race condition but rather a nested attempt to reuse the HighlightViewFactory. I will fix it ASAP.
Comment 12 Miloslav Metelka 2010-09-03 16:14:08 UTC
Created attachment 101860 [details]
Nested reuse of HighlightViewFactory
Comment 13 Miloslav Metelka 2010-09-06 09:29:46 UTC
It should now be fixed:
http://hg.netbeans.org/jet-main/rev/1d31c1f01454
Comment 14 Quality Engineering 2010-09-07 03:14:05 UTC
Integrated into 'main-golden', will be available in build *201009070000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/1d31c1f01454
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #189608 - IllegalStateException: Race condition: usageCount = 1.
Comment 15 Quality Engineering 2010-09-08 03:31:34 UTC
Integrated into 'main-golden', will be available in build *201009080000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/1d31c1f01454
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #189608 - IllegalStateException: Race condition: usageCount = 1.