You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@daffodil.apache.org by Attila Horvath <at...@gmail.com> on 2022/04/14 15:23:36 UTC

2.4 unparse "bug"

ALCON

I suspect this unparse bug w/ Daffodil 2.4 has since been fixed. Parsing is
successful. Details as follows:

 daffodil unparse --validate=on -s ... -r ... -o ...

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!   An unexpected exception occurred. This is a bug!   !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 Please report this bug and help us fix it:

  https://daffodil.apache.org/community/#issue-tracker

 Please include the following exception, the command you
 ran, and any input, schema, or tdml files used that led
 to this bug.


org.apache.daffodil.exceptions.Abort: Invariant broken. Single suspended
expression making no forward progress.
SuppressableSeparatorUnparserSuspendableOperation for Miscellanea
org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:129)
org.apache.daffodil.exceptions.Assert$.invariantFailed(Assert.scala:175)
org.apache.daffodil.processors.unparsers.UStateMain.evalSuspensions(UState.scala:603)
org.apache.daffodil.processors.DataProcessor.unparse(DataProcessor.scala:305)
        at org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:129)
        at
org.apache.daffodil.exceptions.Assert$.invariantFailed(Assert.scala:175)
        at
org.apache.daffodil.processors.unparsers.UStateMain.evalSuspensions(UState.scala:603)
        at
org.apache.daffodil.processors.DataProcessor.unparse(DataProcessor.scala:305)
        at org.apache.daffodil.Main$.$anonfun$run$15(Main.scala:1135)
        at org.apache.daffodil.util.Timer$.getTimeResult(Timer.scala:76)
        at org.apache.daffodil.util.Timer$.getResult(Timer.scala:35)
        at org.apache.daffodil.Main$.run(Main.scala:1135)
        at org.apache.daffodil.Main$.main(Main.scala:1363)
        at org.apache.daffodil.Main.main(Main.scala)

'Miscellanea' referenced above is simply:

<xs:complexType name="Miscellanea">
<xs:sequence>
<xs:element name="value">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value=".*"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>

It occurs when encountering an empty line/record when using
"dfdl:separatorPosition="postfix"

<xs:complexType name="MU14Type">
<xs:sequence dfdl:separator="%LF;" dfdl:separatorPosition="postfix">
:::
</xs:sequence>
</xs:complexType>

Let me know if more information required.

Thx - Attila

Re: 2.4 unparse "bug"

Posted by Steve Lawrence <sl...@apache.org>.
My guess is you are running into DAFODIL-2431, which was fixed in 
version 3.1.0:

https://issues.apache.org/jira/browse/DAFFODIL-2431

- Steve

On 4/14/22 11:23 AM, Attila Horvath wrote:
> ALCON
> 
> I suspect this unparse bug w/ Daffodil 2.4 has since been fixed. Parsing is
> successful. Details as follows:
> 
>   daffodil unparse --validate=on -s ... -r ... -o ...
> 
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> !!   An unexpected exception occurred. This is a bug!   !!
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> 
>   Please report this bug and help us fix it:
> 
>    https://daffodil.apache.org/community/#issue-tracker
> 
>   Please include the following exception, the command you
>   ran, and any input, schema, or tdml files used that led
>   to this bug.
> 
> 
> org.apache.daffodil.exceptions.Abort: Invariant broken. Single suspended
> expression making no forward progress.
> SuppressableSeparatorUnparserSuspendableOperation for Miscellanea
> org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:129)
> org.apache.daffodil.exceptions.Assert$.invariantFailed(Assert.scala:175)
> org.apache.daffodil.processors.unparsers.UStateMain.evalSuspensions(UState.scala:603)
> org.apache.daffodil.processors.DataProcessor.unparse(DataProcessor.scala:305)
>          at org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:129)
>          at
> org.apache.daffodil.exceptions.Assert$.invariantFailed(Assert.scala:175)
>          at
> org.apache.daffodil.processors.unparsers.UStateMain.evalSuspensions(UState.scala:603)
>          at
> org.apache.daffodil.processors.DataProcessor.unparse(DataProcessor.scala:305)
>          at org.apache.daffodil.Main$.$anonfun$run$15(Main.scala:1135)
>          at org.apache.daffodil.util.Timer$.getTimeResult(Timer.scala:76)
>          at org.apache.daffodil.util.Timer$.getResult(Timer.scala:35)
>          at org.apache.daffodil.Main$.run(Main.scala:1135)
>          at org.apache.daffodil.Main$.main(Main.scala:1363)
>          at org.apache.daffodil.Main.main(Main.scala)
> 
> 'Miscellanea' referenced above is simply:
> 
> <xs:complexType name="Miscellanea">
> <xs:sequence>
> <xs:element name="value">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:pattern value=".*"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> 
> It occurs when encountering an empty line/record when using
> "dfdl:separatorPosition="postfix"
> 
> <xs:complexType name="MU14Type">
> <xs:sequence dfdl:separator="%LF;" dfdl:separatorPosition="postfix">
> :::
> </xs:sequence>
> </xs:complexType>
> 
> Let me know if more information required.
> 
> Thx - Attila
>