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 146448 - ArrayIndexOutOfBoundsException: 3
Summary: ArrayIndexOutOfBoundsException: 3
Status: RESOLVED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@ide
URL: http://statistics.netbeans.org/except...
Keywords: RANDOM
: 152467 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-09-07 20:54 UTC by drucik
Modified: 2009-08-17 14:03 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 2458


Attachments
stacktrace (1.61 KB, text/plain)
2008-09-07 20:54 UTC, drucik
Details
stacktrace (1.61 KB, text/plain)
2008-09-14 23:59 UTC, ypserv
Details
JComboBox.setModel() called outside AWT (1.40 KB, text/plain)
2008-09-17 10:34 UTC, Miloslav Metelka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description drucik 2008-09-07 20:54:11 UTC
Build: NetBeans IDE Dev (Build 200809040201)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-rc-b28
OS: Windows Vista, 6.0, x86

User Comments: 


Stacktrace: 
java.lang.ArrayIndexOutOfBoundsException: 3
        at javax.swing.plaf.basic.BasicListUI.updateLayoutState(BasicListUI.java:1356)
        at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1299)
        at javax.swing.plaf.basic.BasicListUI.getPreferredSize(BasicListUI.java:566)
        at javax.swing.JComponent.getPreferredSize(JComponent.java:1632)
        at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:769)
        at java.awt.Container.layout(Container.java:1398)
Comment 1 drucik 2008-09-07 20:54:15 UTC
Created attachment 69257 [details]
stacktrace
Comment 2 Stanislav Aubrecht 2008-09-09 09:35:38 UTC
no netbeans specific code in the stack trace. can QA pls try reproducing or contacting reporter(s) for more info? thanks
Comment 3 Lukas Hasik 2008-09-09 10:20:05 UTC
I went through a few xml logs in exception reporter. It seems that the exception happens after action in editor eg. CC
or tab. Reassigning to editor for evaluation. Maybe some better logging in uigestures could help to find out what happens?

-----
<record>
<date>2008-09-07T21:53:02</date>
<millis>1220817182575</millis>
<sequence>12553</sequence>
<level>FINE</level>
<thread>12</thread>
<message>UI_ACTION_EDITOR</message>
−
	<param>
java.awt.event.ActionEvent[ACTION_PERFORMED,cmd=Tab,when=1220817182575,modifiers=] on
org.openide.text.QuietEditorPane[,0,0,994x616,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.basic.BasicBorders$MarginBorder@85c106,flags=8490,maximumSize=,minimumSize=,preferredSize=,caretColor=java.awt.Color[r=0,g=0,b=0],disabledTextColor=javax.swing.plaf.ColorUIResource[r=128,g=128,b=128],editable=true,margin=java.awt.Insets[top=0,left=0,bottom=0,right=0],selectedTextColor=javax.swing.plaf.ColorUIResource[r=255,g=255,b=255],selectionColor=javax.swing.plaf.ColorUIResource[r=51,g=153,b=255],kit=org.netbeans.modules.editor.plain.PlainKit@49c8f1,typeHandlers=]
</param>
−
	<param>
java.awt.event.ActionEvent[ACTION_PERFORMED,cmd=Tab,when=1220817182575,modifiers=] on
org.openide.text.QuietEditorPane[,0,0,994x616,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.basic.BasicBorders$MarginBorder@85c106,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=java.awt.Color[r=0,g=0,b=0],disabledTextColor=javax.swing.plaf.ColorUIResource[r=128,g=128,b=128],editable=true,margin=java.awt.Insets[top=0,left=0,bottom=0,right=0],selectedTextColor=javax.swing.plaf.ColorUIResource[r=255,g=255,b=255],selectionColor=javax.swing.plaf.ColorUIResource[r=51,g=153,b=255],kit=org.netbeans.modules.editor.plain.PlainKit@49c8f1,typeHandlers=]
</param>
−
	<param>
org.netbeans.editor.BaseKit$InsertTabAction[insert-tab]
</param>
<param>org.netbeans.editor.BaseKit$InsertTabAction@4812a0</param>
<param>insert-tab</param>
</record>
−
	<record>
<date>2008-09-07T21:53:07</date>
<millis>1220817187495</millis>
<sequence>12594</sequence>
<level>SEVERE</level>
<thread>12</thread>
−
	<exception>
<message>java.lang.ArrayIndexOutOfBoundsException: 2</message>
−
	<frame>
