Revision 1435 on Debian 8 entering the following move sequence fails with message:
precondition violation: m_currentBoard.checkMove(move, m_variant)
(func) addMove
(file) db_game.cpp:2798
(what) precondition violation: m_currentBoard.checkMove(move, m_variant)
(type) mstl::precondition_violation_exception
=== Backtrace ============================================
mstl::precondition_violation_exception::precondition_violation_exception [m_assert.cpp:25]
db::Game::addMove [db_game.cpp:2798]
db::Game::addMove [db_game.cpp:2818]
cmdMove [tcl_game.cpp:1580]
safeCall [tcl_base.cpp:1006]
main [tkscidb.cpp:110]
==========================================================
::scidb::game::move Ne2
doAction append Ne2 {::namespace inscope ::move AfterAddMove}
addMove menu Ne2 -nomovecmd {::namespace inscope ::move AfterAddMove} -force 0
DoAddMove 12 6 0
AddMove 12 6 0
::move::releaseSquare 645 664 256
1.e4 e5 2.d4 Lb4 3. Sc3 Sf6 4.Sge2 fails
This error also appears on my system (Ubuntu 16.04). The problem seems to appear whenever you enter a move such that another piece of the same kind and color could move to the same square if it were not for covering against a check.
Other examples
1.e4 e5 2.Nc3 Nc6 3.f4 Bc5 4.Nf3 d6 5.Bb5, and now 5...Nge7 fails
1.e4 e6 2.d4 d5 3.Nc3 Nf6 4.Bg5 Bb4 5.e5 h6 6.Be3 Ne4 7.Qg4 g6 8.a3 Ba5, and now 9.Nge2 fails
This is not reproducible for me. I remember that an intermediate version had this kind of bug, but I did a fix. In which way did you install, via download from https://sourceforge.net/projects/scidb/files/scidb-beta-code-r1431.tgz/download, or via SVN?
I made an update via svn:
and created a new build:
All without errors.
Then I start with:
and enter the move sequence
in the game editor.
With a change in game class I've used a wrong parameter for move checks. This has been fixed with [r1436].
Related
Commit: [r1436]