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 156612 - ArrayIndexOutOfBoundsException at java.util.AbstractCollection.toArray
Summary: ArrayIndexOutOfBoundsException at java.util.AbstractCollection.toArray
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Code folding (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Svata Dedic
URL: http://statistics.netbeans.org/except...
Keywords: RANDOM
: 157051 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-12 13:21 UTC by mchristi
Modified: 2011-10-10 12:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 142479


Attachments
stacktrace (5.02 KB, text/plain)
2009-01-12 13:21 UTC, mchristi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mchristi 2009-01-12 13:21:45 UTC
Build: NetBeans IDE 6.5 (Build 200811100001)
VM: IBM J9 VM, 2.4, Java(TM) SE Runtime Environment, jvmxa6460-20081105_25433
OS: Linux, 2.6.27.9-159.fc10.x86_64, amd64

User Comments:
mchristi: I have an output window that is minimized.  I opened it and wanted to dock it into the same pane where my tasks window is.  Then the GUI started to behave strangely (some parts weren't redrawn as expected).



Stacktrace: 
java.lang.ArrayIndexOutOfBoundsException
        at java.util.AbstractCollection.toArray(AbstractCollection.java:334)
        at java.util.ArrayList.<init>(ArrayList.java:87)
        at org.netbeans.editor.CodeFoldingSideBar.getPaintInfo(CodeFoldingSideBar.java:409)
        at org.netbeans.editor.CodeFoldingSideBar.paintComponent(CodeFoldingSideBar.java:514)
        at javax.swing.JComponent.paint(JComponent.java:1038)
        at javax.swing.JComponent.paintChildren(JComponent.java:875)
Comment 1 mchristi 2009-01-12 13:21:53 UTC
Created attachment 75698 [details]
stacktrace
Comment 2 Vitezslav Stejskal 2009-01-15 11:50:20 UTC
Looks like a race condition. Perhaps CodeFoldingSideBar.Listener should repost events that are not delivered in AWT
thread to that thread to make sure that cache and visibleMarks are accessed only from AWT. 
Comment 3 Vitezslav Stejskal 2009-01-19 12:23:47 UTC
*** Issue 157051 has been marked as a duplicate of this issue. ***
Comment 4 David Strupl 2009-06-08 13:59:33 UTC
Marek, these are yours now ...
Comment 5 Svata Dedic 2011-10-10 12:02:03 UTC
WFM - visibleMarks is only accessed from AWT (paintComponent, scheduled by invokeLater to AWT; mouse event handler called in AWT). Must have been fixed in the past.