Search Issue Tracker

Won't Fix

Votes

41

Found in

2022.3.16f1

2023.2.4f1

2023.3.0b1

Issue ID

UUM-59652

Regression

No

Crash on TransformAccessClearCallback when undoing ModularAvatar > Setup Outfit

--

-

Reproduction steps:
1. Open the attached project "ReproProj"
2. Open the “/Assets/scene.unity” Scene
3. Right-click “test“ GameObject (shapell > test)
4. Select ModularAvatar > Setup Outfit
5. Press CTRL + Z
6. Repeat steps 3 - 5

Expected result: Editor does not crash and continues to run
Actual result: Editor crashes

Reproducible with: 2022.3.16f1, 2023.2.4f1, 2023.3.0b1
Could not test with: 2021.3.33f1 (No ModularAvatar option)

Reproducible on: Windows 10 Enterprise 21H2
Not reproducible on: No other environment tested

Note:
- Modular Avatar is a 3rd party plugin

  1. Resolution Note:

    The crash in TransformAccessClearCallback comes from TransformAccess data that was saved into Undo being changed without updating the Undo System. This happens during a call to a user function called RebuildLock called after the undo data has been finalised. When attempting to undo, none of the relevant Transforms exist any more and clearing/applying the serialised data regarding those Transforms fails.

    Any code where new objects are created but not explicitly saved into the Undo System cannot be considered fully undoable. Additionally the Undo System cannot be expected to recover gracefully when the data it was provided is incomplete or incorrect, it is simply pointing to invalid memory once something changes without it being informed.

    In this case the constructor OnewayArmatureLock creates hundreds of unsaved Transforms and then baseBonesAccessor is switched to this list, making the TransformAccessArray data that was saved to the Undo System invalid.

    The crash described can be avoided by registering all the 'baseBone' Transforms using Undo.RegisterCreatedObjectUndo(baseBone, "") to ensure that the Transforms referred to in the TransformAccessArray contained in the Undo action still exist.

    Alternatively if the _baseBonesAccessor TransformAccessArray is disposed using _baseBonesAccessor.Dispose() before being directly overwritten the memory is cleared correctly and the Undo system is updated accordingly.

Comments (11)

  1. sethsamson75

    Jan 02, 2024 11:44

    READ CAREFULLY
    A MESSAGE FOR VICTIMS OF FRAUD/SCAM

    It's becoming a problem how people are being victimized by scam/fraud and sadly enough, it's kind of hard to find someone to trust with the recovery of the funds or whatever have been lost. I'm afraid of getting scammed again especially by clicking any link I come across in the name of investment or recovery of lost funds. Two months ago, I was duped an appreciable amount of the BTC I have. Hired a recovery expert to get my funds back, but unfortunately, I was scammed in the process again. With so much feeling of frustration, I decided to give up everything I lost. Although I reported the case to the FBI but still, no positive outcome. I was so worried and frustrated because it was all I had in my savings plus it feels so hard for me to start saving again. I told everyone I knew about the incident, hoping that help might come. Two weeks later I read about BLISS PARADOX RECOVERY in a magazine, little did I know it was a redemption I found. I decided to take the risk again by consulting them about my lost BTC. I emailed them concerning my issues, and luckily for me, I got a reply from them that same day. Honestly speaking, I never thought I could ever get a positive outcome from the lost BTC. But they got back what I lost within 8 hours. OMG, it still feels like a dream, something too good to be true. I'm so overwhelmed sharing this story because I know there's someone out here with a similar problem seeking help. You can hire BLISS PARADOX RECOVERY, a licensed hack expert for recovery of any fraud. I would like to share the contact details you can reach out to anytime you need help or someone you know who needs help.

    Contact details below:
    MAIL: BLISSPARADOXRECOVERY @ AOL.C0M
    WHATSAPP: +1 3 8 0 2 0 6 9 7 1 2
    SIGNAL NO.: + 1 7 2 7 6 1 5 9 0 3 0
    TELEGRAM: BLISSPARADOXRECOVERY

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.