{"action":"created","issue":{"url":"https://api.github.com/repos/stilldesign/PhysX.Net/issues/18","labels_url":"https://api.github.com/repos/stilldesign/PhysX.Net/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/stilldesign/PhysX.Net/issues/18/comments","events_url":"https://api.github.com/repos/stilldesign/PhysX.Net/issues/18/events","html_url":"https://github.com/stilldesign/PhysX.Net/issues/18","id":95392793,"number":18,"title":"Disposing dynamic actors in contact","user":{"login":"steenhother","id":8478119,"avatar_url":"https://avatars.githubusercontent.com/u/8478119?v=3","gravatar_id":"","url":"https://api.github.com/users/steenhother","html_url":"https://github.com/steenhother","followers_url":"https://api.github.com/users/steenhother/followers","following_url":"https://api.github.com/users/steenhother/following{/other_user}","gists_url":"https://api.github.com/users/steenhother/gists{/gist_id}","starred_url":"https://api.github.com/users/steenhother/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steenhother/subscriptions","organizations_url":"https://api.github.com/users/steenhother/orgs","repos_url":"https://api.github.com/users/steenhother/repos","events_url":"https://api.github.com/users/steenhother/events{/privacy}","received_events_url":"https://api.github.com/users/steenhother/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-16T09:36:33Z","updated_at":"2015-07-27T16:12:23Z","closed_at":null,"body":"I have two dynamic actors that are in contact.\r\nI dispose both actors by calling the RemoveActor on the scene and then Dispose on the actor.\r\n(that is of caused done synchronized - after calling Simulate() has returned)\r\nIn the next Simulation Step I get the message \"Cannot find managed object with pointer address\".\r\n\r\nThis only happens for none kinematic actors that are in contact with another dynamic actors!\r\n\r\nIs there a different way (or more safe way) to dispose an actor in contact with another actor!\r\n - or is it a bug?\r\n\r\n![actorsincontact](https://cloud.githubusercontent.com/assets/8478119/8719811/e25f4396-2bae-11e5-9f5c-ae7d5ad52306.jpg)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/stilldesign/PhysX.Net/issues/comments/125259209","html_url":"https://github.com/stilldesign/PhysX.Net/issues/18#issuecomment-125259209","issue_url":"https://api.github.com/repos/stilldesign/PhysX.Net/issues/18","id":125259209,"user":{"login":"stilldesign","id":4223821,"avatar_url":"https://avatars.githubusercontent.com/u/4223821?v=3","gravatar_id":"","url":"https://api.github.com/users/stilldesign","html_url":"https://github.com/stilldesign","followers_url":"https://api.github.com/users/stilldesign/followers","following_url":"https://api.github.com/users/stilldesign/following{/other_user}","gists_url":"https://api.github.com/users/stilldesign/gists{/gist_id}","starred_url":"https://api.github.com/users/stilldesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stilldesign/subscriptions","organizations_url":"https://api.github.com/users/stilldesign/orgs","repos_url":"https://api.github.com/users/stilldesign/repos","events_url":"https://api.github.com/users/stilldesign/events{/privacy}","received_events_url":"https://api.github.com/users/stilldesign/received_events","type":"User","site_admin":false},"created_at":"2015-07-27T16:12:23Z","updated_at":"2015-07-27T16:12:23Z","body":"Hey, yeah that makes it error. I'm not sure why PhysX would be reporting the TouchLost for an actor which has been dispose by the previous Simulate call, I would of thought it would of checked this and not raised the touchlost.\r\n\r\nThis might need further thought, but a naive fix for now could be to just change the ContactPairHeader class to use TryGetObject instead of GetObject, and have it return null for one or both of the actors it's trying to get.\r\n"}}