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.
When trying to validate a large xml file, I get a IndexOutOfBounds exception: java.lang.IndexOutOfBoundsException: Invalid line index=18251 >= lineCount=1 at org.netbeans.editor.LineRootElement.getElement(LineRootElement.java:92) at org.openide.text.NbDocument$DocumentRenderer.run(NbDocument.java:645) at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1159) at org.openide.text.NbDocument$DocumentRenderer.renderToInt(NbDocument.java:621) at org.openide.text.NbDocument.findLineOffset(NbDocument.java:154) at org.openide.text.DocumentLine$Set.getCurrent(DocumentLine.java:998) at org.netbeans.modules.xml.core.actions.InputOutputReporter$Hyperlink.<init>(InputOutputReporter.java:280) at org.netbeans.modules.xml.core.actions.InputOutputReporter.display(InputOutputReporter.java:214) at org.netbeans.modules.xml.core.actions.InputOutputReporter.display(InputOutputReporter.java:185) at org.netbeans.modules.xml.core.actions.InputOutputReporter.receive(InputOutputReporter.java:112) at org.netbeans.spi.xml.cookies.SharedXMLSupport$Handler.fatalError(SharedXMLSupport.java:398) at org.netbeans.spi.xml.cookies.SharedXMLSupport$Handler.runtimeError(SharedXMLSupport.java:387) at org.netbeans.spi.xml.cookies.SharedXMLSupport$Handler.access$100(SharedXMLSupport.java:334) at org.netbeans.spi.xml.cookies.SharedXMLSupport.parse(SharedXMLSupport.java:230) at org.netbeans.spi.xml.cookies.SharedXMLSupport.validateXML(SharedXMLSupport.java:135) at org.netbeans.spi.xml.cookies.ValidateXMLSupport.validateXML(ValidateXMLSupport.java:56) at org.netbeans.modules.xml.tools.actions.ValidateAction$RunAction.run(ValidateAction.java:95) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:539) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:964) I'm attaching a zip file, containing both the xml file, and the xsd that validates it.
Created attachment 53935 [details] files used for validation
I'm using 6.0 on a windows vista. I tried twice 1) w/o opening the file, just right click and validate XMLL 2) opening the file and then right click and validate XML. In both cases it worked, please see attachment for output. In the first case, I'll admit, the IDE was unresponsive while trying to open the giant XML file.
Created attachment 53948 [details] validation output
Here is my system info: Product Version = NetBeans IDE 6.0 (Build 200711261600) Operating System = Windows Vista version 6.0 running on x86 Java; VM; Vendor = 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05; Sun Microsystems Inc. Whats yours?
I just ran it again on another comp, and got the same exception. This time, using windows XP, and NB 6.0 Beta 2. (The previous version I used was M10). Using Java 1.6.
Do you mind trying on NB6.0? It is officially released :).
System info: Product Version: NetBeans IDE 6.0 (Build 200711261600) Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119 System: Mac OS X version 10.5.1 running on i386; MacRoman; en_US (nb) Using the files provided I cannot reproduce the IOOB exception. After dismissing the warning about the size of the XML file, it did take some time to open and during that time, 1 of my 2 cores was pinned. After it opened, I got the same results as Sam. Just a note: the schema file opened right away, and if I validated the XML file without opening it I got the same validation results that I should.
Marking this as invalid, feel free to reopen if you disagree.