critter-mj / akochan

Artificial Intelligence for Japanese mahjong
Other
244 stars 38 forks source link

legal_action exits with status 3221225725 (overflow) in Windows 10 & Segmentation fault in WSL2 #16

Closed hyskylord closed 3 years ago

hyskylord commented 3 years ago

I got this error when using the check_supervised_model feature. I believe the correct output of the following log should be a "chi", but the program exited with status 3221225725 (seems to be an indication of buffer overflow). Also I noticed that this usually happens for a "chi" search.

haifu_log_1001_0.txt

Tested on both Windows 10 and WSL2 Ubuntu 20.04

PowerShell commands:

for Akochan_ui: py main.py --check_model --log_line 126 --player_id 0

for Akochan: ./system.exe legal_action '{\"record\":[{\"aka_flag\":true,\"kyoku_first\":0,\"type\":\"start_game\",\"player_id\":0},{\"bakaze\":\"E\",\"dora_marker\":\"W\",\"honba\":0,\"kyotaku\":0,\"kyoku\":1,\"oya\":0,\"scores\": [25000,25000,25000,25000],\"tehais\":[[\"7m\",\"1p\",\"2p\",\"4p\",\"5pr\",\"6p\",\"7p\",\"9p\",\"2s\",\"3s\",\"4s\",\"5s\",\"6s\"],[\"?\",\"?\",\"?\",\"?\",\"?\",\"?\",\"?\",\"?\",\"?\",\"?\",\"?\",\"?\",\"?\"],[\"?\",\"?\",\"?\",\"?\",\"?\",\"?\",\"?\",\"?\",\"?\",\"?\",\"?\",\"?\",\"?\"],[\"?\",\"?\",\"?\",\"?\",\"?\",\"?\",\"?\",\"?\",\"?\",\"?\",\"?\",\"?\",\"?\"]],\"type\":\"start_kyoku\"},{\"actor\":0,\"pai\":\"N\",\"type\":\"tsumo\"},{\"actor\":0,\"pai\":\"N\",\"tsumogiri\":false,\"type\":\"dahai\"},{\"actor\":1,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":1,\"pai\":\"6m\",\"tsumogiri\":false,\"type\":\"dahai\"},{\"actor\":2,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":2,\"pai\":\"W\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":3,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":3,\"pai\":\"F\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":0,\"pai\":\"9m\",\"type\":\"tsumo\"},{\"actor\":0,\"pai\":\"1p\",\"tsumogiri\":false,\"type\":\"dahai\"},{\"actor\":1,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":1,\"pai\":\"P\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":2,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":2,\"pai\":\"C\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":3,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":3,\"pai\":\"1s\",\"tsumogiri\":false,\"type\":\"dahai\"},{\"actor\":0,\"pai\":\"5p\",\"type\":\"tsumo\"},{\"actor\":0,\"pai\":\"2p\",\"tsumogiri\":false,\"type\":\"dahai\"},{\"actor\":1,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":1,\"pai\":\"1s\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":2,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":2,\"pai\":\"7m\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":3,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":3,\"pai\":\"W\",\"tsumogiri\":false,\"type\":\"dahai\"},{\"actor\":0,\"pai\":\"3m\",\"type\":\"tsumo\"},{\"actor\":0,\"pai\":\"3m\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":1,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":1,\"pai\":\"6m\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":2,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":2,\"pai\":\"N\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":3,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":3,\"pai\":\"C\",\"tsumogiri\":false,\"type\":\"dahai\"},{\"actor\":0,\"pai\":\"8s\",\"type\":\"tsumo\"},{\"actor\":0,\"pai\":\"8s\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":1,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":1,\"pai\":\"7p\",\"tsumogiri\":false,\"type\":\"dahai\"},{\"actor\":2,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":2,\"pai\":\"4s\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":3,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":3,\"pai\":\"5mr\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":0,\"pai\":\"1m\",\"type\":\"tsumo\"},{\"actor\":0,\"pai\":\"1m\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":1,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":1,\"pai\":\"4p\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":2,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":2,\"pai\":\"P\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":3,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":3,\"pai\":\"8s\",\"tsumogiri\":false,\"type\":\"dahai\"},{\"actor\":0,\"pai\":\"2p\",\"type\":\"tsumo\"},{\"actor\":0,\"pai\":\"2p\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":1,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":1,\"type\":\"reach\"},{\"actor\":1,\"pai\":\"9s\",\"tsumogiri\":false,\"type\":\"dahai\"},{\"actor\":1,\"type\":\"reach_accepted\"},{\"actor\":2,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":2,\"pai\":\"6p\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":3,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":3,\"pai\":\"E\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":0,\"pai\":\"7p\",\"type\":\"tsumo\"},{\"actor\":0,\"pai\":\"9p\",\"tsumogiri\":false,\"type\":\"dahai\"},{\"actor\":1,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":1,\"pai\":\"S\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":2,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":2,\"pai\":\"4p\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":3,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":3,\"pai\":\"9p\",\"tsumogiri\":false,\"type\":\"dahai\"},{\"actor\":0,\"pai\":\"4m\",\"type\":\"tsumo\"},{\"actor\":0,\"pai\":\"7p\",\"tsumogiri\":false,\"type\":\"dahai\"},{\"actor\":1,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":1,\"pai\":\"5s\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":2,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":2,\"pai\":\"S\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":3,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":3,\"pai\":\"9p\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":0,\"pai\":\"1p\",\"type\":\"tsumo\"},{\"actor\":0,\"pai\":\"1p\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":1,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":1,\"pai\":\"W\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":2,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":2,\"pai\":\"S\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":3,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":3,\"pai\":\"8m\",\"tsumogiri\":false,\"type\":\"dahai\"},{\"actor\":0,\"pai\":\"6m\",\"type\":\"tsumo\"},{\"actor\":0,\"pai\":\"9m\",\"tsumogiri\":false,\"type\":\"dahai\"},{\"actor\":1,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":1,\"pai\":\"8m\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":2,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":2,\"pai\":\"6s\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":3,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":3,\"pai\":\"9m\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":0,\"pai\":\"9s\",\"type\":\"tsumo\"},{\"actor\":0,\"pai\":\"9s\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":1,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":1,\"pai\":\"3s\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":2,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":2,\"pai\":\"4s\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":3,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":3,\"pai\":\"7s\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":0,\"pai\":\"E\",\"type\":\"tsumo\"},{\"actor\":0,\"pai\":\"E\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":1,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":1,\"pai\":\"S\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":2,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":2,\"pai\":\"1s\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":3,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":3,\"type\":\"reach\"},{\"actor\":3,\"pai\":\"6p\",\"tsumogiri\":false,\"type\":\"dahai\"},{\"actor\":3,\"type\":\"reach_accepted\"},{\"actor\":0,\"pai\":\"N\",\"type\":\"tsumo\"},{\"actor\":0,\"pai\":\"6p\",\"tsumogiri\":false,\"type\":\"dahai\"},{\"actor\":1,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":1,\"pai\":\"2p\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":2,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":2,\"pai\":\"4m\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":3,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":3,\"pai\":\"9s\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":0,\"pai\":\"8m\",\"type\":\"tsumo\"},{\"actor\":0,\"pai\":\"4m\",\"tsumogiri\":false,\"type\":\"dahai\"},{\"actor\":1,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":1,\"pai\":\"5m\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":2,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":2,\"pai\":\"5s\",\"tsumogiri\":true,\"type\":\"dahai\"},{\"actor\":3,\"pai\":\"?\",\"type\":\"tsumo\"},{\"actor\":3,\"pai\":\"2s\",\"tsumogiri\":true,\"type\":\"dahai\"}]}'

hyskylord commented 3 years ago

Fixed in #17