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

Computing the diff of large XML results in a stack overflow

    XMLWordPrintableJSON

Details

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

    Description

      We changed how we compare expected and actual infosets to always use computeDiffOne. However, for very large XML it results in the following stack overflow:

      [error]     at java.lang.String.valueOf(String.java:2994)
      [error]     at scala.collection.mutable.StringBuilder.append(StringBuilder.scala:200)
      [error]     at scala.collection.TraversableOnce.$anonfun$addString$1(TraversableOnce.scala:359)
      [error]     at scala.collection.immutable.List.foreach(List.scala:389)
      [error]     at scala.collection.TraversableOnce.addString(TraversableOnce.scala:357)
      [error]     at scala.collection.TraversableOnce.addString$(TraversableOnce.scala:353)
      [error]     at scala.collection.AbstractTraversable.addString(Traversable.scala:104)
      [error]     at scala.collection.TraversableOnce.mkString(TraversableOnce.scala:323)
      [error]     at scala.collection.TraversableOnce.mkString$(TraversableOnce.scala:322)
      [error]     at scala.collection.AbstractTraversable.mkString(Traversable.scala:104)
      [error]     at scala.collection.TraversableOnce.mkString(TraversableOnce.scala:325)
      [error]     at scala.collection.TraversableOnce.mkString$(TraversableOnce.scala:325)
      [error]     at scala.collection.AbstractTraversable.mkString(Traversable.scala:104)
      [error]     at org.apache.daffodil.xml.XMLUtils$.zPath$lzycompute$1(XMLUtils.scala:784)
      [error]     at org.apache.daffodil.xml.XMLUtils$.zPath$1(XMLUtils.scala:784)
      [error]     at org.apache.daffodil.xml.XMLUtils$.computeDiffOne(XMLUtils.scala:833)
      [error]     at org.apache.daffodil.xml.XMLUtils$.computeDiffOne(XMLUtils.scala:825)
      [error]     at org.apache.daffodil.xml.XMLUtils$.computeDiffOne(XMLUtils.scala:826)
      [error]     at org.apache.daffodil.xml.XMLUtils$.computeDiffOne(XMLUtils.scala:826)
      ...
      

      This causes tests on existing real world schemas to fail during TDML testing.

      Attachments

        Activity

          People

            slawrence Steve Lawrence
            slawrence Steve Lawrence
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: