You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Mike Beckerle (Jira)" <ji...@apache.org> on 2022/03/13 21:16:00 UTC

[jira] [Created] (DAFFODIL-2673) enum no-match on unparsing causes Invariant Broken abort

Mike Beckerle created DAFFODIL-2673:
---------------------------------------

             Summary: enum no-match on unparsing causes Invariant Broken abort
                 Key: DAFFODIL-2673
                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2673
             Project: Daffodil
          Issue Type: Bug
          Components: Back End, Unparsing
    Affects Versions: 3.2.1
            Reporter: Mike Beckerle


Reproducible in mil-std-2045 public schema. 

Just change the value of 
{code:java}
<enumeration value="OK_6016F" dfdlx:repValues="6"/>{code}
to some other string, then run test

test_2045_D1_all_fields

(These are on mbeckerle's fork + pull request currently as of writing this. But will probably be merged before this gets attention.)

What is going on is that an array is iterating, an unparse fails because the string-to-int mapping for the enum fails.

This should fail the unparse, but not with an Invariant broken. 

I get this:
{code:java}
 Invariant broken: state.processorStatus.eq(org.apache.daffodil.processors.Success)
org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:137)
org.apache.daffodil.processors.unparsers.RepeatingChildUnparser.endArrayOrOptional(SequenceChildUnparsers.scala:110){code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)