Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-1366

General back end parsed-length of children greater than parent.

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.0.0
    • 2.0.0
    • Back End
    • None

      Right now there are two back-ends. The "General" one used for mixed text and binary data, and the "text-only" one used for cases where the schema is text-only, in a uniform well-known encoding, and encodingErrorPolicy='replace'.

      Their behavior for text-only data should be identical. But it is not.

      If we turn off the optimization, three tests fail, meaning that there is a bug in the general purpose back end, that doesn't exist in the text-only back end.

      Tests could be created that exercise this same behavior, but not in a way that can use the text-only back-end (like having a binary element anywhere). Such tests would fail.

      scala (5)
      edu.illinois.ncsa.daffodil.section12.lengthKind.TestLengthKindExplicit
      test_ExplicitLengthChildLengthMoreParent_Chars(edu.illinois.ncsa.daffodil.section12.lengthKind.TestLengthKindExplicit)
      edu.illinois.ncsa.daffodil.tdml.TDMLException: Did not find diagnostic message "Insufficient bits" in any of the actual diagnostic messages:
      Parse Error: Failed to populate ex:e3[1]. Expected 3 item(s).
      Schema context: element.e3 Location line 180 column 22 in file:/tmp/test_ExplicitLengthChildLengthLessParent1604076915274404621.dfdl.xsd
      Data location was preceding byte 9
      UTF-8 text starting at byte 8 is: (9012345678901234567890)
      Data (hex) starting at byte 8 is: (0x39303132333435363738393031323334353637383930)
      Parse Error: The parsed length of the children (72 bits) was greater than that of the parent (64 bits).
      Schema context: element.e3 Location line 180 column 22 in file:/tmp/test_ExplicitLengthChildLengthLessParent1604076915274404621.dfdl.xsd(no data location)

      edu.illinois.ncsa.daffodil.section12.lengthKind.TestLengthKindPattern
      test_LengthKindPatternCompound(edu.illinois.ncsa.daffodil.section12.lengthKind.TestLengthKindPattern)
      Parse Error: The parsed length of the children (72 bits) was greater than that of the parent (64 bits).
      Schema context: element.ab Location line 111 column 12 in file:/tmp/DFDL-207-Embedded.dfdl.xsd400967456646118611.dfdl.xsd(no data location)

      test_LengthKindPatternCompound2(edu.illinois.ncsa.daffodil.section12.lengthKind.TestLengthKindPattern)
      Parse Error: The parsed length of the children (72 bits) was greater than that of the parent (64 bits).
      Schema context: element.ab Location line 133 column 12 in file:/tmp/DFDL-207-Embedded.dfdl.xsd4204951744923457623.dfdl.xsd(no data location)

              jchab Jessie Chab
              mbeckerle.dfdl Mike Beckerle
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: