Query on pieces dropping through to window beneath...

This is a long standing issue for me…

Drawing a piece (card) in one window, dragging it to a hand window that overlays the window that the draw deck is in; oftentimes the card will drop through the hand window and appear instead on the window beneath.

Could this be a vassal bug?

Mark

Is this something you can reliably reproduce?

Joel, I have had this problem a lot, or something similar. It is not related to dragging a piece from the map to the private window directluy.

To have this occur, you need to have the top left corner of the private window pointing on a empty hex on the map, otherwise it will not occur.

It happens when you open a [Private Window], then select a piece (can work with either a piece in the private window or in the map). Do not unselect the piece. Now close the window by double clicking on the Vassal icon on the top left of the private window. The second click seems to both trigger the close private window and cause some ‘move to this hex’ action on the selected piece.

Would someone make a minimal test module demonstrating this?

I tried and couldn’t replicate it immediately. I must have misunderstood Claudio’s description of how he see’s the issue as I couldn’t replicate that way either.

I do regular logged games where this issue has occurred before, so I will watch out and try to remember to send a log next time it happens. Actually, I may have such a log where I remember it happened, so I will have a look for that one.

Thus spake marktb1961:

I tried and couldn’t replicate it immediately. I must have misunderstood
Claudio’s description of how he see’s the issue as I couldn’t replicate
that way either.

I do regular logged games where this issue has occurred before, so I
will watch out and try to remember to send a log next time it happens.
Actually, I may have such a log where I remember it happened, so I will
have a look for that one.

A log for this won’t help, since the log will just have the piece being
sent to where it goes. What we need to see is the command being created,
not being executed, to determine why the location is wrong—so steps to
reproduce in a minimal test module are what we need to make progress on
this one.

J.

Joel,
Here is a detailed description that should allow you to reproduce the issue.
I have done some debugging and I believe the cause of the problem with PieceMover.jave method mouseReleased.
I managed to reproduce the same behaviour on all the modules I tested (Vietnam, FITL and GTS).

See the attached PDF for a description with screenshots.

Kr
Claudio

Created issue in bugzilla

vassalengine.org/tracker/sho … i?id=13780

File too big for posts.

I can’t reproduce this on Linux.

The bug seems to be caused by the last MouseReleased of a double click on the top left corner of a window, that closes it, to be passed as an event on the underlying window.

I do not think this is the correct behaviour and this might occur only with Swing and Windows 10.

To confirm that Vassal on Linux does not have the same problem, could you place a breakpoint on line 1734 of Map.java (mouseReleased method) then open a game that has some additional Map Windows.

Select a unit on the main map. (alternativley you can select a unit in the Map Window that you open below, works the same)
Open Map Window
Position top left of map window so that it points to an hex of the main map
Double Click on the top left corner so as to close the Map Window.

In WIndows 10 the code stops at the breakpoint.

Seems almost certainly a Swing or JDK bug. :frowning:

For reference, the GitHub-migrated issue is #9517 (Closed as diagnosed to be a Java bug).