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

NegativeArraySizeException when hexBinary has length > 1,073,741,823

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.4.0
    • 3.5.0
    • None
    • None

    Description

      The test data would have to be approved for release by DISA. The test data request form and information about the files to be requested can be provided upon request.

      The exact value that causes the abort is unclear, but the following large integers occur in the file as seen using DISA's CIVA NITF viewer:

      NITF header file length:  002203434188

      2 image segments each with length: 1101716399

       

      Exception in thread "main" org.apache.daffodil.exceptions.Abort: Invariant broken. Runtime.scala - Leaked exception: java.lang.NegativeArraySizeException
      java.lang.NegativeArraySizeException
              at org.apache.daffodil.util.Misc$.bytes2Hex(Misc.scala:313)
              at org.apache.daffodil.infoset.DISimple.dataValueAsString(InfosetImpl.scala:1348)
              at org.apache.daffodil.infoset.XMLTextInfosetOutputter.startSimple(XMLTextInfosetOutputter.scala:115)
              at org.apache.daffodil.japi.infoset.InfosetOutputterProxy.startSimple(Infoset.scala:480)
              at org.apache.daffodil.infoset.InfosetWalker.infosetWalkerStepMove(InfosetWalker.scala:455)
              at org.apache.daffodil.infoset.InfosetWalker.maybeDoStep(InfosetWalker.scala:297)
              at org.apache.daffodil.infoset.InfosetWalker.walk(InfosetWalker.scala:270)
              at org.apache.daffodil.processors.parsers.SequenceParserBase.parse(SequenceParserBases.scala:368)
              at org.apache.daffodil.processors.parsers.Parser.parse1(Parser.scala:82)
              at org.apache.daffodil.processors.parsers.Parser.parse1$(Parser.scala:76)
              at org.apache.daffodil.processors.parsers.CombinatorParser.parse1(Parser.scala:161)
              at org.apache.daffodil.processors.parsers.ElementParserBase.parse(ElementCombinator1.scala:135)
              at org.apache.daffodil.processors.parsers.Parser.parse1(Parser.scala:82)
              at org.apache.daffodil.processors.parsers.Parser.parse1$(Parser.scala:76)
              at org.apache.daffodil.processors.parsers.CombinatorParser.parse1(Parser.scala:161)
              at org.apache.daffodil.processors.parsers.Unseparated.parseOne(UnseparatedSequenceParsers.scala:29)
              at org.apache.daffodil.processors.parsers.Unseparated.parseOne$(UnseparatedSequenceParsers.scala:27)
              at org.apache.daffodil.processors.parsers.ScalarOrderedUnseparatedSequenceChildParser.parseOne(UnseparatedSequenceParsers.scala:37)
              at org.apache.daffodil.processors.parsers.SequenceParserBase.parseOneInstanceWithMaybePoU(SequenceParserBases.scala:438)
              at org.apache.daffodil.processors.parsers.SequenceParserBase.parseOneInstance(SequenceParserBases.scala:423)
              at org.apache.daffodil.processors.parsers.SequenceParserBase.parse(SequenceParserBases.scala:266)
              at org.apache.daffodil.processors.parsers.Parser.parse1(Parser.scala:82)
              at org.apache.daffodil.processors.parsers.Parser.parse1$(Parser.scala:76)

              at org.apache.daffodil.processors.parsers.CombinatorParser.parse1(Parser.scala:161)
              at org.apache.daffodil.processors.parsers.SpecifiedLengthParserBase.parse(SpecifiedLengthParsers.scala:76)
              at org.apache.daffodil.processors.parsers.Parser.parse1(Parser.scala:82)
              at org.apache.daffodil.processors.parsers.Parser.parse1$(Parser.scala:76)
              at org.apache.daffodil.processors.parsers.CombinatorParser.parse1(Parser.scala:161)
              at org.apache.daffodil.processors.parsers.ElementParserBase.parse(ElementCombinator1.scala:135)
              at org.apache.daffodil.processors.parsers.Parser.parse1(Parser.scala:82)
              at org.apache.daffodil.processors.parsers.Parser.parse1$(Parser.scala:76)
              at org.apache.daffodil.processors.parsers.CombinatorParser.parse1(Parser.scala:161)
              at org.apache.daffodil.processors.parsers.Unseparated.parseOne(UnseparatedSequenceParsers.scala:29)
              at org.apache.daffodil.processors.parsers.Unseparated.parseOne$(UnseparatedSequenceParsers.scala:27)
              at org.apache.daffodil.processors.parsers.ScalarOrderedUnseparatedSequenceChildParser.parseOne(UnseparatedSequenceParsers.scala:37)
              at org.apache.daffodil.processors.parsers.SequenceParserBase.parseOneInstanceWithMaybePoU(SequenceParserBases.scala:438)
              at org.apache.daffodil.processors.parsers.SequenceParserBase.parseOneInstance(SequenceParserBases.scala:423)
              at org.apache.daffodil.processors.parsers.SequenceParserBase.parse(SequenceParserBases.scala:266)
              at org.apache.daffodil.processors.parsers.Parser.parse1(Parser.scala:82)
              at org.apache.daffodil.processors.parsers.Parser.parse1$(Parser.scala:76)
              at org.apache.daffodil.processors.parsers.CombinatorParser.parse1(Parser.scala:161)
              at org.apache.daffodil.processors.parsers.ElementParserBase.parse(ElementCombinator1.scala:135)
              at org.apache.daffodil.processors.parsers.Parser.parse1(Parser.scala:82)
              at org.apache.daffodil.processors.parsers.Parser.parse1$(Parser.scala:76)
              at org.apache.daffodil.processors.parsers.CombinatorParser.parse1(Parser.scala:161)
              at org.apache.daffodil.processors.parsers.Unseparated.parseOne(UnseparatedSequenceParsers.scala:29)
              at org.apache.daffodil.processors.parsers.Unseparated.parseOne$(UnseparatedSequenceParsers.scala:27)
              at org.apache.daffodil.processors.parsers.RepOrderedExpressionOccursCountUnseparatedSequenceChildParser.parseOne(UnseparatedSequenceParsers.scala:55)
              at org.apache.daffodil.processors.parsers.SequenceParserBase.parseOneInstanceWithMaybePoU(SequenceParserBases.scala:438)
              at org.apache.daffodil.processors.parsers.SequenceParserBase.parseOneInstance(SequenceParserBases.scala:423)
              at org.apache.daffodil.processors.parsers.SequenceParserBase.parse(SequenceParserBases.scala:158)
              at org.apache.daffodil.processors.parsers.Parser.parse1(Parser.scala:82)

              at org.apache.daffodil.processors.parsers.Parser.parse1$(Parser.scala:76)
              at org.apache.daffodil.processors.parsers.CombinatorParser.parse1(Parser.scala:161)
              at org.apache.daffodil.processors.parsers.ElementParserBase.parse(ElementCombinator1.scala:135)
              at org.apache.daffodil.processors.parsers.Parser.parse1(Parser.scala:82)
              at org.apache.daffodil.processors.parsers.Parser.parse1$(Parser.scala:76)
              at org.apache.daffodil.processors.parsers.CombinatorParser.parse1(Parser.scala:161)
              at org.apache.daffodil.processors.DataProcessor.doParse(DataProcessor.scala:503)
              at org.apache.daffodil.processors.DataProcessor.parse(DataProcessor.scala:447)
              at org.apache.daffodil.japi.DataProcessor.parse(Daffodil.scala:812)

      Attachments

        Activity

          People

            Unassigned Unassigned
            lblatchford Lara Blatchford
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: