[FIXED] Selection box sometimes appears after left click

Post bug reports and ask for game support here.

Moderator: MOD_Command

Post Reply
Trainzak
Posts: 10
Joined: Tue Apr 02, 2019 1:48 am

[FIXED] Selection box sometimes appears after left click

Post by Trainzak »

Sometimes when I left click on the map, a selection box appears from top left corner to the mouse pointer. It stays there until I left click again... Does this happen only to me?

Apparently I cannot post any links or images, so here is the best I can do:

postimg . cc / 18q00LfP
stolowski
Posts: 142
Joined: Sat Dec 02, 2017 10:01 am

RE: Selection box sometimes appears after left click

Post by stolowski »

It's not only you. I can confirm and reported it shortly after release as well.
User avatar
xan2622
Posts: 70
Joined: Sat Jun 11, 2011 10:19 pm

RE: Selection box sometimes appears after left click

Post by xan2622 »

I also noticed this selection box.
Dimitris
Posts: 15750
Joined: Sun Jul 31, 2005 10:29 am
Contact:

RE: Selection box sometimes appears after left click

Post by Dimitris »

This is extremely hard to fix because we cannot reproduce it consistently.
stolowski
Posts: 142
Joined: Sat Dec 02, 2017 10:01 am

RE: Selection box sometimes appears after left click

Post by stolowski »

Yes, it's very elusive; I experience it tens of times during my games, yet I don't see a pattern - clicking randomly on various units reporudces it from time to time, but there is no correlation with unit side or whether it's a group or single unit... Neither it is related to where the unit is drawn on the screen.... Pretty random as far as I can tell.
Zanthra
Posts: 151
Joined: Wed Feb 06, 2019 3:23 am

RE: Selection box sometimes appears after left click

Post by Zanthra »

I experimented a bit with this, and I have a theory. I think that the selection box is being updated on a mouse move event. The mouse move events are rate limited, for example when making a selection, when dragging the selection box, if you stop the mouse suddenly, the selection box won't match the current mouse position, as the last few movements were not sent as events. The mouse movement event related to updating the selection box is unregistered when the left mouse button is released. I think what is happening is that if a mouse movement event enters the event queue after the left mouse button up, but before the left mouse button up unregisters the mouse move event, then the bug occurs. Basically when the left mouse button is released, the game unregisters the mouse move event, and makes the selection, then resets the start and end points of the selection box to 0,0, then after that happens a queued mouse move event, if queued before the mouse up event fires, can update the end point of the selection box to the current mouse position.

It's also possible that there is a shared mouse move event used by the game, and that it checks the button status of the mouse when fired to determine what it should be doing. If it is checking the status of the mouse buttons at the time when the event is queued, rather than when the event is processed, then it can still cause the same problem. If it is queued after the left mouse button up event, and the left mouse button up event makes the selection and resets the selection box corners, and it is processed as if the left mouse button was down due to that being the state when it was queued, then it can still set the end corner of the selection box.

PS: Actually, the second possible scenario isn't really possible. It would require that a mouse up event for the left mouse button be queued before a mouse move event with the left mouse button down. Unless there is some sort of queue priority which would put the mouse up event first, it should not happen.
Rory Noonan
Posts: 2418
Joined: Thu Dec 18, 2014 1:53 am
Location: Brooklyn, NY

RE: Selection box sometimes appears after left click

Post by Rory Noonan »

Logged for investigation.

0013532
Image
Dimitris
Posts: 15750
Joined: Sun Jul 31, 2005 10:29 am
Contact:

RE: Selection box sometimes appears after left click

Post by Dimitris »

This has been fixed in one of the recent public updates. If you see it happening again please give us a shout.
Post Reply

Return to “Tech Support”