<class>javax.swing.plaf.basic.BasicListUI</class>
<method>updateLayoutState</method>
<line>1356</line>
Comment 4 Vitezslav Stejskal 2008-09-09 11:04:11 UTC
Well, I'm sorry, but I'm going to say the same as saubrecht. There is no Netbeans specific code on the stacktraces and
without steps to reproduce there is really nothing we can do.
Comment 5 Stanislav Aubrecht 2008-09-09 11:34:17 UTC
there are 15 duplicates of this issue in exception reporter so i'm not sure it really deserves its P5 :)
Comment 6 Lukas Hasik 2008-09-09 11:38:44 UTC
alexanderfrey, drucik, do you remember when the issue happened? Are you able to reproduce it? Any steps?

thank you


@P5 - when there will be more than 20 duplicates then it will become P2 automatically ;) But we don't know how to
reproduce now. 
Comment 7 ypserv 2008-09-14 23:59:12 UTC
Build: NetBeans IDE Dev (Build 200809111401)
VM: Java HotSpot(TM) Client VM, 10.0-b23, Java(TM) SE Runtime Environment, 1.6.0_07-b06
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
java.lang.ArrayIndexOutOfBoundsException: 1
        at javax.swing.plaf.basic.BasicListUI.updateLayoutState(BasicListUI.java:1349)
        at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1292)
        at javax.swing.plaf.basic.BasicListUI.getPreferredSize(BasicListUI.java:559)
        at javax.swing.JComponent.getPreferredSize(JComponent.java:1632)
        at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:769)
        at java.awt.Container.layout(Container.java:1432)
Comment 8 ypserv 2008-09-14 23:59:16 UTC
Created attachment 69833 [details]
stacktrace
Comment 9 Miloslav Metelka 2008-09-15 08:48:25 UTC
IMHO we are hitting http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6253801 in some form i.e. we are adding into a
jlist in non-AWT thread causing the exception below to occur in AWT.
I'll try to patch JDK with an aspect to find a culprit.
Comment 10 Miloslav Metelka 2008-09-17 10:31:04 UTC
So far I've only found the problem attached - ActiveConfigAction calls JComboBox.setModel() outside AWT. Reassigning to
projects for evaluation.
Comment 11 Miloslav Metelka 2008-09-17 10:34:19 UTC
Created attachment 70019 [details]
JComboBox.setModel() called outside AWT
Comment 12 Milan Kubec 2008-09-17 13:47:10 UTC
Fixed. Setters on realized component are called on EQ.

http://hg.netbeans.org/main/rev/57a8c4cc3eb4
Comment 13 Quality Engineering 2008-09-18 05:27:01 UTC
Integrated into 'main-golden', will be available in build *200809180201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/57a8c4cc3eb4
User: Milan Kubec <mkubec@netbeans.org>
Log: #146448: calling setters on realized component on EQ
Comment 14 nsegura3 2008-10-21 21:26:44 UTC
I am getting this issue on a October dev build 200810100201. This issue was supposedly fixed in September.
What I was doing is opening a java file containing a couple of method declaration with no java extension. I dont expect
NB to recognize it as a java file, but I doubt I should be getting this error every time.
Comment 15 nsegura3 2008-10-21 21:29:09 UTC
java.lang.ArrayIndexOutOfBoundsException: 15
	at javax.swing.plaf.basic.BasicListUI.updateLayoutState(BasicListUI.java:1345)
	at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1288)
	at javax.swing.plaf.basic.BasicListUI.getPreferredSize(BasicListUI.java:560)
	at javax.swing.JComponent.getPreferredSize(JComponent.java:1627)
	at javax.swing.JList.getScrollableTracksViewportWidth(JList.java:2706)
	at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:786)
	at java.awt.Container.layout(Container.java:1432)
	at java.awt.Container.doLayout(Container.java:1421)
	at java.awt.Container.validateTree(Container.java:1519)
	at java.awt.Container.validate(Container.java:1491)
	at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:639)
[catch] at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:127)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
	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 16 nsegura3 2008-11-07 16:38:17 UTC
*** Issue 152467 has been marked as a duplicate of this issue. ***
Comment 17 Lukas Hasik 2008-12-04 13:40:14 UTC
is it still reproducible?

 nsegura3 , could you attach the file that you are able to reproduce it with?
Comment 18 Exceptions Reporter 2009-01-28 07:50:17 UTC
Reopening - reproduced in NetBeans IDE Dev (Build 200812180001)
http://statistics.netbeans.org/exceptions/detail.do?id=2458
Comment 19 Milan Kubec 2009-05-05 10:02:02 UTC
Setting model outside AWT was fixed in ActiveConfigAction (projectui). Other comments from exc. reporter show that the
problem (list manipulation outside of AWT) is also in other parts of IDE, reassigning to generic component.
Comment 20 Jindrich Sedek 2009-05-11 11:34:32 UTC
closing as fixed since the problem was fixed in projectui. Other cases will be reported as separate problem by 
exception reporter if it appears again.