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 168973 - [68cat] ArrayIndexOutOfBoundsException: 2
Summary: [68cat] ArrayIndexOutOfBoundsException: 2
Status: RESOLVED DUPLICATE of bug 195727
Alias: None
Product: platform
Classification: Unclassified
Component: Help System (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Victor Vasilyev
URL: http://statistics.netbeans.org/except...
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2009-07-22 14:33 UTC by Exceptions Reporter
Modified: 2011-06-09 16:10 UTC (History)
13 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 150368


Attachments
stacktrace (1.18 KB, text/plain)
2009-07-22 14:33 UTC, Exceptions Reporter
Details
stacktrace (1.14 KB, text/plain)
2009-07-29 00:35 UTC, vopisk
Details
stacktrace (1.18 KB, text/plain)
2009-08-14 10:13 UTC, pzajac
Details
stacktrace (1.18 KB, text/plain)
2009-09-03 18:33 UTC, matthies
Details
stacktrace (1.18 KB, text/plain)
2009-09-14 16:49 UTC, Jan Lahoda
Details
stacktrace (1.18 KB, text/plain)
2009-09-23 21:48 UTC, Michel Graciano
Details
stacktrace (1.18 KB, text/plain)
2009-09-25 16:59 UTC, Michel Graciano
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2009-07-22 14:33:49 UTC
Build: NetBeans IDE 6.7 (Build 200906241340)
VM: Java HotSpot(TM) Client VM, 14.0-b16, Java(TM) SE Runtime Environment, 1.6.0_14-b08
OS: Windows XP, 5.1, x86

User Comments:
chris_mcmillan: Unable to display help.

chrislundin: open help for JTextField - Properties - inputVerifier

jportway: openning help contents window



Stacktrace: 
java.lang.ArrayIndexOutOfBoundsException: 2
        at javax.swing.text.CompositeView.replace(CompositeView.java:170)
        at javax.swing.text.BoxView.replace(BoxView.java:164)
        at javax.swing.text.View.updateChildren(View.java:1095)
        at javax.swing.text.View.changedUpdate(View.java:761)
        at javax.swing.text.html.BlockView.changedUpdate(BlockView.java:324)
        at javax.swing.plaf.basic.BasicTextUI$RootView.changedUpdate(BasicTextUI.java:1618)
Comment 1 Exceptions Reporter 2009-07-22 14:33:58 UTC
Created attachment 85068 [details]
stacktrace
Comment 2 Exceptions Reporter 2009-07-22 14:34:21 UTC
This issue already has 6 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=150368
Comment 3 Alexei Mokeev 2009-07-28 12:39:28 UTC
Seems to be a valid issue, reproducible testcase required.
Comment 4 vopisk 2009-07-29 00:35:04 UTC
Build: NetBeans IDE 6.7 (Build 200906241340)
VM: Java HotSpot(TM) Client VM, 14.0-b16, Java(TM) SE Runtime Environment, 1.6.0_14-b08
OS: Windows XP, 5.1, x86

User Comments: 
Bringing up the help interface from the replace in projects window

Stacktrace: 
java.lang.ArrayIndexOutOfBoundsException: 2
        at javax.swing.text.CompositeView.replace(CompositeView.java:0)
        at javax.swing.text.BoxView.replace(BoxView.java:0)
        at javax.swing.text.View.updateChildren(View.java:0)
        at javax.swing.text.View.changedUpdate(View.java:0)
        at javax.swing.text.html.BlockView.changedUpdate(BlockView.java:0)
        at javax.swing.plaf.basic.BasicTextUI$RootView.changedUpdate(BasicTextUI.java:0)
Comment 5 vopisk 2009-07-29 00:35:08 UTC
Created attachment 85386 [details]
stacktrace
Comment 6 Exceptions Reporter 2009-07-29 00:35:13 UTC
This issue already has 7 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=150368
Comment 7 Exceptions Reporter 2009-08-12 18:02:15 UTC
This issue already has 8 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=150368
Comment 8 pzajac 2009-08-14 10:13:48 UTC
Build: NetBeans IDE 6.7 (Build 200906241340)
VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03
OS: Linux, 2.6.24-24-generic, i386

User Comments: 
random exception

Stacktrace: 
java.lang.ArrayIndexOutOfBoundsException: 2
        at javax.swing.text.CompositeView.replace(CompositeView.java:170)
        at javax.swing.text.BoxView.replace(BoxView.java:164)
        at javax.swing.text.View.updateChildren(View.java:1095)
        at javax.swing.text.View.changedUpdate(View.java:761)
        at javax.swing.text.html.BlockView.changedUpdate(BlockView.java:324)
        at javax.swing.plaf.basic.BasicTextUI$RootView.changedUpdate(BasicTextUI.java:1618)
Comment 9 pzajac 2009-08-14 10:13:52 UTC
Created attachment 86232 [details]
stacktrace
Comment 10 Exceptions Reporter 2009-08-14 10:13:57 UTC
This issue already has 9 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=150368
Comment 11 matthies 2009-09-03 18:33:34 UTC
Build: NetBeans IDE 6.7 (Build 200906241340)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
java.lang.ArrayIndexOutOfBoundsException: 2
        at javax.swing.text.CompositeView.replace(CompositeView.java:170)
        at javax.swing.text.BoxView.replace(BoxView.java:164)
        at javax.swing.text.View.updateChildren(View.java:1095)
        at javax.swing.text.View.changedUpdate(View.java:761)
        at javax.swing.text.html.BlockView.changedUpdate(BlockView.java:324)
        at javax.swing.plaf.basic.BasicTextUI$RootView.changedUpdate(BasicTextUI.java:1618)
Comment 12 matthies 2009-09-03 18:33:38 UTC
Created attachment 87083 [details]
stacktrace
Comment 13 Exceptions Reporter 2009-09-03 18:33:43 UTC
This issue already has 11 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=150368
Comment 14 Jan Lahoda 2009-09-14 16:49:50 UTC
Build: NetBeans IDE Dev (Build jet-main-1201-on-090908)
VM: Java HotSpot(TM) Client VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03
OS: Linux, 2.6.28-11-generic, i386

User Comments: 


Stacktrace: 
java.lang.ArrayIndexOutOfBoundsException: 2
        at javax.swing.text.CompositeView.replace(CompositeView.java:170)
        at javax.swing.text.BoxView.replace(BoxView.java:164)
        at javax.swing.text.View.updateChildren(View.java:1095)
        at javax.swing.text.View.changedUpdate(View.java:761)
        at javax.swing.text.html.BlockView.changedUpdate(BlockView.java:324)
        at javax.swing.plaf.basic.BasicTextUI$RootView.changedUpdate(BasicTextUI.java:1618)
Comment 15 Jan Lahoda 2009-09-14 16:49:54 UTC
Created attachment 87626 [details]
stacktrace
Comment 16 Exceptions Reporter 2009-09-14 16:50:00 UTC
This issue already has 12 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=150368
Comment 17 Michel Graciano 2009-09-23 21:48:23 UTC
Build: NetBeans IDE Dev (Build 200909221401)
VM: Java HotSpot(TM) Client VM, 14.2-b01, Java(TM) SE Runtime Environment, 1.6.0_16-b01
OS: Linux, 2.6.28-15-generic, i386

User Comments: 


Stacktrace: 
java.lang.ArrayIndexOutOfBoundsException: 2
        at javax.swing.text.CompositeView.replace(CompositeView.java:170)
        at javax.swing.text.BoxView.replace(BoxView.java:164)
        at javax.swing.text.View.updateChildren(View.java:1095)
        at javax.swing.text.View.changedUpdate(View.java:761)
        at javax.swing.text.html.BlockView.changedUpdate(BlockView.java:324)
        at javax.swing.plaf.basic.BasicTextUI$RootView.changedUpdate(BasicTextUI.java:1618)
Comment 18 Michel Graciano 2009-09-23 21:48:27 UTC
Created attachment 88237 [details]
stacktrace
Comment 19 Michel Graciano 2009-09-25 16:59:28 UTC
Build: NetBeans IDE Dev (Build 200909221401)
VM: Java HotSpot(TM) Client VM, 14.2-b01, Java(TM) SE Runtime Environment, 1.6.0_16-b01
OS: Linux, 2.6.28-15-generic, i386

User Comments: 
Openning Help Content dialog

Stacktrace: 
java.lang.ArrayIndexOutOfBoundsException: 2
        at javax.swing.text.CompositeView.replace(CompositeView.java:170)
        at javax.swing.text.BoxView.replace(BoxView.java:164)
        at javax.swing.text.View.updateChildren(View.java:1095)
        at javax.swing.text.View.changedUpdate(View.java:761)
        at javax.swing.text.html.BlockView.changedUpdate(BlockView.java:324)
        at javax.swing.plaf.basic.BasicTextUI$RootView.changedUpdate(BasicTextUI.java:1618)
Comment 20 Michel Graciano 2009-09-25 16:59:33 UTC
Created attachment 88376 [details]
stacktrace
Comment 21 Victor Vasilyev 2009-10-08 04:27:19 UTC
Unfortunately, I can't reproduce this random exception.

All the attached stack traces explain only that the issue is inside the Swing code when JEditorPane tries to read an
HTML document , but it doesn't contain any pointers to the NetBeans code where the issue might be fixed.

It is unclear which Document (i.e HTMLDocument) are used by the JEditorPane during reading to model the issue. Seems the
issue doesn't depend on InputStream (i.e. a page URL).

BTW there is a chance that the issue occurs against newly initialized HTMLDocument(see the method
JEditorPane.initializeModel(EditorKit kit, URL page) ). If so then it is a bug in either the Swing or the Java platform,
probably in the method HTMLDocument$HTMLReader.adjustEndElement() when added/removed model for HTML elements is
generated to be fired as an event of the changed update.
Of course, there is another scenario for this issue - broken added/removed model can be generated if there are uncaught
errors during reading the HTML file, e.g. as consequences of incorrect buffering or translation for a given encoding.

Hence, we need have more info about the issue and its environmental conditions.
Comment 22 Exceptions Reporter 2009-11-01 15:10:35 UTC
This issue already has 23 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=150368
Comment 23 Victor Vasilyev 2009-11-11 19:57:02 UTC
The statistical info (23 episodes) can't give us a chance to select common scenario to reproduce this issue. The exception has random nature. We need have intensive testing around this issue or wait some occasional info from our users. Another way is an investigation of changes in the code of the NetBeans that have been made before the first episode. All these approaches are extremely time-consuming.

I'll continue work in this area, but my opinion is the existing time frame up to the NB6.8 release is not enough to find a cause of this issue and fix it. 

I'll highly appreciate any ideas about possible solutions for this issue.
Comment 24 Exceptions Reporter 2009-11-13 01:13:34 UTC
This issue already has 24 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=150368
Comment 25 Victor Vasilyev 2009-11-13 10:19:51 UTC
Probably, this bug has a relation to the bug 176078
Comment 26 Victor Vasilyev 2010-02-09 11:17:56 UTC
To have progress in investigation of this bug I'd like to check that the JavaHelp code is always executed in the AWT thread. I hope  the assertion statements added by me will help to catch illegal situation.

http://hg.netbeans.org/main/rev/2be12a0d54f9

I'll close this bug until new events. 
Please, re-open it if events related to this bug will occur.
Comment 27 Quality Engineering 2010-02-10 02:22:49 UTC
Integrated into 'main-golden', will be available in build *201002100200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/2be12a0d54f9
User: Victor G. Vasilyev <vvg@netbeans.org>
Log: #168973 -  [68cat] ArrayIndexOutOfBoundsException: 2. Assertions for AWT thread are added.
Comment 28 Jesse Glick 2011-06-09 16:10:41 UTC
Clearly the fix did not help.

*** This bug has been marked as a duplicate of bug 195727 ***