Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-2673

enum no-match on unparsing causes Invariant Broken abort

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.2.1
    • 3.3.0
    • Back End, Unparsing
    • None

    Description

      Reproducible in mil-std-2045 public schema. 

      Just change the value of 

      <enumeration value="OK_6016F" dfdlx:repValues="6"/>

      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:

       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)

      Attachments

        Activity

          People

            mbeckerle Mike Beckerle
            mbeckerle Mike Beckerle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: