Bug 283952 - Crash - Illegal Initial Human Move
Summary: Crash - Illegal Initial Human Move
Status: RESOLVED FIXED
Alias: None
Product: knights
Classification: Applications
Component: general (show other bugs)
Version: 2.3.2
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Miha Čančula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-13 23:17 UTC by Dave Kaye
Modified: 2011-10-14 08:14 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Kaye 2011-10-13 23:17:04 UTC
Version:           2.3.2
OS:                Linux

The Knights program 2.3.2 and also the git master branch:

If an illegal move is made as the first move by a human the program will crash.  Touching a piece with no moves possible (bishop, king, queen, rook) or an opponents piece with a drag-and-drop mouse action will crash the program before the move is completed.

It occurs only on the first move.  All other times after this the program successfully ignores the illegal move attempt.

It occurs with or without markers activated.

Reproducible: Always

Steps to Reproduce:
1) start Knights in human vs human or human vs chess engine mode.

2) Attempt to drag the white king.

3) System crash before mouse moves significant distance (must be activating the drag-drop event; appears to be immediately after mouse has moved the startDragDistance).

Actual Results:  
crash

Expected Results:  
ignore move attempt

Any click event on a piece will stop the crash if a subsequent illegal move is attempted still on the first human move.

Drag and return to starting point a legal piece (pawn) then attempt an illegal move will also prevent the crash.

It occurs only on an immediate, first mouse move after startup.
Comment 1 Miha Čančula 2011-10-14 08:14:49 UTC
Git commit bdee59d77d60d394890170139a37828f05b4f352 by Miha Čančula.
Committed on 14/10/2011 at 10:13.
Pushed by mihac into branch '2.3'.

Avoid crash when trying to drag a piece for the first time.

BUG: 283952

M  +1    -0    src/board.cpp

http://commits.kde.org/knights/bdee59d77d60d394890170139a37828f05b4f352
Comment 2 Miha Čančula 2011-10-14 08:14:50 UTC
Git commit 12a9fc17d5b15f75f1610380d955e0387fb2cff9 by Miha Čančula.
Committed on 14/10/2011 at 10:13.
Pushed by mihac into branch 'master'.

Avoid crash when trying to drag a piece for the first time.

BUG: 283952

M  +1    -0    src/board.cpp

http://commits.kde.org/knights/12a9fc17d5b15f75f1610380d955e0387fb2cff9