{"action":"opened","issue":{"url":"https://api.github.com/repos/arcadia-unity/Arcadia/issues/144","labels_url":"https://api.github.com/repos/arcadia-unity/Arcadia/issues/144/labels{/name}","comments_url":"https://api.github.com/repos/arcadia-unity/Arcadia/issues/144/comments","events_url":"https://api.github.com/repos/arcadia-unity/Arcadia/issues/144/events","html_url":"https://github.com/arcadia-unity/Arcadia/issues/144","id":118238933,"number":144,"title":"Super subtle bug with swap!","user":{"login":"MysteryMachine","id":1575039,"avatar_url":"https://avatars.githubusercontent.com/u/1575039?v=3","gravatar_id":"","url":"https://api.github.com/users/MysteryMachine","html_url":"https://github.com/MysteryMachine","followers_url":"https://api.github.com/users/MysteryMachine/followers","following_url":"https://api.github.com/users/MysteryMachine/following{/other_user}","gists_url":"https://api.github.com/users/MysteryMachine/gists{/gist_id}","starred_url":"https://api.github.com/users/MysteryMachine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MysteryMachine/subscriptions","organizations_url":"https://api.github.com/users/MysteryMachine/orgs","repos_url":"https://api.github.com/users/MysteryMachine/repos","events_url":"https://api.github.com/users/MysteryMachine/events{/privacy}","received_events_url":"https://api.github.com/users/MysteryMachine/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-22T04:41:06Z","updated_at":"2015-11-22T04:41:06Z","closed_at":null,"body":"I think this one has something to do with how Unity doesn't do multi threading well, but ok. I had Unity crashing for seemingly no reason, with no real helpful errors, or anything, for like two days now. After extensive testing, I've isolated the bug.\r\n\r\nTo produce it, in a Clojure file, create a component with an atom, and a component with a Start function. That start function should call swap! on the atom. Now, run the game, and through the REPL instantiate a prefab using Resources/Load. Add this component to the prefab. Stop running the game. Modify your Clojure file by adding a space somewhere, and save. Wait for Arcadia to recompile. Run the scene again.\r\n\r\nAt this point, you should get a bunch of errors, and a crash. Whenever you load up Unity, you should get lots of crashes until you delete the files associated with the Clojure file in Arcadia/Compiled. \r\n\r\nWorks fine if you use reset! instead.\r\n\r\nTested on the develop and unstable branches of Arcadia, on the latest version of Unity."}}