lichess-org / lila

♞ lichess.org: the forever free, adless and open source chess server ♞
https://lichess.org
GNU Affero General Public License v3.0
15.52k stars 2.26k forks source link

Dropped moves sometimes fail to show #2663

Closed isaacl closed 7 years ago

isaacl commented 7 years ago

Backrank drop moves occasionally fail to show. The move will be printed in the movelist, but the board won't change.

I've only seen this where I was white and my opponent dropped on b8. Players workaround by clicking on the current move in the movelist, which refreshes the board and shows the drop.

Probably related: a random queen appears on b8 in this video, after the last game.

ornicar commented 7 years ago

I think the queen that appeared on b8 was the queen that Jan was holding while the game ended. When initiating a drag, chessground puts the piece on the first available square of the board (here, b8) then sets it as being dragged - so it's translated to the cursor position. On game end, the drag is canceled, and before the final board was re-rendered, we could see the queen on b8.

That hack I use is also responsible for the invisible drops, very probably. Will try to reproduce.

ornicar commented 7 years ago

ahah! Maybe if the opponent drops on b8, where b8 is the first available square (starting from a8), while you have a piece in hand (that is therefore hackishly on b8), then it triggers the bug. Now, to reproduce it, hrm.

ornicar commented 7 years ago

Yes, reproduced. Can fix.

ornicar commented 7 years ago

:white_check_mark: on prod