{"action":"created","issue":{"url":"https://api.github.com/repos/OpenRA/OpenRA/issues/9216","labels_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/9216/labels{/name}","comments_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/9216/comments","events_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/9216/events","html_url":"https://github.com/OpenRA/OpenRA/pull/9216","id":104165557,"number":9216,"title":"Fix Crash and Typo in UpgradeManager","user":{"login":"LipkeGu","id":2057932,"avatar_url":"https://avatars.githubusercontent.com/u/2057932?v=3","gravatar_id":"","url":"https://api.github.com/users/LipkeGu","html_url":"https://github.com/LipkeGu","followers_url":"https://api.github.com/users/LipkeGu/followers","following_url":"https://api.github.com/users/LipkeGu/following{/other_user}","gists_url":"https://api.github.com/users/LipkeGu/gists{/gist_id}","starred_url":"https://api.github.com/users/LipkeGu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LipkeGu/subscriptions","organizations_url":"https://api.github.com/users/LipkeGu/orgs","repos_url":"https://api.github.com/users/LipkeGu/repos","events_url":"https://api.github.com/users/LipkeGu/events{/privacy}","received_events_url":"https://api.github.com/users/LipkeGu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-01T01:33:07Z","updated_at":"2015-09-01T15:48:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/9216","html_url":"https://github.com/OpenRA/OpenRA/pull/9216","diff_url":"https://github.com/OpenRA/OpenRA/pull/9216.diff","patch_url":"https://github.com/OpenRA/OpenRA/pull/9216.patch"},"body":"This PR fixes a crash in UpgradeManager when invalid Data (null) in up.upgradetypes was stored. There are 2 other locations where this GetorAdd is used but these are integers.\r\n\r\nfixes #7668"},"comment":{"url":"https://api.github.com/repos/OpenRA/OpenRA/issues/comments/136766761","html_url":"https://github.com/OpenRA/OpenRA/pull/9216#issuecomment-136766761","issue_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/9216","id":136766761,"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-09-01T15:48:54Z","updated_at":"2015-09-01T15:48:54Z","body":"That stacktrace points at `World.TickRender()` trying to get `ActorsWithTrait<ITickRender>()` and eventually crashing inside the `traits.GetOrAdd(t, doCreateTraitContainer)` call made [here](https://github.com/OpenRA/OpenRA/blob/bleed/OpenRA.Game/TraitDictionary.cs#L51).\r\n\r\nSo this isn't addressing the crash reported there.\r\nAlso there are two `GetOrAdd<K, V>()` methods, and `UpgradeManager` uses the other one (not the one that crashed).\r\n\r\nP.S.: Those UpgradeType strings should be filtered at an earlier stage for `NullOrEmpty`."}}