You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Nick Burch (JIRA)" <ji...@apache.org> on 2013/02/04 17:56:12 UTC
[jira] [Commented] (TIKA-1070) StackOverflow error in
org.apache.tika.sax.ToXMLContentHandler$ElementInfo.getPrefix(ToXMLContentHandler.java:58)
[ https://issues.apache.org/jira/browse/TIKA-1070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13570385#comment-13570385 ]
Nick Burch commented on TIKA-1070:
----------------------------------
As Jukka wrote most of this, we should probably let him sanity check the proposed fix. I think he'll hopefully be back around again within a few weeks, but please ping us if you've not heard back by then and someone else will try to review!
> StackOverflow error in org.apache.tika.sax.ToXMLContentHandler$ElementInfo.getPrefix(ToXMLContentHandler.java:58)
> -----------------------------------------------------------------------------------------------------------------
>
> Key: TIKA-1070
> URL: https://issues.apache.org/jira/browse/TIKA-1070
> Project: Tika
> Issue Type: Bug
> Components: parser
> Affects Versions: 1.2, 1.3
> Environment: Java
> Reporter: Dietmar Glachs
>
> The error occurs when parsing big "XLS" files and is caused by the ElementInfo stored in "currentElement".
> Each time a new element is started (method startElement) the current elment is newly overwritten with
> currentElement = new ElementInfo(currentElement, namespaces);
> where the existing element is used as the parent element. Since the currentElement is not reset to the parent element after finishing the element (method: endElement) the method getPrefix recursively traverses the parents and finally causes the StackOverFlowError
> For my understanding: something like:
> currentElement = currentElement.parent;
> in the endElement method solves the issue!
> Best
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira