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

Abort: Invariant Broken on Encoding-dependent Alignment Tests

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • s10
    • s10
    • None

    Description

      According to the most recent spec changes, implicit alignment is encoding-dependent. I created two tests that reference elements with an encoding of utf-16be. I would expect the alignment to be 16 bits. These tests fail with the following error:

      [info] - test_implicitAlignmentUIntT2 *** FAILED ***
      [info] edu.illinois.ncsa.daffodil.exceptions.Abort: Invariant broken.
      [info] edu.illinois.ncsa.daffodil.exceptions.Assert$.abort(Assert.scala:87)
      [info] edu.illinois.ncsa.daffodil.exceptions.Assert$.invariant(Assert.scala:115)
      [info] edu.illinois.ncsa.daffodil.processors.DFDLJavaIOStreamDecoder$$anonfun$implRead$1.apply$mcV$sp(DFDLJavaIOStreamDecoder.scala:363)
      [info] scala.util.control.Breaks.breakable(Breaks.scala:39)
      [info] at edu.illinois.ncsa.daffodil.exceptions.Assert$.abort(Assert.scala:87)
      [info] at edu.illinois.ncsa.daffodil.exceptions.Assert$.invariant(Assert.scala:115)
      [info] at edu.illinois.ncsa.daffodil.processors.DFDLJavaIOStreamDecoder$$anonfun$implRead$1.apply$mcV$sp(DFDLJavaIOStreamDecoder.scala:363)
      [info] at scala.util.control.Breaks.breakable(Breaks.scala:39)
      [info] at edu.illinois.ncsa.daffodil.processors.DFDLJavaIOStreamDecoder.implRead(DFDLJavaIOStreamDecoder.scala:319)
      [info] at edu.illinois.ncsa.daffodil.processors.DFDLJavaIOStreamDecoder.read(DFDLJavaIOStreamDecoder.scala:245)
      [info] at edu.illinois.ncsa.daffodil.processors.DFDLJavaIOInputStreamReader.read(DFDLJavaIOInputStreamReader.scala:60)
      [info] at scala.collection.immutable.PagedSeq$$anonfun$fromReader$1.apply(PagedSeq.scala:87)
      [info] at scala.collection.immutable.PagedSeq$$anonfun$fromReader$1.apply(PagedSeq.scala:87)
      [info] at scala.collection.immutable.Page.addMore(PagedSeq.scala:256)
      [info] ...

      The tests are in implicitAlignmentUIntT2 and implicitAlignmentUShortT2 in following files:

      daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section12/aligned_data/Aligned_Data.tdml
      daffodil-test/src/test/scala-debug/edu/illinois/ncsa/daffodil/section12/aligned_data/TestAlignedDataDebug.scala
      daffodil-test/src/test/scala/edu/illinois/ncsa/daffodil/section12/aligned_data/TestAlignedData.scala

      Attachments

        Activity

          People

            daffodil-jchab Jessie Chab
            daffodil-jchab Jessie Chab
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: