{"action":"created","issue":{"url":"https://api.github.com/repos/db3108/michi-c2/issues/12","labels_url":"https://api.github.com/repos/db3108/michi-c2/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/db3108/michi-c2/issues/12/comments","events_url":"https://api.github.com/repos/db3108/michi-c2/issues/12/events","html_url":"https://github.com/db3108/michi-c2/issues/12","id":127394206,"number":12,"title":"crash on clear_board twice","user":{"login":"horaceho","id":6657,"avatar_url":"https://avatars.githubusercontent.com/u/6657?v=3","gravatar_id":"","url":"https://api.github.com/users/horaceho","html_url":"https://github.com/horaceho","followers_url":"https://api.github.com/users/horaceho/followers","following_url":"https://api.github.com/users/horaceho/following{/other_user}","gists_url":"https://api.github.com/users/horaceho/gists{/gist_id}","starred_url":"https://api.github.com/users/horaceho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/horaceho/subscriptions","organizations_url":"https://api.github.com/users/horaceho/orgs","repos_url":"https://api.github.com/users/horaceho/repos","events_url":"https://api.github.com/users/horaceho/events{/privacy}","received_events_url":"https://api.github.com/users/horaceho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-01-19T08:49:14Z","updated_at":"2016-01-20T04:19:35Z","closed_at":null,"body":"When I try to open a sgf file via GoGUI, michi-c2 crashes. Then I traced the issue is caused by two consequtive `clear_board`. To reproduce:\r\n````\r\n$ ./michi gtp\r\nclear_board\r\nMove: 0     Black: 0 caps   White: 0 caps   Komi: 7.5\r\n 19 . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . . . .\r\n 18 . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . . . .\r\n 17 . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . . . .\r\n 16 . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . . . .\r\n 15 . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . . . .\r\n 14 . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . . . .\r\n 13 . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . . . .\r\n 12 . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . . . .\r\n 11 . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . . . .\r\n 10 . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . . . .\r\n 9  . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . . . .\r\n 8  . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . . . .\r\n 7  . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . . . .\r\n 6  . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . . . .\r\n 5  . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . . . .\r\n 4  . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . . . .\r\n 3  . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . . . .\r\n 2  . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . . . .\r\n 1  . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . . . .\r\n    A B C D E F G H J K L M N O P Q R S T \r\n\r\n= \r\n\r\nclear_board\r\nmichi(27531,0x7fff78670300) malloc: *** error for object 0x7f93f8405070: pointer being freed was not allocated\r\n*** set a breakpoint in malloc_error_break to debug\r\nAbort trap: 6\r\n````"},"comment":{"url":"https://api.github.com/repos/db3108/michi-c2/issues/comments/173080629","html_url":"https://github.com/db3108/michi-c2/issues/12#issuecomment-173080629","issue_url":"https://api.github.com/repos/db3108/michi-c2/issues/12","id":173080629,"user":{"login":"horaceho","id":6657,"avatar_url":"https://avatars.githubusercontent.com/u/6657?v=3","gravatar_id":"","url":"https://api.github.com/users/horaceho","html_url":"https://github.com/horaceho","followers_url":"https://api.github.com/users/horaceho/followers","following_url":"https://api.github.com/users/horaceho/following{/other_user}","gists_url":"https://api.github.com/users/horaceho/gists{/gist_id}","starred_url":"https://api.github.com/users/horaceho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/horaceho/subscriptions","organizations_url":"https://api.github.com/users/horaceho/orgs","repos_url":"https://api.github.com/users/horaceho/repos","events_url":"https://api.github.com/users/horaceho/events{/privacy}","received_events_url":"https://api.github.com/users/horaceho/received_events","type":"User","site_admin":false},"created_at":"2016-01-20T04:19:34Z","updated_at":"2016-01-20T04:19:34Z","body":"Some more information ... \r\n\r\nIf I the run the code in Xcode and enable one of the following diagnostic options:\r\n\r\n- **Enable Malloc Scribble.** Fill allocated memory with 0xAA and deallocated memory with 0x55.\r\n- **Enable Guard Malloc.** Use libgmalloc to catch common memory problems such as buffer overruns and use-after-free.\r\n\r\nXcode is able to catch the error and generates an **EXC_BAD_ACCESS**."}}