You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by "Josh Adams (JIRA)" <ji...@apache.org> on 2019/04/23 12:36:00 UTC
[jira] [Assigned] (DAFFODIL-2083) abort in parser runtime -
invariant failed with dynamic separator test
[ https://issues.apache.org/jira/browse/DAFFODIL-2083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Josh Adams reassigned DAFFODIL-2083:
------------------------------------
Assignee: Josh Adams
> abort in parser runtime - invariant failed with dynamic separator test
> ----------------------------------------------------------------------
>
> Key: DAFFODIL-2083
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2083
> Project: Daffodil
> Issue Type: Bug
> Components: Back End
> Affects Versions: 2.3.0
> Reporter: Michael Beckerle
> Assignee: Josh Adams
> Priority: Major
> Fix For: 2.4.0
>
>
> This TDML contains a test named "nameDOB_test2".
> It is a test that uses an expression for dynamic computing the separator from the first part of the record.
> This test results in
> {code:java}
> org.apache.daffodil.exceptions.Abort: Invariant broken: MPState.this.delimitersLocalIndexStack.length.==(1)
> org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:129)
> org.apache.daffodil.processors.parsers.MPState.verifyFinalState(PState.scala:141)
> org.apache.daffodil.processors.parsers.PState.verifyFinalState(PState.scala:345)
> org.apache.daffodil.processors.DataProcessor.doParse(Runtime.scala:238){code}
> The TDML is:
> {code:java}
> <?xml version="1.0" encoding="UTF-8"?>
> <testSuite suiteName="NameDOB"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:fn="http://www.w3.org/2005/xpath-functions"
> xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/"
> xmlns:tdml="http://www.ibm.com/xmlns/dfdl/testData"
> xmlns:ex="http://example.com"
> defaultRoundTrip="onePass">
>
> <tdml:defineSchema name="test2" elementFormDefault="unqualified">
> <xs:include schemaLocation="org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd" />
> <dfdl:defineEscapeScheme name="eb1">
> <dfdl:escapeScheme
> escapeKind="escapeBlock"
> escapeBlockStart="""
> escapeBlockEnd='"'
> escapeEscapeCharacter='\'
> generateEscapeBlock="whenNeeded"
> extraEscapedCharacters=""
> />
> </dfdl:defineEscapeScheme>
> <dfdl:format ref="tns:GeneralFormat" escapeSchemeRef="tns:eb1"
> separator="" initiator=""
> terminator="" leadingSkip='0' textTrimKind="none" initiatedContent="no"
> alignment="implicit" alignmentUnits="bits" trailingSkip="0" ignoreCase="no"
> separatorPosition="infix" occursCountKind="implicit"
> emptyValueDelimiterPolicy="both" representation="text" textNumberRep="standard"
> lengthKind="delimited" encoding="ASCII" />
>
> <xs:element name="file2" dfdl:initiator="sep,last,middle,first,DOB%NL;%WSP*;">
> <xs:complexType>
> <xs:sequence dfdl:separator="%NL;" dfdl:separatorPosition="postfix">
> <xs:element name="record" maxOccurs="unbounded">
> <xs:complexType>
> <xs:sequence dfdl:separator="| // %HT; ,">
> <xs:element name="sep" type="xs:string"/>
> <xs:sequence dfdl:separator='{ ./sep }'>
> <xs:element name="lastName" type="xs:string" />
> <xs:element name="middleName" type="xs:string" />
> <xs:element name="firstName" type="xs:string" />
> <xs:element name="DOB" type="xs:date"
> dfdl:calendarPattern="MM/dd/yyyy"
> dfdl:calendarPatternKind="explicit"/>
> </xs:sequence>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
>
> </tdml:defineSchema>
>
> <tdml:parserTestCase name="nameDOB_test2" root="file2"
> model="test2"
> roundTrip="onePass">
> <tdml:document><![CDATA[sep,last,middle,first,DOB
> ,|"smith, jr.",robert,brandon,03/24/1988
> |,johnson|john|henry|01/23/1986
> [SEP],jones[SEP]arya[SEP]cat[SEP]02/19/1986
> ]]></tdml:document>
> <tdml:infoset>
> <tdml:dfdlInfoset>
> <ex:file2>
> <record>
> <lastName>smith, jr.</lastName>
> <middleName>robert</middleName>
> <firstName>brandon</firstName>
> <DOB>1988-03-24</DOB>
> </record>
> <record>
> <lastName>johnson</lastName>
> <middleName>john</middleName>
> <firstName>henry</firstName>
> <DOB>1986-01-23</DOB>
> </record>
> <record>
> <lastName>jones</lastName>
> <middleName>arya</middleName>
> <firstName>cat</firstName>
> <DOB>1986-02-19</DOB>
> </record>
> </ex:file2>
> </tdml:dfdlInfoset>
> </tdml:infoset>
> </tdml:parserTestCase>
>
>
> </testSuite>{code}
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)