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 123549 - Failure to validate large xml files
Summary: Failure to validate large xml files
Status: RESOLVED INVALID
Alias: None
Product: xml
Classification: Unclassified
Component: Validation (show other bugs)
Version: 6.x
Hardware: Sun Solaris
: P3 blocker (vote)
Assignee: Samaresh Panda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-06 09:55 UTC by avizohary
Modified: 2008-01-08 22:24 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
files used for validation (618.75 KB, application/x-compressed)
2007-12-06 09:57 UTC, avizohary
Details
validation output (6.16 KB, text/plain)
2007-12-06 14:53 UTC, Samaresh Panda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description avizohary 2007-12-06 09:55:38 UTC
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.
Comment 1 avizohary 2007-12-06 09:57:34 UTC
Created attachment 53935 [details]
files used for validation
Comment 2 Samaresh Panda 2007-12-06 14:45:39 UTC
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.
Comment 3 Samaresh Panda 2007-12-06 14:53:41 UTC
Created attachment 53948 [details]
validation output
Comment 4 Samaresh Panda 2007-12-06 15:07:31 UTC
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?
Comment 5 avizohary 2007-12-06 15:45:08 UTC
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.
Comment 6 Samaresh Panda 2007-12-06 16:26:06 UTC
Do you mind trying on NB6.0? It is officially released :).
Comment 7 tonybeckham 2007-12-07 00:00:49 UTC
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.
Comment 8 Samaresh Panda 2008-01-08 22:24:43 UTC
Marking this as invalid, feel free to reopen if you disagree.