Fix crash on changing skins when classic mod is enabled and game is rewound #29406
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I can't mentally figure out what is leading to the issue here, but in the case where
prepareDrawables
is called fromJudgementBody.OnSkinChanged
, things go very wrong. It's a weird recursive-like call that really shouldn't have existed in the first place. I think a smell test is enough for anyone to agree that the flow was very bad.Removing this call doesn't seem to cause any issues.
runAnimation
should always be called inPrepareForUse
(both pooled and non-pooled scenarios) so things should still always be in a correct state.Closes #29398.
If anyone wishes to try and track down the actual underlying cause of this:
Doesn't matter what skin before/after. It's clearly something to do with the classic skin slider logic, and probably something to do with different lifetimes making this only happen for said scenario. Alternatively test that this is fixed and not worry about why it happened (probably irrelevant).