Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Bug Crashing because asmdef not refreshed?

Discussion in '2021.2 Beta' started by CDF, May 19, 2021.

  1. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,311
    Don't have a solid reproduction yet. But recently faced a constant crash issue in the Editor, where everytime I hit play, the editor crashed.
    crash.png
    The same stacktrace in every crash report:

    Code (CSharp):
    1. Stacktrace:
    2.  
    3.   at <unknown> <0xffffffff>
    4.   at (wrapper managed-to-native) UnityEngine.Object.Internal_CloneSingleWithParent (UnityEngine.Object,UnityEngine.Transform,bool) [0x00009] in <9baebf9af86541678fd15bfdbf5f26eb>:0
    5.   at UnityEngine.Object.Instantiate (UnityEngine.Object,UnityEngine.Transform,bool) [0x00024] in <9baebf9af86541678fd15bfdbf5f26eb>:0
    6.   at UnityEngine.Object.Instantiate<T_REF> (T_REF,UnityEngine.Transform,bool) [0x00009] in <9baebf9af86541678fd15bfdbf5f26eb>:0
    7.   at Malee.UI.ScreenInstantiate.InstiantiateScreens () [0x00024] in D:\Work\MyProject\Packages\com.malee\UI\Runtime\Screens\ScreenInstantiate.cs:79
    8.   at Malee.UI.ScreenInstantiate.TryInstantiate (Malee.UI.ScreenInstantiate/Instantiation) [0x00009] in D:\Work\MyProject\Packages\com.malee\UI\Runtime\Screens\ScreenInstantiate.cs:124
    9.   at Malee.UI.ScreenInstantiate.Awake () [0x00006] in D:\Work\MyProject\Packages\com.malee\UI\Runtime\Screens\ScreenInstantiate.cs:46
    10.   at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x00020] in <695d1cc93cca45069c528c15c9fdd749>:0
    11.  
    12. =================================================================
    13. Got a SIGSEGV while executing native code. This usually indicates
    14. a fatal error in the mono runtime or one of the native libraries
    15. used by your application.
    16. =================================================================
    17.  
    18. Received signal SIGSEGV
    19. Stack trace:
    20. 0x00007ff72ad051df (Unity) GeneralMonoObjectToTransferFor<ConfigSettingsRead>
    21. 0x00007ff72c4dd3e5 (Unity) Transfer_ManagedObject<StreamedBinaryWrite,0>
    22. 0x00007ff72ad050f6 (Unity) ExecuteSerializationCommands<ConfigSettingsRead>
    23. 0x00007ff72c4dd4a2 (Unity) Transfer_ManagedObject<StreamedBinaryWrite,0>
    24. 0x00007ff72bf7cfb6 (Unity) ExecuteSerializationCommands<SafeBinaryRead>
    25. 0x00007ff72bf8433e (Unity) TransferScriptingObject<StreamedBinaryWrite,0>
    26. 0x00007ff72bf80b8e (Unity) SerializableManagedRefTransfer::Transfer<SerializableManagedRefBackupGenerator>
    27. 0x00007ff72b91fe15 (Unity) CloneObjectImpl
    28. 0x00007ff72b91f2e6 (Unity) CloneObject
    29. 0x00007ff72c797863 (Unity) Object_CUSTOM_Internal_CloneSingleWithParent
    30. 0x0000017243be7c33 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Object:Internal_CloneSingleWithParent (UnityEngine.Object,UnityEngine.Transform,bool)
    31. 0x0000017243be7a9b (Mono JIT Code) UnityEngine.Object:Instantiate (UnityEngine.Object,UnityEngine.Transform,bool)
    32. 0x0000017243be79ab (Mono JIT Code) UnityEngine.Object:Instantiate<T_REF> (T_REF,UnityEngine.Transform,bool)
    33. 0x0000017243c15aa3 (Mono JIT Code) [ScreenInstantiate.cs:79] Malee.UI.ScreenInstantiate:InstiantiateScreens ()
    34. 0x0000017243c159f3 (Mono JIT Code) [ScreenInstantiate.cs:126] Malee.UI.ScreenInstantiate:TryInstantiate (Malee.UI.ScreenInstantiate/Instantiation)
    35. 0x0000017243c15993 (Mono JIT Code) [ScreenInstantiate.cs:47] Malee.UI.ScreenInstantiate:Awake ()
    36. 0x00000171dee48310 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    37. 0x00007ffb9eb0e640 (mono-2.0-bdwgc) [mini-runtime.c:2812] mono_jit_runtime_invoke
    38. 0x00007ffb9ea92ac2 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke
    39. 0x00007ffb9ea9bb1f (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke
    40. 0x00007ff72c48ab74 (Unity) scripting_method_invoke
    41. 0x00007ff72c4834c5 (Unity) ScriptingInvocation::Invoke
    42. 0x00007ff72c4838ee (Unity) ScriptingInvocation::InvokeChecked
    43. 0x00007ff72c500486 (Unity) SerializableManagedRef::CallMethod
    44. 0x00007ff72c446984 (Unity) MonoBehaviour::CallAwake
    45. 0x00007ff72c4451f5 (Unity) MonoBehaviour::AddToManager
    46. 0x00007ff72c445c21 (Unity) MonoBehaviour::AwakeFromLoad
    47. 0x00007ff72c59aaff (Unity) AwakeFromLoadQueue::InvokePersistentManagerAwake
    48. 0x00007ff72c59b452 (Unity) AwakeFromLoadQueue::PersistentManagerAwakeFromLoad
    49. 0x00007ff72c59b5da (Unity) AwakeFromLoadQueue::PersistentManagerAwakeFromLoad
    50. 0x00007ff72bdae6e6 (Unity) LoadSceneOperation::CompleteAwakeSequence
    51. 0x00007ff72bdaebc0 (Unity) LoadSceneOperation::CompletePreloadManagerLoadSceneEditor
    52. 0x00007ff72bdafcff (Unity) LoadSceneOperation::IntegrateMainThread
    53. 0x00007ff72bdb39c6 (Unity) PreloadManager::UpdatePreloadingSingleStep
    54. 0x00007ff72bdb411f (Unity) PreloadManager::WaitForAllAsyncOperationsToComplete
    55. 0x00007ff72d7cfd4a (Unity) EditorSceneManager::RestoreSceneBackups
    56. 0x00007ff72d179aaa (Unity) PlayerLoopController::EnterPlayMode
    57. 0x00007ff72d18f3cd (Unity) PlayerLoopController::SetIsPlaying
    58. 0x00007ff72d192134 (Unity) Application::TickTimer
    59. 0x00007ff72daff881 (Unity) MainMessageLoop
    60. 0x00007ff72db038c1 (Unity) WinMain
    61. 0x00007ff72f97eb56 (Unity) __scrt_common_main_seh
    62. 0x00007ffc10857034 (KERNEL32) BaseThreadInitThunk
    63. 0x00007ffc11962651 (ntdll) RtlUserThreadStart
    The code that it seems to think caused the error:

    crash_2.png

    So I decided to put a Debug.Log before the instantiate. And suddenly, no more crash!

    Which makes me think, is Unity not reloading asembly definitions or compiling the dll's correctly on Editor startup?
    Doesn't happen in all cases, seemingly random. But when it does happen, it causes constant crashes until the asmdef is reloaded again.
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Hi @CDF,

    We'd need a reproduction project to properly investigate this. Based on your description of the problem we couldn't find any known issues that would fit 100%. Nonetheless, It might be worth checking out if the issue still occurs in a19 since a couple of fixes that could be related landed there.
     
  3. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    350
    Just wanted to mention that I currently seem to experience the same bug - whenever I start and play my project for the first time since starting my computer, it crashes right at the beginning. According to the log in an Instantiate() too. After restarting Unity, it works.

    This with Unity 2020.3.22f1, but happened with earlier versions too.
     
  4. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    I also have this problem which is happening multiple times a day when I press Play or when a script compiles, I don't see anything related to Instantiate, just this

    Code (CSharp):
    1. Stacktrace:
    2.  
    3.  
    4. =================================================================
    5. Got a SIGSEGV 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. Received signal SIGSEGV
    11. Stack trace:
    12. 0x00007ff6dbcde50f (Unity) GeneralMonoObjectToTransferFor<ConfigSettingsRead>
    13. 0x00007ff6dd4fe1b5 (Unity) Transfer_ManagedObject<RemapPPtrTransfer,0>
    14. 0x00007ff6dbcdd566 (Unity) ExecuteSerializationCommands<ConfigSettingsRead>
    15. 0x00007ff6dd4fe2a7 (Unity) Transfer_ManagedObject<RemapPPtrTransfer,0>
    16. 0x00007ff6dcf849a1 (Unity) TransferScriptingObject<RemapPPtrTransfer,0>
    17. 0x00007ff6dcf818a4 (Unity) SerializableManagedRefTransfer::Transfer<SerializableManagedRefBackupGenerator>
    18. 0x00007ff6de35c096 (Unity) CollectSaveSceneDependencies::CollectWithRoots
    19. 0x00007ff6de35b75d (Unity) CollectUsedSceneObjects
    20. 0x00007ff6de35a795 (Unity) CollectAllSceneManagerAndObjectIDs
    21. 0x00007ff6de358207 (Unity) CalculateAllLevelManagersAndUsedSceneObjects
    22. 0x00007ff6de37e18c (Unity) SaveScene
    23. 0x00007ff6de81c94e (Unity) EditorSceneManager::SerializeSceneIntoFile
    24. 0x00007ff6de80bb89 (Unity) EditorSceneManager::BackupScenesFromSceneManager
    25. 0x00007ff6de1a8292 (Unity) PlayerLoopController::EnterPlayMode
    26. 0x00007ff6de1bdb0d (Unity) PlayerLoopController::SetIsPlaying
    27. 0x00007ff6de1c0874 (Unity) Application::TickTimer
    28. 0x00007ff6deb55671 (Unity) MainMessageLoop
    29. 0x00007ff6deb596b1 (Unity) WinMain
    30. 0x00007ff6e09abf46 (Unity) __scrt_common_main_seh
    31. 0x00007ff9402a7034 (KERNEL32) BaseThreadInitThunk
    32. 0x00007ff940502651 (ntdll) RtlUserThreadStart
    33.