At-Start Stack using Grid Location appearing in wrong spot

I’m not sure if this is a bug or just me misunderstanding how Grid Location is supposed to work…

I have an At-Start Stack that is set to Belongs to Board: , Use Grid Location, Location: “0”. There are 2 possible boards to play on: the original (“Castle”) or the expansion (“Falcon”).

If I select the original board, the stack appears in the correct place, the region called “0” (which corresponds to zero on the scoring track). However, if I select the expansion board, the stack appears at region “2”, instead, which at at the same X,Y coordinates as region “0” on the Castle board.

So, it seems like it’s using the coordinates for Region “0” on the first board, even when the 2nd board is selected. Is this a bug, or just a limitation with how Grid Location works? For now, I’m working around it by having 2 duplicate stacks, one belonging to each board (both still set at Location “0”, but now the stack for the Falcon board appears at the right place), but I would prefer not to have 2 otherwise identical stacks if I can avoid it.

Edit: forgot to say I’m using VASSAL-3.4.3-SNAPSHOT-8a786d685 (on Linux with OpenJDK 11), which I needed to even move the At-Start Stack to board!

That seems like a bug. I remember 3.2.17 used to have that problem. I thought that bug had been marked fixed by someone shortly before I joined the team but perhaps it has regressed.

Found the previous bug report: vassalengine.org/tracker/sho … i?id=12576
So, looks like a regression. Should I file a new bug report?

Yes please, and put that link to 12576 and mention it is a regression (technically it could have been a “wasn’t actually fixed in the first place” – I’m not sure yet, I wasn’t involved in making/testing the fix – but anyway officially at least it’s a regression!)

Okay, bug 13456 filed here: vassalengine.org/tracker/sho … i?id=13456

Has anyone had a chance to look into this yet? The fix is supposedly in PR #10 (github.com/vassalengine/vassal/pull/10), and that code is supposedly still in VASSAL 3.4.3; I couldn’t see anything wrong with it, but I’m not very experienced in Java in general or VASSAL’s code in particular.

I have looked into it and verified that “the problem” is indeed still happening (both in 3.4.4 and in present master branch, i.e. 3.5-pre-alpha). And the code that theoretically fixes it doesn’t seem to be even executing when I launch the module, so I’m not sure if the startup code-path for At-Start Stacks has changed since 3.3.2, or did it ever work in 3.3.2, etc.

I believe I have stumbled upon the (or at least a partial) solution to this issue while working on Board Setup Stacks. Turns out there is a bug that has always been there.

If you specify an owning board for a Setup Stack or Deck, then the location of the Stack/Deck is placed offset from the top-left corner of the selected board. This works correctly.

If you specify [Any] board, then the Stack/Deck is placed offset from the top-left corner of the Map, however, it DOES NOT take any map padding into account.

So if you have any Map edge padding AND use the board option, the Stack or Deck ends up in the wrong place.