What causes group select when dragging single piece?

I have a widely-used module that appears to be bug free, except for one user, who is using a Mac.

He sent me a screencapture of a reproducible problem.

When he tries dragging a piece from a deck, the image of the piece moves with the cursor for some distance, then a rectangular group select box appears from the piece source to the cursor. When he releases the mouse button, the piece is placed, and the piece, the deck it came from, and everything else in the group select is selected.

If he fails to notice this, and tries to drag a second piece from somewhere, everything that was group selected gets moved, which can be disastrous if the first deck was a deck of face-down cards that get drawn face-up.

Apparently he does not have this problem in other modules, he can reproduce it on both his Mac devices, but it’s not a problem anyone else has been able to reproduce.

Can anyone tell me what is going on?

Seems really of that it would be module-specific.

Is it happening with a mouse or a trackpad?

The Mac had gotten notorious for introducing various multi-finger gestures
in the past few years. I expect done of then may also affect the smart
mouse in addition to a trackpad.

One could look at the various mouse settings and also the accessibility
panel, which might have a select lock seeing it something like that.

On Sat, Feb 29, 2020, 10:59 PM Benkyo benkyo@gmail.com wrote:

I have a widely-used module that appears to be bug free, except for one
user, who is using a Mac.

He sent me a screencapture of a reproducible problem.

When he tries dragging a piece from a deck, the image of the piece moves
with the cursor for some distance, then a rectangular group select box
appears from the piece source to the cursor. When he releases the mouse
button, the piece is placed, and the piece, the deck it came from, and
everything else in the group select is selected.

If he fails to notice this, and tries to drag a second piece from
somewhere, everything that was group selected gets moved, which can be
disastrous if the first deck was a deck of face-down cards that get
drawn face-up.

Apparently he does not have this problem in other modules, he can
reproduce it on both his Mac devices, but it’s not a problem anyone else
has been able to reproduce.

Can anyone tell me what is going on?


Read this topic online here:
What causes group select when dragging single piece?


messages mailing list
messages@vassalengine.org
vassalengine.org/mailman/listinfo/messages

Apparently it is module specific, because he tells me it is, but I don’t see how - there’s nothing on the user side of Vassal editor that could introduce this bug to a module. So, I figure it must be the underlying engine.

It is also not something anyone else has experienced, so I do think it must be something to do with his setup too. He tells me it occurs on both a laptop and a desktop, both using a mouse (Bluetooth and wired, respectively).

I do not believe that this is module specific, nor restricted to Mac.

The sequence described happens frequently for users of the Commands and Colours Napoleonics module but I also observe in others, such as A Study in Emerald. I have been doing some work on the later and, so far, no amount of configuration has prevented the unwanted select behaviour from occuring. It is so common in C&C Nap that regular users have established a habit of clicking on the playing board before interacting with dragged pieces.

I believe that some modules will be more susceptible than others depending on how the module is laid out.

I think it is triggered (sometimes) by dragging a “card” from a “deck”, and not by other dragging actions.

It is one of the most irritating mis-behaviours I’ve come across on vassal so I would love to find an answer.

Thank you for the confirmation.

I will have a look into those two modules to see if I can find anything in common between them, but even if I do, I doubt I’ll be in any position to do anything about it. I can’t even reproduce the bug. Like you, I would love to find an answer.

If you are interested in doing your own comparison, the module that prompted my post is Pax Pamir (Second Edition)

The fact that it is not happening all the time to all users seems to indicate it is something in the modules in question.

I would investigate whether there is an ‘Apply key on move to this map’ key that is being processed by a Trigger in the pieces that is then doing ‘something’, but not all the time depending on the trigger.

Agreed

Can you elaborate a little? In my module there is an “apply key on move to this map”, and there are a LOT of triggers on some pieces. However, in the video capture I saw of the bug occurring, the piece being dragged does not have any triggers at all.

1 Marker
8 send to location
1 layer
3 report actions
1 return to deck
1 non-rectangular
1 restrict commands

The only traits that seems at all complex are the send to location traits that have X position: $CurrentX$ with additional X offset -389, and another send to location trait that has a complicated destination of another counter, selected by properties, and a long set of If(,) conditions for the property.

I’m really just guessing. It’s where I would look. Since the problem does not occur all the time, then presumably ‘something’ is different between occurrences and non-occurrences. Triggers and Global Key Commands are the only things that can cause differing behavior when repeating the same movement on similar pieces, via the property expressions.

If the problem was only occurring on Mac’s, I would suggest trying a different Java version or implementation.

Are we sure the problem reported on the Macs is 100% exactly the same as the C&C Napoelonics issue? Or just similar?

You need a strategy for focusing in on the problem. I suggest making a copy of the module. Then strip out of it a bunch of its features, especially the non-essential ones. Give it to your player (assuming you can’t reproduce the problem), and ask them to screw around with it to see if they still have the problem. (They probably should not use it in an ongoing game unless you think it’s safe.) Depending on what they report, you then add or subtract features until you get the precise one that triggers the problem. With that information, the Vassal folk may be able to do something because otherwise it’s pretty hopeless.

I think this issue will have been fixed by an update in recent Vassal releases - specifically, v3.4.0:
“No longer possible to accidentally band-select and move the entire contents of a Deck”

No, 3.4.5 still has the same issue as before.

Can I ask which issue is the same as before? (Arriving a bit late to a thread that’s gone back and forth)

Do you mean the all-platforms issue where it was possible to band-select around a deck and end up selecting/moving all the contents of the deck if you also had another piece selected and dragged that somewhere?

Or do you mean a Mac-specific problem, like the one described in the first message where it sounds like a player starts dragging a piece and then it suddenly turns into a band-select?

For either problem it would be useful to have a very specific series of repro steps:

  • Specific module name & version
  • Specific steps to do (drag a piece from this particular deck to this particular position, or whatever)

Macs (but also Linux machines) do have a different order from Windows for tracking certain mouse events, so there are certainly pathways for “platform specific” problems in this area. Happy to take a look, just could use a little more detail what I’m looking for precisely.

Brian

I am talking about the Mac specific problem where dragging a card from a deck turns into a band-select.

You can try my module for Memoir '44, v10.13.1, or the new (awaiting moderation) v10.14, it doesn’t matter. Pick any scenario, for example Pegasus Bridge. Drag any card from any deck (main deck on the table, deck in CC window) to anywhere and it’ll always band-select.

Ah, thanks for that - very useful. I think I have found the problem and a fix, and hopefully PR 399 (github.com/vassalengine/vassal/pull/399) will make it into 3.4.6. Stay tuned!

I do think that earlier aspect of the problem where everything in the whole deck would come plopping out sometimes was already fixed in 3.4.0 or so (but if anybody has it happen again in 3.4.5 then by all means send me repro steps).

Meanwhile with this PR I think dragging a card off a deck will no longer “also band select”.

Brian

Nice work, thank you. I’m sure will come as a relief to many Mac users.

Yes indeed. That fix would have a big impact.

Try please try the VASSAL-3.4.6-SNAPSHOT-0d999f4bc test build, available here:

vassalengine.org/~uckelman/tmp/

I tried dragging cards from a deck in a few different modules: no more band-select!

Excellent!

Great news that this has been fixed. Will help a lot of users (though I hadn’t realised it only affected Mac).

I have been using the test build in testing and long game today with no problems so far.

Just downloaded but haven’t tried the release yet. For the curious among us - what was causing the issue?