When moving a pawn two squares, the games crashes. It can be reproduced on the current git master (f7c13d09cc95ee3aa47d56a17f6c4abe6e0540d6). The relevant backtrace section contains: #0 tcache_get (tc_idx=1) at malloc.c:2943 #1 __GI___libc_malloc (bytes=40) at malloc.c:3050 #2 0x00007ffff581eac8 in QMapDataBase::createNode(int, int, QMapNodeBase*, bool) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #3 0x00005555555f17aa in QMapData<Knights::Rules::Direction, Knights::Pos>::createNode(Knights::Rules::Direction const&, Knights::Pos const&, QMapNode<Knights::Rules::Direction, Knights::Pos>*, bool) () #4 0x00005555555f04d2 in QMap<Knights::Rules::Direction, Knights::Pos>::insert(Knights::Rules::Direction const&, Knights::Pos const&) () #5 0x00005555555f0551 in QMap<Knights::Rules::Direction, Knights::Pos>::operator[](Knights::Rules::Direction const&) () #6 0x00005555555ede33 in Knights::ChessRules::moveMade(Knights::Move const&) () #7 0x000055555560715c in Knights::Manager::sendPendingMove() () #8 0x0000555555607ac6 in Knights::Manager::processMove(Knights::Move const&) () #9 0x00005555556077f5 in Knights::Manager::moveByBoard(Knights::Move const&) () It is worth noting that drkonqi is not triggered, and in fact the program does not use the KCrash framework. Interesting enough, when adding the KCrash support, the backtrace is different. I'm going to attach both.
Created attachment 115014 [details] backtrace using gdb
Created attachment 115015 [details] backtrace from drkonqi I'm going to publish the patch which adds support for KCrash (and drkonqi) as soon as possible (i.e. when phabricator answers). This is the log that I get with it.
Patch https://phabricator.kde.org/D15555
(In reply to Luigi Toscano from comment #0) > When moving a pawn two squares, the games crashes. This is not reproducible for me. Does it always crash for you independent of color and position?
Git commit 4d1d989114a054cc05d7015870865e69aba08ef8 by Antonio Rojas. Committed on 16/09/2018 at 20:08. Pushed by arojas into branch 'master'. Fix crash when moving pawn two squares Construct the QList before using it in the range based loop Differential Revision: https://phabricator.kde.org/D15555 M +2 -1 src/rules/chessrules.cpp https://commits.kde.org/knights/4d1d989114a054cc05d7015870865e69aba08ef8
It was solved in the meantime, but just for the record: I could reproduce it every time, both with whites and blacks, and with pawns in different position. I compiled it locally with kdesrc-build with gcc 8.2.0 on Debian testing against a locally built Frameworks 5.50. (see also the comment in the review).