{"action":"created","issue":{"url":"https://api.github.com/repos/lucasart/Demolito/issues/65","repository_url":"https://api.github.com/repos/lucasart/Demolito","labels_url":"https://api.github.com/repos/lucasart/Demolito/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/lucasart/Demolito/issues/65/comments","events_url":"https://api.github.com/repos/lucasart/Demolito/issues/65/events","html_url":"https://github.com/lucasart/Demolito/issues/65","id":190788101,"number":65,"title":"Still crashes with commit 248","user":{"login":"archtux","id":1527510,"avatar_url":"https://avatars.githubusercontent.com/u/1527510?v=3","gravatar_id":"","url":"https://api.github.com/users/archtux","html_url":"https://github.com/archtux","followers_url":"https://api.github.com/users/archtux/followers","following_url":"https://api.github.com/users/archtux/following{/other_user}","gists_url":"https://api.github.com/users/archtux/gists{/gist_id}","starred_url":"https://api.github.com/users/archtux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/archtux/subscriptions","organizations_url":"https://api.github.com/users/archtux/orgs","repos_url":"https://api.github.com/users/archtux/repos","events_url":"https://api.github.com/users/archtux/events{/privacy}","received_events_url":"https://api.github.com/users/archtux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-21T17:42:57Z","updated_at":"2016-11-22T15:00:25Z","closed_at":null,"body":"I built a debug version of commit 248 and still crashes at the same line.(position.cc:537)\r\nHere is the backtrace.\r\nVariable 'pos' gives erroneous value.\r\nSee p pos at the end of backtace.\r\n[Thread debugging using libthread_db enabled]\r\nUsing host libthread_db library \"/usr/lib/libthread_db.so.1\".\r\nCore was generated by `./demolito'.\r\nProgram terminated with signal SIGABRT, Aborted.\r\n#0  0x00007f6e442f004f in raise () from /usr/lib/libc.so.6\r\n[Current thread is 1 (Thread 0x7f6e3baba700 (LWP 5800))]\r\n(gdb) bt\r\n#0  0x00007f6e442f004f in raise () from /usr/lib/libc.so.6\r\n#1  0x00007f6e442f147a in abort () from /usr/lib/libc.so.6\r\n#2  0x00007f6e442e8ea7 in __assert_fail_base () from /usr/lib/libc.so.6\r\n#3  0x00007f6e442e8f52 in __assert_fail () from /usr/lib/libc.so.6\r\n#4  0x0000000000409cbb in king_square (pos=..., c=BLACK) at position.cc:537\r\n#5  0x0000000000407ee6 in Position::finish (this=0x7f6e3ba70710) at position.cc:73\r\n#6  0x0000000000408d32 in Position::set (this=0x7f6e3ba70710, before=..., m=...) at position.cc:308\r\n#7  0x000000000040dab4 in search::recurse<true> (pos=..., ply=18, depth=-1, alpha=357, beta=358, pv=std::vector of length 0, capacity 0) at search.cc:197\r\n#8  0x000000000040bda0 in search::recurse<false> (pos=..., ply=17, depth=2, alpha=-358, beta=-357, pv=std::vector of length 0, capacity 0) at search.cc:152\r\n#9  0x000000000040c27a in search::recurse<false> (pos=..., ply=16, depth=2, alpha=357, beta=358, pv=std::vector of length 0, capacity 0) at search.cc:232\r\n#10 0x000000000040c138 in search::recurse<false> (pos=..., ply=15, depth=3, alpha=-358, beta=-357, pv=std::vector of length 0, capacity 0) at search.cc:222\r\n#11 0x000000000040c27a in search::recurse<false> (pos=..., ply=14, depth=3, alpha=357, beta=358, pv=std::vector of length 0, capacity 0) at search.cc:232\r\n#12 0x000000000040c138 in search::recurse<false> (pos=..., ply=13, depth=4, alpha=-358, beta=-357, pv=std::vector of length 0, capacity 0) at search.cc:222\r\n#13 0x000000000040c27a in search::recurse<false> (pos=..., ply=12, depth=4, alpha=357, beta=358, pv=std::vector of length 0, capacity 0) at search.cc:232\r\n#14 0x000000000040c138 in search::recurse<false> (pos=..., ply=11, depth=5, alpha=-358, beta=-357, pv=std::vector of length 0, capacity 127) at search.cc:222\r\n#15 0x000000000040c27a in search::recurse<false> (pos=..., ply=10, depth=5, alpha=357, beta=421, pv=std::vector of length 0, capacity 128) at search.cc:232\r\n#16 0x000000000040c138 in search::recurse<false> (pos=..., ply=9, depth=6, alpha=-421, beta=-357, pv=std::vector of length 0, capacity 129) at search.cc:222\r\n#17 0x000000000040c138 in search::recurse<false> (pos=..., ply=8, depth=6, alpha=357, beta=421, pv=std::vector of length 0, capacity 130) at search.cc:222\r\n#18 0x000000000040c138 in search::recurse<false> (pos=..., ply=7, depth=7, alpha=-421, beta=-357, pv=std::vector of length 0, capacity 131) at search.cc:222\r\n#19 0x000000000040c138 in search::recurse<false> (pos=..., ply=6, depth=7, alpha=357, beta=421, pv=std::vector of length 0, capacity 132) at search.cc:222\r\n#20 0x000000000040c138 in search::recurse<false> (pos=..., ply=5, depth=8, alpha=-421, beta=-357, pv=std::vector of length 0, capacity 133) at search.cc:222\r\n#21 0x000000000040c138 in search::recurse<false> (pos=..., ply=4, depth=9, alpha=357, beta=421, pv=std::vector of length 0, capacity 134) at search.cc:222\r\n#22 0x000000000040c138 in search::recurse<false> (pos=..., ply=3, depth=10, alpha=-421, beta=-357, pv=std::vector of length 0, capacity 135) at search.cc:222\r\n#23 0x000000000040c138 in search::recurse<false> (pos=..., ply=2, depth=11, alpha=357, beta=421, pv=std::vector of length 0, capacity 136) at search.cc:222\r\n#24 0x000000000040c325 in search::recurse<false> (pos=..., ply=1, depth=12, alpha=-421, beta=-357, pv=std::vector of length 0, capacity 137) at search.cc:240\r\n#25 0x000000000040c138 in search::recurse<false> (pos=..., ply=0, depth=13, alpha=357, beta=421, pv=std::vector of length 138, capacity 138 = {...}) at search.cc:222\r\n#26 0x000000000040a91e in search::aspirate (pos=..., depth=13, pv=std::vector of length 138, capacity 138 = {...}, score=389) at search.cc:298\r\n#27 0x000000000040ab62 in search::iterate (pos=..., lim=..., initialGameStack=..., iteration=std::vector of length 4, capacity 4 = {...}, threadId=3) at search.cc:347\r\n#28 0x000000000041200d in std::_Bind_simple<void (*(std::reference_wrapper<Position const>, std::reference_wrapper<search::Limits const>, std::reference_wrapper<zobrist::GameStack const>, std::reference_wrapper<std::vector<int, std::allocator<int> > >, int))(Position const&, search::Limits const&, zobrist::GameStack const&, std::vector<int, std::allocator<int> >&, int)>::_M_invoke<0ul, 1ul, 2ul, 3ul, 4ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul, 4ul>) (this=0x7f6e34008968) at /usr/include/c++/6.2.1/functional:1400\r\n#29 0x0000000000411e01 in std::_Bind_simple<void (*(std::reference_wrapper<Position const>, std::reference_wrapper<search::Limits const>, std::reference_wrapper<zobrist::GameStack const>, std::reference_wrapper<std::vector<int, std::allocator<int> > >, int))(Position const&, search::Limits const&, zobrist::GameStack const&, std::vector<int, std::allocator<int> >&, int)>::operator()() (this=0x7f6e34008968) at /usr/include/c++/6.2.1/functional:1389\r\n#30 0x0000000000411d58 in std::thread::_State_impl<std::_Bind_simple<void (*(std::reference_wrapper<Position const>, std::reference_wrapper<search::Limits const>, std::reference_wrapper<zobrist::GameStack const>, std::reference_wrapper<std::vector<int, std::allocator<int> > >, int))(Position const&, search::Limits const&, zobrist::GameStack const&, std::vector<int, std::allocator<int> >&, int)> >::_M_run() (this=0x7f6e34008960) at /usr/include/c++/6.2.1/thread:196\r\n#31 0x00007f6e44c3131f in std::execute_native_thread_routine (__p=0x7f6e34008960) at /build/gcc-multilib/src/gcc/libstdc++-v3/src/c++11/thread.cc:83\r\n#32 0x00007f6e44f05454 in start_thread () from /usr/lib/libpthread.so.0\r\n#33 0x00007f6e443a57df in clone () from /usr/lib/libc.so.6\r\n(gdb) frame 4\r\n#4  0x0000000000409cbb in king_square (pos=..., c=BLACK) at position.cc:537\r\n537         assert(bb::count(pieces(pos, c, KING)) == 1);\r\n(gdb) p pos\r\n$1 = (const Position &) @0x7f6e3ba70710: {_byColor = {4611690691352592384, 216173334033924096}, _byPiece = {4611686018427387904, 72057594038452224, 144115462953762816, 0, 262144, \r\n    4949966651392}, _castlableRooks = 0, _attacked = 9008015791949480450, _checkers = 0, _pins = 0, _key = 2490692118756363530, _pawnKey = 1439414550270905652, _pst = {v = {150, 55}}, \r\n  _pieceOn = '\\006' <repeats 16 times>, \"\\005\\006\\004\\001\\006\\006\\006\\006\\005\\006\\006\\006\\006\\006\\006\\005\\006\\006\\006\\006\\006\\006\\002\\005\\006\\006\\005\", '\\006' <repeats 13 times>, \"\\001\\002\\006\\006\\006\\006\\000\\006\", _turn = BLACK, _epSquare = NB_SQUARE, _rule50 = 0, _pieceMaterial = {{v = {2326, 2326}}, {v = {1686, 1686}}}}\r\n(gdb) p c\r\n$2 = BLACK\r\n(gdb) p KING\r\n$3 = KING\r\n(gdb) \r\n "},"comment":{"url":"https://api.github.com/repos/lucasart/Demolito/issues/comments/262263154","html_url":"https://github.com/lucasart/Demolito/issues/65#issuecomment-262263154","issue_url":"https://api.github.com/repos/lucasart/Demolito/issues/65","id":262263154,"user":{"login":"archtux","id":1527510,"avatar_url":"https://avatars.githubusercontent.com/u/1527510?v=3","gravatar_id":"","url":"https://api.github.com/users/archtux","html_url":"https://github.com/archtux","followers_url":"https://api.github.com/users/archtux/followers","following_url":"https://api.github.com/users/archtux/following{/other_user}","gists_url":"https://api.github.com/users/archtux/gists{/gist_id}","starred_url":"https://api.github.com/users/archtux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/archtux/subscriptions","organizations_url":"https://api.github.com/users/archtux/orgs","repos_url":"https://api.github.com/users/archtux/repos","events_url":"https://api.github.com/users/archtux/events{/privacy}","received_events_url":"https://api.github.com/users/archtux/received_events","type":"User","site_admin":false},"created_at":"2016-11-22T15:00:25Z","updated_at":"2016-11-22T15:00:25Z","body":"Crash of demolito release version playing white in Cutechess GUI 0.9.4\n\nSettings of demolito :\nHash 256\nThreads 4\nContempt 10\nTime buffer 30\n\nFEN : r1qk1b2/1pp3Rp/p1n1pP2/3p3Q/3P3P/P2P1N2/1P2NP1P/7K w - - 6 36\n\n>Demolito 248(8): position startpos moves b1c3 b8c6 g1f3 d7d5 d2d4 c8f5\ne2e3 e7e6 f1d3 f5d3 c2d3 g8f6 a2a3 f8e7 e1g1 a8b8 e3e4 e8g8 f1e1 f8e8 c1f4\nf6h5 f4e3 h5f6 a1c1 f6g4 e3f4 a7a6 e4e5 g4h6 f4h6 g7h6 c1a1 h6h5 d1c1 h5h4\nc1f4 b8a8 g1h1 a8b8 e1f1 b8a8 h1g1 a8b8 a1b1 b8a8 g1h1 a8b8 f1g1 b8a8 c3e2\ne8f8 g2g3 g8h8 g3h4 d8c8 b1e1 f7f6 f4h6 f8g8 e5f6 e7f8 g1g8 h8g8 e1g1 g8f7\ng1g7 f7e8 h6h5 e8d8\n>Demolito 248(8): isready\n<Demolito 248(8): readyok\n>Demolito 248(8): go wtime 37371 btime 37765 movestogo 5\n<Demolito 248(8): info depth 1 score mate 4 time 1 nodes 114 nps 114000 pv\nh5f7\n<Demolito 248(8): info depth 2 score mate 4 time 1 nodes 117 nps 117000 pv\nh5f7\n<Demolito 248(8): info depth 3 score mate 4 time 1 nodes 123 nps 123000 pv\nh5f7\n<Demolito 248(8): info depth 4 score mate 4 time 1 nodes 173 nps 173000 pv\nh5f7\n<Demolito 248(8): info depth 5 score mate 4 time 1 nodes 226 nps 226000 pv\nh5f7\n<Demolito 248(8): info depth 6 score mate 4 time 1 nodes 278 nps 278000 pv\nh5f7\n<Demolito 248(8): info depth 7 score mate 4 time 1 nodes 330 nps 330000 pv\nh5f7\n<Demolito 248(8): info depth 8 score mate 4 time 1 nodes 408 nps 408000 pv\nh5f7\n<Demolito 248(8): info depth 9 score mate 4 time 1 nodes 486 nps 486000 pv\nh5f7\n<Demolito 248(8): info depth 10 score mate 4 time 1 nodes 565 nps 565000 pv\nh5f7\n<Demolito 248(8): info depth 11 score mate 4 time 1 nodes 690 nps 690000 pv\nh5f7\n<Demolito 248(8): info depth 12 score mate 4 time 224 nodes 953754 nps\n4257000 pv h5f7\n<Demolito 248(8): info depth 13 score mate 4 time 4380 nodes 23933975 nps\n5464000 pv h5f7 c6e7 f6e7 d8d7 e7e8q d7d6 f7f8\n>Zevra 255(9): isready\n<Zevra 255(9): readyok\n\n\nOn Tue, Nov 22, 2016 at 3:19 AM, lucasart <notifications@github.com> wrote:\n\n> This is actually a different bug, because it isn't triggered by playing\n> the PV in uci::Info::update(). It seems that an illegal move is being\n> played in the search tree somewhere, resulting in the wrong number of king\n> (eg. a king capture).\n>\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/lucasart/Demolito/issues/65#issuecomment-262128919>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ABdO1qGkFBllkkTopfur6XlyTtap0b9rks5rAlEegaJpZM4K4fcn>\n> .\n>\n"}}
{"actor":{"display_login":"archtux"}}