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.
Hi! Good day! Got this exception while I edit jsp files. Thanks and more power, Allen Montejo SEVERE java.lang.ArrayIndexOutOfBoundsException: 12 at org.netbeans.lib.editor.util.GapList.get(GapList.java:459) at org.netbeans.modules.editor.fold.FoldChildren.getFold(FoldChildren.java:106) at org.netbeans.api.editor.fold.Fold.getFold(Fold.java:322) at org.netbeans.api.editor.fold.Fold.replaceByChildren(Fold.java:373) at org.netbeans.api.editor.fold.FoldHierarchy$ApiPackageAccessorImpl.foldReplaceByChildren (FoldHierarchy.java:379) at org.netbeans.modules.editor.fold.FoldHierarchyTransactionImpl.removeFoldFromHierarchy (FoldHierarchyTransactionImpl.java:831) at org.netbeans.modules.editor.fold.FoldHierarchyTransactionImpl.removeOverlap (FoldHierarchyTransactionImpl.java:821) at org.netbeans.modules.editor.fold.FoldHierarchyTransactionImpl.addFold(FoldHierarchyTransactionImpl.java:699) at org.netbeans.modules.editor.fold.FoldHierarchyTransactionImpl.addFold(FoldHierarchyTransactionImpl.java:498) at org.netbeans.modules.editor.fold.FoldHierarchyExecution.add(FoldHierarchyExecution.java:354) at org.netbeans.modules.editor.fold.FoldOperationImpl.addToHierarchy(FoldOperationImpl.java:184) at org.netbeans.spi.editor.fold.FoldOperation.addToHierarchy(FoldOperation.java:137) at org.netbeans.modules.web.core.syntax.folding.JspFoldManager$2.run(JspFoldManager.java:472) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199) 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) Caused: java.lang.reflect.InvocationTargetException at java.awt.EventQueue.invokeAndWait(EventQueue.java:997) at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1323) [catch] at org.netbeans.modules.web.core.syntax.folding.JspFoldManager.updateFolds(JspFoldManager.java:425) at org.netbeans.modules.web.core.syntax.folding.JspFoldManager.access$100(JspFoldManager.java:55) at org.netbeans.modules.web.core.syntax.folding.JspFoldManager$1$1.run(JspFoldManager.java:118) at java.lang.Thread.run(Thread.java:619) classLoader = org.netbeans.modules.web.jspparser_ext.WebAppParseSupport$ParserClassLoader@528627, parent : org.netbeans.modules.web.jspparser.JspParserImpl$ExtClassLoader@27aaf0 SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@1efc193 INFO [org.netbeans.modules.j2ee.deployment.impl.ServerInstance]: DebuggerInfo cannot be found for: Tomcat 6.0 classLoader = org.netbeans.modules.web.jspparser_ext.WebAppParseSupport$ParserClassLoader@782787, parent : org.netbeans.modules.web.jspparser.JspParserImpl$ExtClassLoader@27aaf0 SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@1efc193 classLoader = org.netbeans.modules.web.jspparser_ext.WebAppParseSupport$ParserClassLoader@529b10, parent : org.netbeans.modules.web.jspparser.JspParserImpl$ExtClassLoader@27aaf0 SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@1efc193 classLoader = org.netbeans.modules.web.jspparser_ext.WebAppParseSupport$ParserClassLoader@bfa472, parent : org.netbeans.modules.web.jspparser.JspParserImpl$ExtClassLoader@27aaf0 SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@1efc193
Seems to be a bug in the folding infrastructure. Any way to reproduce it?
alcmontejo, is this reproducible or does it just happen randomly?
Hi vstejskal, I try to reproduce it, but it seems that I cannot make it out, I gues this just happen randomly. Thanks, Allen Montejo
Thanks!
*** Issue 150429 has been marked as a duplicate of this issue. ***
Build: NetBeans IDE Dev (Build 200904160201) VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03 OS: Windows Vista, 6.0, x86 User Comments: Editing javascript within JSP. Stacktrace: java.lang.ArrayIndexOutOfBoundsException: 25 at org.netbeans.lib.editor.util.GapList.get(GapList.java:459) at org.netbeans.modules.editor.fold.FoldChildren.getFold(FoldChildren.java:106) at org.netbeans.api.editor.fold.Fold.getFold(Fold.java:322) at org.netbeans.modules.editor.fold.FoldUtilitiesImpl.findFoldEndIndex(FoldUtilitiesImpl.java:154) at org.netbeans.modules.editor.fold.FoldUtilitiesImpl.findNearestFold(FoldUtilitiesImpl.java:245) at org.netbeans.api.editor.fold.FoldUtilities.findNearestFold(FoldUtilities.java:382)
Created attachment 80338 [details] stacktrace
Marek, these are yours now ...
Created attachment 90665 [details] stacktrace
Created attachment 92002 [details] stacktrace
Created attachment 92641 [details] stacktrace Editing a JSP page (started to comment out something using <%--).
Created attachment 96828 [details] stacktrace Editing a JSP file.
Created attachment 96829 [details] stacktrace Editing JSP file.
Created attachment 98074 [details] stacktrace
> 100 reports ... reported against NB 6.9 as well
I will have a look.
Passing to Mila as we need the real expert to check this.
Since this is a random problem I'll write random tests for fold hierarchy testing and see whether I'll be able to reproduce the problem. If that would not help I would at least add some better diagnostics when the AIOOBE is to be thrown.
I have written a random test and added some asserts which revealed a particular problem that I've fixed. However I'm not 100% sure whether this problem was caused exactly by the thing that was fixed. Anyway I've added a diagnostics dumping of fold hierarchy at the place where original AIOOBE was thrown so this particular exception will no longer be thrown. Marking as fixed. http://hg.netbeans.org/jet-main/rev/b0d3aa85af60
Integrated into 'main-golden', will be available in build *201005112200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/ User: Log: