Search Unity

[Windows] Crash caused by Animator::UpdateAvatars

Discussion in 'Windows' started by gb_PRELOADED, Jul 28, 2021.

  1. gb_PRELOADED

    gb_PRELOADED

    Joined:
    Jul 28, 2021
    Posts:
    1
    Hi,

    We are facing a random crash in a build made with Unity 2019.2.16f1.
    With WinDbg, running !analyze -v after setting .sympath+ SRV*c:\symbols-cache*http://symbolserver.unity3d.com revealed this:

    Code (CSharp):
    1. ************* Path validation summary **************
    2. Response                         Time (ms)     Location
    3. Deferred                                       srv*
    4. Deferred                                       SRV*c:\symbols-cache*http://symbolserver.unity3d.com/
    5. 0:000> !analyze -v
    6. *******************************************************************************
    7. *                                                                             *
    8. *                        Exception Analysis                                   *
    9. *                                                                             *
    10. *******************************************************************************
    11.  
    12. *** WARNING: Unable to verify timestamp for T******.exe
    13. *** WARNING: Unable to verify checksum for mono-2.0-bdwgc.dll
    14. *** WARNING: Unable to verify timestamp for nvwgf2umx.dll
    15.  
    16. KEY_VALUES_STRING: 1
    17.  
    18.     Key  : AV.Dereference
    19.     Value: NullClassPtr
    20.  
    21.     Key  : AV.Fault
    22.     Value: Write
    23.  
    24.     Key  : Analysis.CPU.mSec
    25.     Value: 7593
    26.  
    27.     Key  : Analysis.DebugAnalysisManager
    28.     Value: Create
    29.  
    30.     Key  : Analysis.Elapsed.mSec
    31.     Value: 12858
    32.  
    33.     Key  : Analysis.Init.CPU.mSec
    34.     Value: 514
    35.  
    36.     Key  : Analysis.Init.Elapsed.mSec
    37.     Value: 56411
    38.  
    39.     Key  : Analysis.Memory.CommitPeak.Mb
    40.     Value: 322
    41.  
    42.     Key  : Timeline.Process.Start.DeltaSec
    43.     Value: 2123
    44.  
    45.     Key  : WER.OS.Branch
    46.     Value: vb_release
    47.  
    48.     Key  : WER.OS.Timestamp
    49.     Value: 2019-12-06T14:06:00Z
    50.  
    51.     Key  : WER.OS.Version
    52.     Value: 10.0.19041.1
    53.  
    54.     Key  : WER.Process.Version
    55.     Value: 2019.2.16.35214
    56.  
    57.  
    58. CONTEXT:  (.ecxr)
    59. rax=0000000000000000 rbx=0000007eda1befe0 rcx=0000000000000001
    60. rdx=0000022ca777d760 rsi=0000000000000001 rdi=0000000000000000
    61. rip=00007ff9c5e90fce rsp=0000007eda1bed40 rbp=0000007eda1bee40
    62. r8=0000022d0c46f800  r9=0000007eda1bec88 r10=0000000000000000
    63. r11=0000007eda1beb80 r12=0000000000000000 r13=0000022ca6dfd278
    64. r14=000000000000006e r15=0000000000000001
    65. iopl=0         nv up ei pl nz na po cy
    66. cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010207
    67. UnityPlayer!Animator::UpdateAvatars+0x89e:
    68. 00007ff9`c5e90fce c6405201        mov     byte ptr [rax+52h],1 ds:00000000`00000052=??
    69. Resetting default scope
    70.  
    71. EXCEPTION_RECORD:  (.exr -1)
    72. ExceptionAddress: 00007ff9c5e90fce (UnityPlayer!Animator::UpdateAvatars+0x000000000000089e)
    73.    ExceptionCode: c0000005 (Access violation)
    74.   ExceptionFlags: 00000000
    75. NumberParameters: 2
    76.    Parameter[0]: 0000000000000001
    77.    Parameter[1]: 0000000000000052
    78. Attempt to write to address 0000000000000052
    79.  
    80. PROCESS_NAME:  T************.exe
    81.  
    82. WRITE_ADDRESS:  0000000000000052
    83.  
    84. ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.
    85.  
    86. EXCEPTION_CODE_STR:  c0000005
    87.  
    88. EXCEPTION_PARAMETER1:  0000000000000001
    89.  
    90. EXCEPTION_PARAMETER2:  0000000000000052
    91.  
    92. STACK_TEXT:
    93. 0000007e`da1bed40 00007ff9`c6626573     : 00000000`0000006e 00000000`00000000 00000000`00000000 00000000`00000000 : UnityPlayer!Animator::UpdateAvatars+0x89e
    94. 0000007e`da1bf080 00007ff9`c6528977     : 0000022c`b4d62880 00000000`00000000 0000022c`b4d628e8 0000022c`00000000 : UnityPlayer!DirectorManager::ExecuteStage+0x113
    95. 0000007e`da1bf0c0 00007ff9`c6528a19     : 00000000`ff515700 00007ff9`f6f5eb96 00000000`00000001 0000022c`b4d62748 : UnityPlayer!ExecutePlayerLoop+0x57
    96. 0000007e`da1bf270 00007ff9`c652aa12     : 00000000`0000097c 00000000`0000000a 00000000`00000000 00000000`0000097c : UnityPlayer!ExecutePlayerLoop+0xf9
    97. 0000007e`da1bf420 00007ff9`c62f3155     : 00000000`0000097c 00000000`00000000 00000000`00000000 00000000`0000000a : UnityPlayer!PlayerLoop+0x92
    98. 0000007e`da1bf4a0 00007ff9`c62f1bca     : 00000000`0000097c 0000007e`da1bf640 00000000`00000000 00000000`00000000 : UnityPlayer!PerformMainLoop+0x1c5
    99. 0000007e`da1bf4d0 00007ff9`c62f5c01     : 00000000`00000001 00000000`00000000 0000007e`da1bf640 00000000`00000000 : UnityPlayer!MainMessageLoop+0xda
    100. 0000007e`da1bf540 00007ff9`c62f954b     : 00000000`0000000a 00000000`00000000 00000000`00000000 00007ff7`e34eb278 : UnityPlayer!UnityMainImpl+0xce1
    101. 0000007e`da1cf8d0 00007ff7`e34e11f2     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : UnityPlayer!UnityMain+0xb
    102. 0000007e`da1cf900 00000000`00000000     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : T**********!__scrt_common_main_seh+0x106
    103.  
    104.  
    105. FAULTING_SOURCE_LINE:  c:\buildslave\unity\build\modules\animation\animator.cpp
    106.  
    107. FAULTING_SOURCE_FILE:  c:\buildslave\unity\build\modules\animation\animator.cpp
    108.  
    109. FAULTING_SOURCE_LINE_NUMBER:  1230
    110.  
    111. FAULTING_SOURCE_CODE:
    112. No source found for 'c:\buildslave\unity\build\modules\animation\animator.cpp'
    113.  
    114.  
    115. SYMBOL_NAME:  UnityPlayer!Animator::UpdateAvatars+89e
    116.  
    117. MODULE_NAME: UnityPlayer
    118.  
    119. IMAGE_NAME:  UnityPlayer.dll
    120.  
    121. STACK_COMMAND:  ~0s ; .ecxr ; kb
    122.  
    123. FAILURE_BUCKET_ID:  NULL_CLASS_PTR_WRITE_c0000005_UnityPlayer.dll!Animator::UpdateAvatars
    124.  
    125. OS_VERSION:  10.0.19041.1
    126.  
    127. BUILDLAB_STR:  vb_release
    128.  
    129. OSPLATFORM_TYPE:  x64
    130.  
    131. OSNAME:  Windows 10
    132.  
    133. IMAGE_VERSION:  2019.2.16.35214
    134.  
    135. FAILURE_ID_HASH:  {e64e4571-00a2-1996-ee15-5e7807ea6cf9}
    136.  
    137. Followup:     MachineOwner
    138. ---------
    What could be the cause of this crash?
    Attached the crash.dmp.
     

    Attached Files:

    Last edited: Jul 29, 2021
  2. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    Where similar issues have occurred, they were generally caused by the Animator internal buffers being invalidated through an unexpected code path.

    You can look at places where
    • you disable GameObjects with Animators, Animator components
    • you connect Playables outside of Playable.PrepareFrame or MonoBehaviour.Update or MonoBehaviour.LateUpdate,
    • You manually update an Animator, PlayableGraph or Timeline outside of MonoBehaviour.Update or MonoBehaviour.LateUpdate
    Assuming the source code line in the crash dump is accurate, I couldn't find a way for this to happen, so I can't tell you what caused it without being able to reproduce it.

    What I can tell you is that we haven't received any UpdateAvatars crash report after 2020.1.0b11, but I could not find any release note related to that kind of crash in the 2020.1 release notes, so it was probably fixed as part as another change.