You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Steve Lawrence (Jira)" <ji...@apache.org> on 2021/01/19 15:11:00 UTC

[jira] [Resolved] (DAFFODIL-2455) Large CSV file causes "Attempting to backtrack too far" exception

     [ https://issues.apache.org/jira/browse/DAFFODIL-2455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Lawrence resolved DAFFODIL-2455.
--------------------------------------
    Resolution: Fixed

Fixed in commit 40c8b799d68c94545f5a2ddc9c8753986cd168e1

> Large CSV file causes "Attempting to backtrack too far" exception
> -----------------------------------------------------------------
>
>                 Key: DAFFODIL-2455
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2455
>             Project: Daffodil
>          Issue Type: Bug
>            Reporter: Steve Lawrence
>            Assignee: Steve Lawrence
>            Priority: Major
>             Fix For: 3.1.0
>
>
> A user reports that they have an ~800MB CSV file and a schema to parse that file that looks something like this:
> {code:xml}
>   <xs:element name="file">
>     <xs:complexType>
>       <xs:sequence dfdl:separator="%NL;" dfdl:separatorPosition="postfix">
>         <xs:element name="row" maxOccurs="unbounded">
>           <xs:complexType>
>             <xs:sequence dfdl:separator=",">
>               <xs:element name="field1" type="xs:string"/>
>               <xs:element name="field2" type="xs:string"/>
>               ...
>               <xs:element name="fieldN" type="xs:string"/>
>             </xs:sequence>
>           </xs:complexType>
>         </xs:element>
>       </xs:sequence>
>     </xs:complexType>
>   </xs:element>
> {code}
> Parsing this large file fails with the exception:
> {quote}[error] Runtime Schema Definition Error: Attempted to backtrack too far: Attempted to backtrack to byte 268427263, which exceeds maximum backtrack length of 268435456
> {quote}
> This schema does not require any backtracking, so shouldn't be hitting this issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)