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

CLI Debugger: NoSuchElementException with occursBounds

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0
    • Component/s: CLI, Debugger
    • Labels:
      None

      Description

      If you set a display for occursBounds, and step through, it is possible to get an exception if you're not currently in a part of the parse where the item is relevant (i think):

      [dfdl] (0.14.0)$ echo "0,1,2,3,4,5,6,7,8" > input.txt
      [dfdl] (0.14.0)$ ./daffodil-cli/target/start -d parse -s daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/entities/charClassEntities.dfdl.xsd -r matrix input.txt
      (debug) display info oc
      (debug) s

      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      !! An unexpected exception occurred. This is a bug! !!
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

      Please report this bug and help us fix it:

      https://opensource.ncsa.illinois.edu/confluence/display/DFDL/How+to+Report+a+Bug

      Please include the following exception, the command you
      ran, and any input, schema, or tdml files used that led
      to this bug.

      java.util.NoSuchElementException: head of empty list
      at scala.collection.immutable.Nil$.head(List.scala:337)
      at scala.collection.immutable.Nil$.head(List.scala:334)
      at scala.collection.mutable.Stack.top(Stack.scala:131)
      at edu.illinois.ncsa.daffodil.processors.MPState.occursBounds(PState.scala:91)
      at edu.illinois.ncsa.daffodil.debugger.InteractiveDebugger$DebugCommandBase$Info$InfoOccursBounds$.apply(InteractiveDebugger.scala:1295)
      at edu.illinois.ncsa.daffodil.debugger.InteractiveDebugger$DebugCommandBase$Info$$anonfun$apply$8.apply(InteractiveDebugger.scala:1003)
      at edu.illinois.ncsa.daffodil.debugger.InteractiveDebugger$DebugCommandBase$Info$$anonfun$apply$8.apply(InteractiveDebugger.scala:1001)
      at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
      at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:34)
      at edu.illinois.ncsa.daffodil.debugger.InteractiveDebugger$DebugCommandBase$Info$.apply(InteractiveDebugger.scala:1001)
      at edu.illinois.ncsa.daffodil.debugger.InteractiveDebugger$DebugCommandBase$.apply(InteractiveDebugger.scala:442)
      at edu.illinois.ncsa.daffodil.debugger.InteractiveDebugger.edu$illinois$ncsa$daffodil$debugger$InteractiveDebugger$$runCommand(InteractiveDebugger.scala:277)
      at edu.illinois.ncsa.daffodil.debugger.InteractiveDebugger$$anonfun$after$1$$anonfun$apply$mcV$sp$3.apply(InteractiveDebugger.scala:170)
      at edu.illinois.ncsa.daffodil.debugger.InteractiveDebugger$$anonfun$after$1$$anonfun$apply$mcV$sp$3.apply(InteractiveDebugger.scala:170)
      at scala.collection.immutable.List.foreach(List.scala:318)
      at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
      at scala.collection.mutable.ListBuffer.foreach(ListBuffer.scala:45)
      at edu.illinois.ncsa.daffodil.debugger.InteractiveDebugger$$anonfun$after$1.apply$mcV$sp(InteractiveDebugger.scala:170)
      at edu.illinois.ncsa.daffodil.debugger.InteractiveDebugger$$anonfun$after$1.apply(InteractiveDebugger.scala:153)
      at edu.illinois.ncsa.daffodil.debugger.InteractiveDebugger$$anonfun$after$1.apply(InteractiveDebugger.scala:153)
      at scala.util.DynamicVariable.withValue(DynamicVariable.scala:57)
      at edu.illinois.ncsa.daffodil.ExecutionMode$$anonfun$usingUnrestrictedMode$1.apply(ExecutionMode.scala:81)
      at edu.illinois.ncsa.daffodil.ExecutionMode$$anonfun$usingUnrestrictedMode$1.apply(ExecutionMode.scala:81)
      at edu.illinois.ncsa.daffodil.debugger.InteractiveDebugger.after(InteractiveDebugger.scala:153)
      at edu.illinois.ncsa.daffodil.debugger.Debugger$.after(Debugger.scala:63)
      at edu.illinois.ncsa.daffodil.processors.Parser.parse1(Parser.scala:96)
      at edu.illinois.ncsa.daffodil.processors.SeqCompParser$$anonfun$parse$3.apply(Parser.scala:160)
      at edu.illinois.ncsa.daffodil.processors.SeqCompParser$$anonfun$parse$3.apply(Parser.scala:158)
      at scala.collection.immutable.List.foreach(List.scala:318)
      at edu.illinois.ncsa.daffodil.processors.SeqCompParser.parse(Parser.scala:158)
      at edu.illinois.ncsa.daffodil.processors.Parser.parse1(Parser.scala:89)
      at edu.illinois.ncsa.daffodil.processors.ElementCombinatorBase$StatementElementParser.parse(ElementCombinator.scala:249)
      at edu.illinois.ncsa.daffodil.processors.Parser.parse1(Parser.scala:89)
      at edu.illinois.ncsa.daffodil.processors.DataProcessor$$anonfun$parse$5$$anon$1.liftedTree1$1(Runtime.scala:225)
      at edu.illinois.ncsa.daffodil.processors.DataProcessor$$anonfun$parse$5$$anon$1.<init>(Runtime.scala:224)
      at edu.illinois.ncsa.daffodil.processors.DataProcessor$$anonfun$parse$5.apply(Runtime.scala:221)
      at edu.illinois.ncsa.daffodil.processors.DataProcessor$$anonfun$parse$5.apply(Runtime.scala:220)
      at scala.util.DynamicVariable.withValue(DynamicVariable.scala:57)
      at edu.illinois.ncsa.daffodil.ExecutionMode$$anonfun$usingRuntimeMode$1.apply(ExecutionMode.scala:80)
      at edu.illinois.ncsa.daffodil.ExecutionMode$$anonfun$usingRuntimeMode$1.apply(ExecutionMode.scala:80)
      at edu.illinois.ncsa.daffodil.processors.DataProcessor.parse(Runtime.scala:220)
      at edu.illinois.ncsa.daffodil.processors.DataProcessor.parse(Runtime.scala:179)
      at edu.illinois.ncsa.daffodil.Main$$anonfun$74.apply(Main.scala:678)
      at edu.illinois.ncsa.daffodil.Main$$anonfun$74.apply(Main.scala:676)
      at edu.illinois.ncsa.daffodil.util.Timer$.getTimeResult(Timer.scala:91)
      at edu.illinois.ncsa.daffodil.util.Timer$.getResult(Timer.scala:50)
      at edu.illinois.ncsa.daffodil.Main$.run(Main.scala:675)
      at edu.illinois.ncsa.daffodil.Main$.main(Main.scala:1075)
      at edu.illinois.ncsa.daffodil.Main.main(Main.scala)

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              jchab Jessie Chab
              Reporter:
              jchab Jessie Chab
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Tasks

                  Progress: 
                   0/0