Steve Lawrence created DAFFODIL-1935:
----------------------------------------

             Summary: Debugger/trace broken with new layering
                 Key: DAFFODIL-1935
                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1935
             Project: Daffodil
          Issue Type: Bug
          Components: Debugger
            Reporter: Steve Lawrence
             Fix For: 2.2.0


Once a layer is created while parsing, if one tries to display the data via the 
{{info data}} debugger command, the following exception is thrown:

{code}
org.apache.daffodil.exceptions.Abort: Invariant broken. Runtime.scala - Leaked 
exception: java.lang.IllegalStateException: Must be debugging.
org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:129)
org.apache.daffodil.exceptions.Assert$.invariantFailed(Assert.scala:175)
org.apache.daffodil.processors.DataProcessor.org$apache$daffodil$processors$DataProcessor$$doParse(Runtime.scala:278)
org.apache.daffodil.processors.DataProcessor$$anonfun$parse$1.apply(Runtime.scala:202)
        at org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:129)
        at 
org.apache.daffodil.exceptions.Assert$.invariantFailed(Assert.scala:175)
        at 
org.apache.daffodil.processors.DataProcessor.org$apache$daffodil$processors$DataProcessor$$doParse(Runtime.scala:278)
        at 
org.apache.daffodil.processors.DataProcessor$$anonfun$parse$1.apply(Runtime.scala:202)
        at 
org.apache.daffodil.processors.DataProcessor$$anonfun$parse$1.apply(Runtime.scala:194)
        at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
        at 
org.apache.daffodil.ExecutionMode$$anonfun$usingRuntimeMode$1.apply(ExecutionMode.scala:65)
        at 
org.apache.daffodil.ExecutionMode$$anonfun$usingRuntimeMode$1.apply(ExecutionMode.scala:65)
        at org.apache.daffodil.processors.DataProcessor.parse(Runtime.scala:194)
        at org.apache.daffodil.processors.DataProcessor.parse(Runtime.scala:177)
        at org.apache.daffodil.Main$$anonfun$73.apply(Main.scala:852)
        at org.apache.daffodil.Main$$anonfun$73.apply(Main.scala:850)
        at org.apache.daffodil.util.Timer$.getTimeResult(Timer.scala:76)
        at org.apache.daffodil.util.Timer$.getResult(Timer.scala:35)
        at org.apache.daffodil.Main$.run(Main.scala:850)
        at org.apache.daffodil.Main$.main(Main.scala:1297)
        at org.apache.daffodil.Main.main(Main.scala)
{code}

Perhaps the areDebugging flag isn't carried over when creating a new data input 
stream.

Related, we might want to think about what kindof changes would be useful when 
debugging layers. For example, it might be useful to be able to decide which 
layer to show, though maybe we just always want to show the active layer. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to