[
https://issues.apache.org/jira/browse/DAFFODIL-2385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Josh Adams resolved DAFFODIL-2385.
----------------------------------
Fix Version/s: 3.1.0
Resolution: Fixed
This was fixed as part of the commit for variable direction property, which
included a major overhaul of how variable expressions were handled when
suspending during unparsing.
I verified that the issue I had with a customer schema was fixed, but there
wasn't a straightforward way to create a test case from this rather complicated
customer schema.
> newVariableInstance has issues with suspensions during unparse
> --------------------------------------------------------------
>
> Key: DAFFODIL-2385
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2385
> Project: Daffodil
> Issue Type: Bug
> Components: Back End
> Affects Versions: 2.7.0
> Reporter: Josh Adams
> Assignee: Josh Adams
> Priority: Major
> Fix For: 3.1.0
>
>
> While doing some work for a customer schema I ran into an issue where I was
> using newVariableInstance and setting a variable based on the value of
> another element. This other element has an outputValueCalc that performs
> dfdl:valueLength() on a section of data.
> I believe what is happening is that the newVariableInstance starts its scope
> and tries to set its variable but suspends until the dfdl:valueLength() call
> can be resolved. In the meantime there is another call to NVI and setVariable
> on the same variable which results in the variable being set twice and
> causing an error. Removing the outputValueCalc resolves this issue, which
> leads me to believe that the suspension is resulting in the variable stack
> getting clobbered.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)