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 242301

Summary: ArrayIndexOutOfBoundsException in Output Windows
Product: platform Reporter: scanti <scanti>
Component: Output WindowAssignee: Jaroslav Havlin <jhavlin>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

Description scanti 2014-02-24 21:31:35 UTC
We are developing an RCP Application based on NB7.4 a colleague of mine got the following exception: 

java.lang.ArrayIndexOutOfBoundsException: List contains 2097168 items, but tried to fetch item 4194299
	at org.netbeans.core.output2.IntList.get(IntList.java:97)
	at org.netbeans.core.output2.AbstractLines.getByteLineStart(AbstractLines.java:415)
	at org.netbeans.core.output2.AbstractLines.getCharLineStart(AbstractLines.java:419)
	at org.netbeans.core.output2.AbstractLines.getLineStart(AbstractLines.java:408)
	at org.netbeans.core.output2.OutputDocument.stateChanged(OutputDocument.java:481)
	at org.netbeans.core.output2.AbstractLines.run(AbstractLines.java:280)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$200(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

The output windows was used to show the output of a programm running. the output was colored and it was very big.
Comment 1 Jaroslav Havlin 2014-02-25 07:11:23 UTC
I'm sorry, I cannot reproduce this bug. Can you please attach IDE Log, or a test case that produces output that causes this problem?
Thank you.
Comment 2 scanti 2014-06-10 21:16:30 UTC
Sorry It happened to a colleague of mine once and we cannot reproduce it either.
We are running an NetBeans based RCP, we use the Output TopComponent to show the output of a running executable
Comment 3 Jaroslav Havlin 2014-06-20 07:53:38 UTC
http://hg.netbeans.org/core-main/rev/287b010a9d97

It seems that the output was truncated while the document was being updated, right after the number of lines was retrieved, but before the start of the last line was read (so the values were inconsistent).

Thank you for reporting.
Comment 4 Quality Engineering 2014-06-21 04:40:31 UTC
Integrated into 'main-silver', will be available in build *201406210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/287b010a9d97
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #242301: ArrayIndexOutOfBoundsException in Output Window