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 209923 - java.util.EmptyStackException at java.util.Stack.peek
Summary: java.util.EmptyStackException at java.util.Stack.peek
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Outline&TreeTable (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords: THREAD
Depends on:
Blocks:
 
Reported: 2012-03-22 11:10 UTC by Tomas Stupka
Modified: 2012-03-28 12:12 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 186143


Attachments
stacktrace (2.72 KB, text/plain)
2012-03-22 11:10 UTC, Tomas Stupka
Details
Really, the layout cache is accessed outside of AWT. (3.69 KB, text/plain)
2012-03-27 15:20 UTC, Martin Entlicher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Stupka 2012-03-22 11:10:49 UTC
Build: NetBeans IDE Dev (Build 20120322-edf8c2659bc9)
VM: Java HotSpot(TM) 64-Bit Server VM, 20.4-b02-402, Java(TM) SE Runtime Environment, 1.6.0_29-b11-402-10M3527
OS: Mac OS X

User Comments:
tstupka: switched to history view




Stacktrace: 
java.util.EmptyStackException
   at java.util.Stack.peek(Stack.java:85)
   at java.util.Stack.pop(Stack.java:67)
   at javax.swing.tree.VariableHeightLayoutCache.getNodeForPath(VariableHeightLayoutCache.java:816)
   at javax.swing.tree.VariableHeightLayoutCache.isExpanded(VariableHeightLayoutCache.java:366)
   at org.openide.explorer.view.NodeRenderDataProvider.getIcon(NodeRenderDataProvider.java:104)
   at org.netbeans.modules.versioning.ui.history.HistoryFileView$FileTablePanel$BrowserTreeTableView$NoLeafIconRenderDataProvider.getIcon(HistoryFileView.java:666)
Comment 1 Tomas Stupka 2012-03-22 11:10:53 UTC
Created attachment 117067 [details]
stacktrace
Comment 2 Martin Entlicher 2012-03-27 14:55:33 UTC
It's likely, that the layout cache is accessed outside of AWT thread. It looks like VariableHeightLayoutCache.tempStacks has changed in between.
Comment 3 Martin Entlicher 2012-03-27 15:20:50 UTC
Created attachment 117351 [details]
Really, the layout cache is accessed outside of AWT.
Comment 4 Martin Entlicher 2012-03-27 15:23:50 UTC
I've found, that the layout cache is accessed in parallel in several threads. This is a violation of Swing contract.
This problem was already reported in issue #157888, where it's apparent that the code is called in non-AWT thread. But instead of a proper fix, the problem was just masked.
Comment 5 Martin Entlicher 2012-03-28 12:12:29 UTC
It's assured, that the layout cache is accessed in AWT thread in
changeset:   216712:f5822dd8a30b
http://hg.netbeans.org/main/rev/f5822dd8a30b