Bug #2271
closedAIOOBE with large xml file
100%
Description
Hi,
Saxon gives me an array index out of bounds when I try to process a large file and this happens even with an empty stylesheet. I can understand that it wouldn't work, but with an exception saying out of memory, but not AIOOBE.
I'm using Saxon 9.6.0.3 (I tried with some older versions, same problem) with java 1.8.0_25:
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
Below is the trace.
All the best,
Tomaž
PS: I can send the file if it would help.
$ du -h blog.bug.xml
2,8G blog.bug.xml
$ java -jar /usr/local/bin/saxon9he.jar -xsl:empty.xsl blog.bug.xml > bug.vert
java.lang.ArrayIndexOutOfBoundsException: -32768
at net.sf.saxon.tree.tiny.LargeStringBuffer.append(LargeStringBuffer.java:90)
at net.sf.saxon.tree.tiny.TinyTree.appendChars(TinyTree.java:405)
at net.sf.saxon.tree.tiny.TinyBuilder.makeTextNode(TinyBuilder.java:380)
at net.sf.saxon.tree.tiny.TinyBuilder.characters(TinyBuilder.java:362)
at net.sf.saxon.event.ReceivingContentHandler.flush(ReceivingContentHandler.java:544)
at net.sf.saxon.event.ReceivingContentHandler.endElement(ReceivingContentHandler.java:435)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2973)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:440)
at net.sf.saxon.event.Sender.send(Sender.java:171)
at net.sf.saxon.Controller.transform(Controller.java:1690)
at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:547)
at net.sf.saxon.Transform.processFile(Transform.java:1056)
at net.sf.saxon.Transform.doTransform(Transform.java:659)
at net.sf.saxon.Transform.main(Transform.java:80)
Fatal error during transformation: java.lang.ArrayIndexOutOfBoundsException: -32768
Please register to edit this issue