{"action":"created","issue":{"url":"https://api.github.com/repos/photonstorm/phaser/issues/1884","labels_url":"https://api.github.com/repos/photonstorm/phaser/issues/1884/labels{/name}","comments_url":"https://api.github.com/repos/photonstorm/phaser/issues/1884/comments","events_url":"https://api.github.com/repos/photonstorm/phaser/issues/1884/events","html_url":"https://github.com/photonstorm/phaser/issues/1884","id":92436779,"number":1884,"title":"Changing states with box2d enabled causes crash","user":{"login":"tom2strobl","id":557074,"avatar_url":"https://avatars.githubusercontent.com/u/557074?v=3","gravatar_id":"","url":"https://api.github.com/users/tom2strobl","html_url":"https://github.com/tom2strobl","followers_url":"https://api.github.com/users/tom2strobl/followers","following_url":"https://api.github.com/users/tom2strobl/following{/other_user}","gists_url":"https://api.github.com/users/tom2strobl/gists{/gist_id}","starred_url":"https://api.github.com/users/tom2strobl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tom2strobl/subscriptions","organizations_url":"https://api.github.com/users/tom2strobl/orgs","repos_url":"https://api.github.com/users/tom2strobl/repos","events_url":"https://api.github.com/users/tom2strobl/events{/privacy}","received_events_url":"https://api.github.com/users/tom2strobl/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-07-01T17:08:31Z","updated_at":"2015-07-02T10:15:07Z","closed_at":"2015-07-01T21:48:41Z","body":"See http://www.html5gamedevs.com/topic/13753-changing-states-with-box2d-causes-crash/\r\n\r\nWhen calling ```game.physics.startSystem(Phaser.Physics.BOX2D);``` and changing the state afterwards it crashes. Stack Tracing paths to ```this.world.GetGravity().Clone();``` in World.js – it seems ```GetGravity()``` is not returning something and therefore crashing the following ```Clone()``` with ```.Clone is not a function```.\r\n\r\nAny ideas/hacks/workarounds?"},"comment":{"url":"https://api.github.com/repos/photonstorm/phaser/issues/comments/117990316","html_url":"https://github.com/photonstorm/phaser/issues/1884#issuecomment-117990316","issue_url":"https://api.github.com/repos/photonstorm/phaser/issues/1884","id":117990316,"user":{"login":"photonstorm","id":164476,"avatar_url":"https://avatars.githubusercontent.com/u/164476?v=3","gravatar_id":"","url":"https://api.github.com/users/photonstorm","html_url":"https://github.com/photonstorm","followers_url":"https://api.github.com/users/photonstorm/followers","following_url":"https://api.github.com/users/photonstorm/following{/other_user}","gists_url":"https://api.github.com/users/photonstorm/gists{/gist_id}","starred_url":"https://api.github.com/users/photonstorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/photonstorm/subscriptions","organizations_url":"https://api.github.com/users/photonstorm/orgs","repos_url":"https://api.github.com/users/photonstorm/repos","events_url":"https://api.github.com/users/photonstorm/events{/privacy}","received_events_url":"https://api.github.com/users/photonstorm/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T10:15:07Z","updated_at":"2015-07-02T10:15:07Z","body":"Thanks guys :)\r\n\r\nNow I'm back at work properly I'll be wrapping up Phaser 2.4 and then (finally) releasing the Advanced Particles Plugin - which I'm sure everyone will love :)"}}