{"action":"created","issue":{"url":"https://api.github.com/repos/OpenRA/OpenRA/issues/9718","labels_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/9718/labels{/name}","comments_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/9718/comments","events_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/9718/events","html_url":"https://github.com/OpenRA/OpenRA/pull/9718","id":112773865,"number":9718,"title":"Check HVA files validity at load time","user":{"login":"penev92","id":7137365,"avatar_url":"https://avatars.githubusercontent.com/u/7137365?v=3","gravatar_id":"","url":"https://api.github.com/users/penev92","html_url":"https://github.com/penev92","followers_url":"https://api.github.com/users/penev92/followers","following_url":"https://api.github.com/users/penev92/following{/other_user}","gists_url":"https://api.github.com/users/penev92/gists{/gist_id}","starred_url":"https://api.github.com/users/penev92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/penev92/subscriptions","organizations_url":"https://api.github.com/users/penev92/orgs","repos_url":"https://api.github.com/users/penev92/repos","events_url":"https://api.github.com/users/penev92/events{/privacy}","received_events_url":"https://api.github.com/users/penev92/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OpenRA/OpenRA/labels/PR:%20Needs%20+2","name":"PR: Needs +2","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-22T10:27:19Z","updated_at":"2015-10-25T22:28:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/9718","html_url":"https://github.com/OpenRA/OpenRA/pull/9718","diff_url":"https://github.com/OpenRA/OpenRA/pull/9718.diff","patch_url":"https://github.com/OpenRA/OpenRA/pull/9718.patch"},"body":"Currently if you provide the game with a voxel with bogus HVA file, the game will crash [here](https://github.com/OpenRA/OpenRA/blob/bleed/OpenRA.Game/Graphics/VoxelRenderer.cs#L203) after `Util.MatrixInverse(t)` returns `null` and `Util.MatrixMultiply()` chokes on it.\r\nThat, of course, happens ingame when you create the actor, which is far from ideal.\r\n\r\nThe reason in the case I debugged ( reported by @ABrandau ) was a bogus transformation matrix.\r\nThe exception, of course, was an NRE with no information whatsoever.\r\n\r\nThis throws at load time (as soon as you start up the game), and it gives a proper exception, which will hopefully help modders find their mistake."},"comment":{"url":"https://api.github.com/repos/OpenRA/OpenRA/issues/comments/150980311","html_url":"https://github.com/OpenRA/OpenRA/pull/9718#issuecomment-150980311","issue_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/9718","id":150980311,"user":{"login":"penev92","id":7137365,"avatar_url":"https://avatars.githubusercontent.com/u/7137365?v=3","gravatar_id":"","url":"https://api.github.com/users/penev92","html_url":"https://github.com/penev92","followers_url":"https://api.github.com/users/penev92/followers","following_url":"https://api.github.com/users/penev92/following{/other_user}","gists_url":"https://api.github.com/users/penev92/gists{/gist_id}","starred_url":"https://api.github.com/users/penev92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/penev92/subscriptions","organizations_url":"https://api.github.com/users/penev92/orgs","repos_url":"https://api.github.com/users/penev92/repos","events_url":"https://api.github.com/users/penev92/events{/privacy}","received_events_url":"https://api.github.com/users/penev92/received_events","type":"User","site_admin":false},"created_at":"2015-10-25T22:28:02Z","updated_at":"2015-10-25T22:28:02Z","body":"Like so?"}}