Closed pixelzoom closed 2 years ago
In all cases... While restoring a snapshot, a Term
that was previously disposed is being put on the plate by TermCreator.putTermOnPlate
. This was introduced by #199 (revise snapshot implementation), where a snapshot now consists of copies of Term
. So why is a snapshot making a copy of a disposed Term, and why is a disposed Term on the plate at the time that a snapshot is taken?
To reproduce manually:
The problem is that the snapshot Terms are being put on the scale, then disposed when the clear button is pressed. When restoring a snapshot, we need to put copies of the snapshot Terms on the scale.
Fixed in the above commit, by making a copy of each Term when restoring a snapshot.
Closing.
This assertion failure is occuring for all sims in the suite, for all
Term
subclasses. This problem was likely introduced by TypeScript conversion and PhET-iO instrumentation. It looks like this started around 11/2/2022 8:13:10 PM, but I'm not certain, because CT history does not go back very far.For example,
ConstantTerm
:ObjectTerm
:VariableTerm
: