3.6.1 draw from bottom of deck undo bug

I recently discovered that I can avoid using reverse deck to deal from the bottom of decks by using {DeckPosition==deckname_numPieces} so I’m experimenting with using that to replace the sometimes buggy reverse deck hotkey and the compulsory reports of deck reversal generated by same.

Seems to work fine, but when I undo the trigger chain that includes a trigger looped 3 times to send a card selected by {DeckPosition==deckname_numPieces} to a private window, the 3 cards are returned to the top of the deck instead of their original positions.

Module is here: Oathv0505.vmod - Google Drive

Save file is here: test1.vsav - Google Drive

To test the behaviour, right-click on any of the player colour text or “right click here for pieces and starting hand” text and select “set up X components here, and draw starting hand from world deck”. 3 cards will be sent to a private window you can view if your PlayerSide is X and you click “Hand” in the toolbar. Undo that, and you will see the 3 cards returned to the top of “World” deck, which is the large one on the Main Map under the text “Visions Drawn”, instead of the bottom where they came from.

Is this new? Do you have any idea when it started?

I only implemented the new drawing procedure in 3.6.1. In previous versions of Vassal and the module, I used reverse deck, deal, reverse deck again, and that also caused some mad undo bugs, like the deck disappearing. @Cattlesquat looked into that for me, and said it was probably fixed for 3.6.0 (but also seemed to think it could only happen if someone misused load continuation, despite my assurances to the contrary).

In my experience, reverse deck and shuffle have long been linked to inexplicable bugs, especially with undo, that cannot be consistently replicated. So I took the opportunity of the 3.6.1 update to replace the reverse deck deals with the deal from bottom DeckPosition.

So, sorry, I have no data on whether or not this was a problem before 3.6.1.

Thanks Ben,

I have created issue #10915. So far, I have identified that it only affects the bottom card of a Deck and that the bug was introduced in one of the betas after 3.5.8 and before 3.6.0. We’ll get this fixed for 3.6.2

1 Like

Ben could you try the build “MovePieceRepairs” when it comes up on vassalengine.org/builds in 15 minutes or so? See if it gets rid of your problem, because it seems to get rid of the “repro case” I was using.

Yes, that seems to work fine, thanks!

1 Like