-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix crash during import bone remap. #87905
Conversation
While it shouldn't crash the fact that it didn't already use a permissive check makes me think this should cause an error instead and abort importing |
I suspect that would change previous behavior where it would rename/remap the bones it couldn't match and not the others which might break peoples import workflows. |
No previous behaviour would change though would it? It'd just crash before, I mean specifically when the original crash condition occurs? |
Prior to 96a95cb this worked just fine and didn't crash either. |
Wasn't aware of that part, but that was a case where it shouldn't have manipulated the map anyway so no intentional behaviour was changed The map is intentionally filled with valid entries and then previously copied, so the values weren't supposed to be added I'd say Id suspect the previous copy instead of passing as const was an oversight, which was exposed by that change But I'm not sure, we'll see what the relevant teams say 🙂 |
I suspect we don't want to warn. I partially only added them to confirm it was working but hey are a bit too verbose. Maybe only in dev builds or if at all. |
The HashMap being used by can fail to find a bone to remap which will result in a crash since the HashMap is const. Use the find method on the hashmap to loop values and gracefully handle the failure to find the bone instead of crashing.
5de5bca
to
09d2f91
Compare
Adding MRP to help in getting this merged at some point. |
@TokageItLab if you want to review. |
I don't believe t his PR is needed anymore. The merging of #81746 included the same type of changes(using the find methods on the hashmap). |
Thanks for the contribution! |
The HashMap being used by can fail to find a bone to remap which will result in a crash since the HashMap is const.
Use the find method on the hashmap to loop values and gracefully handle the failure to find the bone instead of crashing.
Fixes: #87904