SumStack undo bug

I have a simple condition for a trigger: {SumStack(“donkey”)=~“1|2”}

This works fine, preventing the action when 3 or more donkeys are in a stack, but after an undo, even a stack with just one donkey, for example, cannot do the action until the donkey is moved again.

Changing the trigger condition to {SumStack(“donkey”)=~“0|1|2”} fixes the problem from the user’s perspective, if that helps in resolving the bug.

Could please post me the module and a save game from just before the move/undo sequence so I can see the issue happening.
Thanks,
Brent.

Module: drive.google.com/file/d/1PWTnnM … sp=sharing
Log where we noticed the problem. Reproducible: drive.google.com/file/d/1aM-e30 … sp=sharing

The trigger action is “Reproduce”.

Curiouser and Curiouser.

SumStack is actually doing the correct thing. At that point in time, the single Donkey that can’t reproduce is a ‘Does Not Stack’ piece that does not have a Stack, so SumStack of any property will always be 0. Hence why changing your Trigger condition to include 0 solved the problem.

The real bug is that the Donkey is not actually a ‘Does Not Stack’ piece until the Undo is done. The Undo is moving the piece back to the correct location, but not linking it into a Stack at that location. When you move it, it fixes itself, because the PieceMover creates a new Stack for it at the destination. Refreshing the counters will also fix the problem.

I have been able to reproduce this ‘undo unstacking’ behaviour using your module and can investigate further. This is a bug we have suspected, but never been able to reproduce before. Thanks for the report and follow up.

Regards,
Brent.

Try 3.5.2-SNAPSHOT-649a40dff, which contains a fix: vassalengine.org/~uckelman/tmp/

Try the current 3.6.0 development build. This should fix the undo unstacking bug: Builds of vassalengine/vassal

1 Like