Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

So Much crashing

Discussion in '2020.2 Beta' started by CDF, Oct 29, 2020.

  1. lagalot123


    Nov 12, 2015
    Unity 2021.1.18f1 crash while entering play mode after changing a script:

    Code (CSharp):
    1. ========== OUTPUTTING STACK TRACE ==================
    3. 0x00007FFA88B44ED9 (KERNELBASE) RaiseException
    4. 0x00007FFA1A846025 (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\utils\mono-log-common.c:142] mono_log_write_logfile
    5. 0x00007FFA1A834CC3 (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\eglib\goutput.c:141] monoeg_assertion_message
    6. 0x00007FFA1A86661F (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\metadata\class.c:8926] mono_array_element_size
    7. 0x00007FF694FF156A (Unity) StreamedBinaryWrite::TransferSTLStyleArray<ArrayOfManagedObjectsTransferer>
    8. 0x00007FF69500A761 (Unity) Transfer_ManagedObject<StreamedBinaryWrite,1>
    9. 0x00007FF694FE403C (Unity) TransferField_LinearCollection<ReportScriptingObjectsTransfer>
    10. 0x00007FF69443F8A6 (Unity) ExecuteSerializationCommands<ConfigSettingsRead>
    11. 0x00007FF69500A662 (Unity) Transfer_ManagedObject<StreamedBinaryRead,0>
    12. 0x00007FF69443F8A6 (Unity) ExecuteSerializationCommands<ConfigSettingsRead>
    13. 0x00007FF69500A662 (Unity) Transfer_ManagedObject<StreamedBinaryRead,0>
    14. 0x00007FF694F78696 (Unity) ExecuteSerializationCommands<SafeBinaryRead>
    15. 0x00007FF694F878DE (Unity) TransferScriptingObject<StreamedBinaryWrite,0>
    16. 0x00007FF694F8FD5F (Unity) SerializableManagedRefBackupGenerator::ExtractBackupFromInstance
    17. 0x00007FF694F8C4EE (Unity) MonoBehaviour::BackupAndDeflateManagedReferences
    18. 0x00007FF69501577A (Unity) SerializableManagedRefsUtilities::BackupAndDeflateAll
    19. 0x00007FF694F8C9C4 (Unity) MonoManager::BeginReloadAssembly
    20. 0x00007FF694F959B3 (Unity) MonoManager::ReloadAssembly
    21. 0x00007FF695737BEE (Unity) ReloadAllUsedAssemblies
    22. 0x00007FF695717365 (Unity) EditorSceneManager::RestoreSceneBackups
    23. 0x00007FF6954675D0 (Unity) PlayerLoopController::EnterPlayMode
    24. 0x00007FF6954749D1 (Unity) PlayerLoopController::SetIsPlaying
    25. 0x00007FF695477A45 (Unity) Application::TickTimer
    26. 0x00007FF69587B691 (Unity) MainMessageLoop
    27. 0x00007FF69587F2C6 (Unity) WinMain
    28. 0x00007FF6973E6332 (Unity) __scrt_common_main_seh
    29. 0x00007FFA88F57034 (KERNEL32) BaseThreadInitThunk
    30. 0x00007FFA8AF22651 (ntdll) RtlUserThreadStart
    32. ========== END OF STACKTRACE ===========
  2. RV1


    Nov 18, 2012
    This might be of help to some people in this thread, but I have also been plagued with similar crashes for a long time now. The crashes would occur either after compilation or entering play in editor. I was able to stumble upon a 100% repro and it involved opening project settings and clicking on Burst AOT Settings, then entering play in editor. What was happening was that the loading of Burst json settings file (which contained invalid settings from older versions of Burst which had never been updated) had resulted in what I believe to be some sort of corruption in Unity's serialization system which would only result in a crash once entering play mode or recompiling scripts.

    The fix was to go to the ProjectSettings folder and delete 3 json settings files relating to Burst AOT and allow them to be regenerated in the project.

    I'm not entirely convinced this is the only cause of these crashes and there could be other places in the engine where there are similar issues.

    However if you are using Burst in your project this will probably help you. This crash was reproducible in Unity 2019, 2020 and 2021. A fix has supposedly been introduced into the package Burst 1.6.1 - "Fixed a crash that could occur when loading legacy Burst AOT settings and then entering play mode".

    Link to issue:
    chadfranklin47 likes this.
  3. shekalo


    Dec 21, 2017
    Has anyone figured this stuff out yet? Tried RV1's Burst AOT fix didn't change for me. Is it something to do with Mono or needing to update that?
  4. Miladin_Kolarski


    Jun 25, 2020
    Guys i think i can confirm that this is Serialization problem. We use Newtonsoft Json Serializer in our Unity project and often when trying to serialize class it throws exception, but the problem is that Unity also crashes after that. And then it can happen that it also crashes when i reload Unity or on the next play mode, or most of the time on exit play mode. What is most frustrating is that often i do the same exact thing, and sometimes it passes the serialization but sometimes it throws exception, and after exit play mode it crashes the Unity. Same proces, same class serialization..
  5. SomeGuy22


    Jun 3, 2011
    Wanted to chime in and say that I've been getting pretty similar crashes to the original poster and I'm using Unity 2020.3.22f1 with URP. They started after I installed Magica Cloth from the Asset Store, which uses Burst and Unity Jobs as dependencies. I've been reporting my crash information over at this thread, and I submitted a bug report with all of the crash dumps, logs, my entire project, and 2 videos demonstrating the problem.

    I'm still on Burst 1.5.6 so maybe upgrading will help, but I'm not too confident about that. Much like some of the other logs posted here, some of my stacktraces eventually landed at ExecuteSerializationCommands and went a little further. However, some of my other editor logs had "Missing stacktrace" or MarkDependencies so it's not an exact match. Could be looking at multiple crash issues all stemming from the introduction of Burst/Unity Jobs into the project, but I'm really not sure what else I can do to diagnose the problem at this point.
  6. Miladin_Kolarski


    Jun 25, 2020
  7. Kamyker


    May 14, 2013
  8. Miladin_Kolarski


    Jun 25, 2020
    Yes but i think it solved it for us. We were using NewtonsoftJson for serialization and we had crashes all the time. After we updated serialization to this one, crashes are gone, it deals better with null values, etc. I mean, try it, if it works, great, if not, then we had a different problem i guess.
    shekalo likes this.
  9. AxelHu20


    Apr 30, 2020
    Is this issue fixed? I have an editor tool analysing my own code(load and check some dll), it works fine in 2020.3.9. However, after updating to 2020.3.24 it crashes constantly on opening Unity editor.

    The crash log looks similar.
    Code (CSharp):
    1. * Assertion at ..\mono\metadata\unity-liveness.c:232, condition `res' not met
    3. Crash!!!
    4. ========== OUTPUTTING STACK TRACE ==================
    6. 0x00007FFC02F2D759 (KERNELBASE) RaiseException
    7. 0x00007FFB83F56025 (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\utils\mono-log-common.c:142] mono_log_write_logfile
    8. 0x00007FFB83F44CC3 (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\eglib\goutput.c:141] monoeg_assertion_message
    9. 0x00007FFB8405EFAC (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\metadata\unity-liveness.c:232] validate_object_value
    10. 0x00007FFB8405DC6D (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\metadata\unity-liveness.c:350] mono_traverse_object_internal
    11. 0x00007FFB8405E7D9 (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\metadata\unity-liveness.c:710] mono_unity_liveness_calculation_from_statics
    12. 0x00007FF61BC39418 (Unity) GarbageCollectSharedAssets
    13. 0x00007FF61BC7F186 (Unity) UnloadUnusedAssetsOperation::IntegrateMainThread
    14. 0x00007FF61BC82E46 (Unity) PreloadManager::UpdatePreloadingSingleStep
    15. 0x00007FF61BC835CF (Unity) PreloadManager::WaitForAllAsyncOperationsToComplete
    16. 0x00007FF61D70157A (Unity) EditorSceneManager::RestoreSceneBackups
    17. 0x00007FF61D701AC9 (Unity) EditorSceneManager::RestoreSceneManagerSetup
    18. 0x00007FF61D6FBC07 (Unity) EditorSceneManager::LoadSceneManagerSetup
    19. 0x00007FF61D09563E (Unity) RestoreLastOpenedScenes
    20. 0x00007FF61D0862AA (Unity) Application::FinishLoadingProject
    21. 0x00007FF61DA43466 (Unity) WinMain
    22. 0x00007FF61F7F43F6 (Unity) __scrt_common_main_seh
    23. 0x00007FFC04B17034 (KERNEL32) BaseThreadInitThunk
    24. 0x00007FFC05662651 (ntdll) RtlUserThreadStart
    26. ========== END OF STACKTRACE ===========
  10. lagalot123


    Nov 12, 2015
    Unity 2021.2.7f1
    Code (CSharp):
    1. =================================================================
    2.     Native Crash Reporting
    3. =================================================================
    4. Got a UNKNOWN while executing native code. This usually indicates
    5. a fatal error in the mono runtime or one of the native libraries
    6. used by your application.
    7. =================================================================
    9. =================================================================
    10.     Managed Stacktrace:
    11. =================================================================
    12.       at <unknown> <0xffffffff>
    13.       at UnityEditor.SerializedObject:Update <0x00090>
    14.       at UnityEditor.TransformInspector:OnInspectorGUI <0x0015a>
    15.       at <>c__DisplayClass59_0:<CreateIMGUIInspectorFromEditor>b__0 <0x00a23>
    16.       at UnityEngine.UIElements.IMGUIContainer:DoOnGUI <0x008ce>
    17.       at UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent <0x0040a>
    18.       at UnityEngine.UIElements.IMGUIContainer:DoIMGUIRepaint <0x004ea>
    19.       at UnityEngine.UIElements.UIR.RenderChainCommand:ExecuteNonDrawMesh <0x00543>
    20.       at UnityEngine.UIElements.UIR.UIRenderDevice:EvaluateChain <0x01612>
    21.       at UnityEngine.UIElements.UIR.RenderChain:Render <0x006e2>
    22.       at UnityEngine.UIElements.UIRRepaintUpdater:Update <0x00252>
    23.       at UnityEngine.UIElements.VisualTreeUpdater:UpdateVisualTreePhase <0x0009d>
    24.       at UnityEngine.UIElements.Panel:UpdateForRepaint <0x000aa>
    25.       at UnityEngine.UIElements.Panel:Repaint <0x001ba>
    26.       at UnityEngine.UIElements.UIElementsUtility:DoDispatch <0x000de>
    27.       at UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent <0x000f2>
    28.       at UnityEngine.UIElements.UIEventRegistration:ProcessEvent <0x0008e>
    29.       at <>c:<.cctor>b__1_2 <0x0002a>
    30.       at UnityEngine.GUIUtility:ProcessEvent <0x0005c>
    31.       at <Module>:runtime_invoke_void_int_intptr_intptr& <0x00095>
    32. =================================================================
    33. Received signal SIGSEGV
    34. Obtained 2 stack frames
    35. RtlLookupFunctionEntry returned NULL function. Aborting stack walk.
    36. <Missing stacktrace information>
  11. Noisecrime


    Apr 7, 2010
    Just to add my own experiences to the thread.

    I've been stuck on 2019.4.28f for several years now as my main editor and in that time I maybe got a crash once every few months in Unity that was outside of obvious user error. Since moving to 2021.2.8f1 for a new project using HDRP and VFX i've had very similar crashes to whats been posted here every few days!

    Like others it seems to always happen during a recompile, either after exiting play mode or returning from VisualStudio 2019. I have the editor set to not recompile until exiting play mode - though I swear it actually recompiles while playing, but doesn't reload the domains - maybe thats expected behaviour now.

    There is no obvious cause with these crashes, the stacktrace is frequently different, though I have noticed two instance of it occurring during UnityEngine.UI.BaseMeshEffect:OnValidate. The lack of freqeuncy of the crashes and the fact it doesn't seem to occur in the same method suggests to me that something else is going on here, perhaps higher up the stackTrace, maybe with SerializableReferences as others have suggested.

    Code (CSharp):
    2. =================================================================
    3.     Native Crash Reporting
    4. =================================================================
    5. Got a UNKNOWN while executing native code. This usually indicates
    6. a fatal error in the mono runtime or one of the native libraries
    7. used by your application.
    8. =================================================================
    9. =================================================================
    10.     Managed Stacktrace:
    11. =================================================================
    12. =================================================================
    13. Crash!!!
    15. <snip>
    16. ========== OUTPUTTING STACK TRACE ==================
    17. 0x000001356A3234FF (Mono JIT Code) [C:\Develop\Akvfx 2021.2.8f1_2022.02.07.0127\Library\PackageCache\com.unity.ugui@1.0.0\Runtime\UI\Core\VertexModifiers\BaseMeshEffect.cs:104] UnityEngine.UI.BaseMeshEffect:OnValidate ()
    18. 0x000001356A32314B (Mono JIT Code) [C:\Develop\Akvfx 2021.2.8f1_2022.02.07.0127\Library\PackageCache\com.unity.ugui@1.0.0\Runtime\UI\Core\VertexModifiers\Shadow.cs:32] UnityEngine.UI.Shadow:OnValidate ()
    19. 0x00000135657D0828 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    20. 0x00007FF8BC6DE034 (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\mini\mini-runtime.c:3445] mono_jit_runtime_invoke
    21. 0x00007FF8BC61E724 (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\object.c:3064] do_runtime_invoke
    22. 0x00007FF8BC61E8BC (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\object.c:3111] mono_runtime_invoke
    23. 0x00007FF712E44E44 (Unity) scripting_method_invoke
    24. 0x00007FF712E3FA64 (Unity) ScriptingInvocation::Invoke
    25. 0x00007FF712E3FB4E (Unity) ScriptingInvocation::InvokeChecked
    26. 0x00007FF712EB8D66 (Unity) SerializableManagedRef::CallMethod
    27. 0x00007FF712E0D7DD (Unity) MonoBehaviour::CheckConsistency
    28. 0x00007FF712E0BFA4 (Unity) MonoBehaviour::AwakeAfterRestoreFromBackup
    29. 0x00007FF712EB875B (Unity) SerializableManagedRefsUtilities::AwakeInstancesAfterBackupRestoration
    30. 0x00007FF712E0EEF0 (Unity) MonoManager::EndReloadAssembly
    31. 0x00007FF712E166F8 (Unity) MonoManager::ReloadAssembly
    32. 0x00007FF713D2DB5E (Unity) Internal_ADB_Only_ReloadAllUsedAssemblies
    33. 0x00007FF7141D751E (Unity) ImportOutOfDateAssets
    34. 0x00007FF7141E30E3 (Unity) RefreshInternalV2
    35. 0x00007FF7141ECAC1 (Unity) StopAssetImportingV2Internal
    36. 0x00007FF7141E42EC (Unity) RefreshV2
    37. 0x00007FF714169700 (Unity) AssetDatabase::Refresh
    38. 0x00007FF713A27992 (Unity) ApplicationAutoRefresh
    39. 0x00007FF713E98D71 (Unity) ContainerWindow::ContainerWndProc
    40. 0x00007FF933CCE858 (USER32) CallWindowProcW
    41. 0x00007FF933CCE3DC (USER32) DispatchMessageW
    42. 0x00007FF933CE0BC3 (USER32) SendMessageTimeoutW
    43. 0x00007FF934570BA4 (ntdll) KiUserCallbackDispatcher
    44. 0x00007FF931F91064 (win32u) NtUserPeekMessage
    45. 0x00007FF933CCA5C3 (USER32) PeekMessageW
    46. 0x00007FF933CCA523 (USER32) PeekMessageW
    47. 0x00007FF713E77BDD (Unity) MainMessageLoop
    48. 0x00007FF713E7C90B (Unity) WinMain
    49. 0x00007FF71518D942 (Unity) __scrt_common_main_seh
    50. 0x00007FF9329E7034 (KERNEL32) BaseThreadInitThunk
    51. 0x00007FF934522651 (ntdll) RtlUserThreadStart
    52. ========== END OF STACKTRACE ===========
  12. LeonhardP


    Unity Technologies

    Jul 4, 2016
    Hi everybody,

    We recently fixed an issue that might be responsible for the crashes you have been experiencing.

    The fix landed in


    Could you please upgrade to one of these or later versions and see if that helps with the crashing?
    skinwalker likes this.
  13. TJNBG


    Apr 7, 2021
    Great to hear!
    Are there plans to backport it to 2021.1 as well? 2021.2 still has the super long build time issue.
    LeonhardP likes this.
  14. LeonhardP


    Unity Technologies

    Jul 4, 2016
    No, 2021.1 is no longer receiving updates since 2021.2 has been released.

    Updates and bug fixes are added to the current Tech Stream release on a weekly basis until the next Tech Stream release is officially published.
  15. skinwalker


    Apr 10, 2015
    I've been struggling with that issue for a year now, after getting 15 crashes on 03/05 I updated from 2020.3.18 to 2020.3.30, so far for around 3 days of testing I haven't seen a crash, but sometimes this issue doesn't appear for a few days, so I will keep updating.

    Can you give us more details what was causing this issue and how it got fixed? I couldn't find it in the issuetracker nor in the patch notes. I have used unity 5, 2017, 2018, 2019.1, but never seen this bug before jumping on 2019.4, so my guess is something to do with the new look of the unity editor. In my case it happens during scripts recompilation or when I press play to enter play mode.

  16. Noisecrime


    Apr 7, 2010
    Just a quick follow up to my post from a month ago.

    I was unable to upgrade from Unity 2021.2.8f1 due to being late stage project development. However I have seemingly being able to minimise crashes, at least those that would hard crash Unity.

    This was achieved via changing Player Settings -> Editor -> EnterPlayModeOptions, where I enabled both 'Reload Domain' and 'Reload Scene', which I'm pretty sure were both disabled by default, but strangely the EnterPlayModeOptions was enabled by default.

    Obviously I cannot be 100% sure this fixed anything and it isn't just weird confirmation bias, but I barely remember any crashes in the project since then and before that I was getting one every day or two. It also sounds reasonable since my crashes were nearly always when starting or stopping playback in the editor.

    Anyway its frustrating as these settings seem to make starting and stopping Unity playback take longer than it should, but i'll take the over hard crashes. I wonder if there is some better combination of these settings, and if EnterPlayModeOptions does anything more than allow you to change the other settings.

    However due to the frequency of crashes I have also changed my behaviour somewhat to avoid doing things that seemed to lead to them, such as editing VFX graph on the fly whilst project was running etc ( crash would sometimes happen after stopping or re-playing in the editor after doing that ). But also because I can't help feeling that Unity is actually crashing frequently in the background, but not taking down the editor!

    I say this because whenever I checked task manager and the Unity process I have half a dozen or more UnityCrashHandler64.exe and UnityAutoQuitter.exe running under it. There also seem to be more crash log folders than obvious crashes of the editor. Can't say for certain, but it does seem odd.