{"action":"closed","issue":{"url":"https://api.github.com/repos/nsf/gothic/issues/8","labels_url":"https://api.github.com/repos/nsf/gothic/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/nsf/gothic/issues/8/comments","events_url":"https://api.github.com/repos/nsf/gothic/issues/8/events","html_url":"https://github.com/nsf/gothic/issues/8","id":54612423,"number":8,"title":"Possible weird garbage collection bug, not sure - confused","user":{"login":"Horkonaut","id":1691140,"avatar_url":"https://avatars.githubusercontent.com/u/1691140?v=3","gravatar_id":"","url":"https://api.github.com/users/Horkonaut","html_url":"https://github.com/Horkonaut","followers_url":"https://api.github.com/users/Horkonaut/followers","following_url":"https://api.github.com/users/Horkonaut/following{/other_user}","gists_url":"https://api.github.com/users/Horkonaut/gists{/gist_id}","starred_url":"https://api.github.com/users/Horkonaut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Horkonaut/subscriptions","organizations_url":"https://api.github.com/users/Horkonaut/orgs","repos_url":"https://api.github.com/users/Horkonaut/repos","events_url":"https://api.github.com/users/Horkonaut/events{/privacy}","received_events_url":"https://api.github.com/users/Horkonaut/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-01-16T19:07:34Z","updated_at":"2015-01-23T05:01:38Z","closed_at":"2015-01-23T05:01:38Z","body":"Hi, I am running gothic on Windows (via Horkonaut fork). I am running into a weird problem. When I run the following program, I click on the \"Hello World\" button a few times. Then I wait 8+ minutes and click on the button about 10 times. Then I wait a minute or two and the program crashes with:\r\n\r\n```\r\nfatal error: unexpected signal during runtime execution\r\n[signal 0xc0000005 code=0x0 addr=0xffffffffffffffff pc=0x40a057]\r\n```\r\n\r\nNote that if I turn off garbage collection, the program does not crash.\r\n\r\nI have tried to strip the program down to a minimal form:\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n\t// For Windows, \"github.com/Horkonaut/gothic\"\r\n\t\"github.com/nsf/gothic\"\r\n\t// Uncomment to prevent garbage collection and eliminate bug\r\n\t//\"runtime/debug\"\r\n)\r\n\r\ntype bug struct {\r\n\t*gothic.Interpreter\r\n}\r\n\r\nfunc (b *bug) TCL_OnButtonPress() {\r\n}\r\n\r\nfunc main() {\r\n\t// Uncomment to prevent garbage collection and eliminate bug\r\n\t//debug.SetGCPercent(-1)\r\n\tir := gothic.NewInterpreter(`\r\n\t\twm title . PossibleBug\t\t\r\n\t\tttk::button .button -text {Hello World} -command go::OnButtonPress\t\t\r\n\t\tpack .button\r\n\t\t\t`)\r\n\r\n\tir.RegisterCommands(\"go\", &bug{Interpreter: ir})\r\n\t<-ir.Done\r\n}\r\n```\r\n\r\nNote that if I eliminate the \"-command go::OnButtonPress\" portion of the code, it does not crash either.\r\n\r\nCould someone try to reproduce what I am seeing on a linux machine? Any ideas on what may be going on? It looks like there is some memory interaction between cgo and go that is causing a garbage collection crash.\r\n\r\nI am running:\r\n\r\ngo1.3.2 windows/amd64\r\ntcl8.6 on windows\r\n\r\nThanks for reading!"}}