stevedlawrence commented on a change in pull request #674:
URL: https://github.com/apache/daffodil/pull/674#discussion_r743005566



##########
File path: 
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/VariableMap1.scala
##########
@@ -155,6 +155,7 @@ class VariableInstance private (val rd: VariableRuntimeData)
         this.setState(this.priorState)
         this.setValue(this.priorValue)
       }
+      case (VariableDefined, _, _) => // This should only occur for 
pre-defined variables

Review comment:
       Agreed, some more information about what's going on would be helpful.
   
   I believe this `reset` function is only called in `PState.reset`, and is is 
only called for variables that have "changed" and are added to the list at the 
top of the `changedVariableStack`. But if a variable has changed, then it seems 
like it should be impossible for the current state to be Defined? By being 
changed, wouldn't it have needed to change to either Read or Set?
   
   I wonder if maybe the same variable is being added to the top of the 
`changedVariableStack` list twice? That would cause us to try to reset it 
twice. When we reset it the first time that could change it to the Defined 
state, and then trying to reset it again hits this case? If that's the issue, 
I'm not sure if adding it twice is a bug, or if handling Defined is the right 
thing? More information is needed about what's going on...
   
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to