Search Unity

Crash every time domain reloading happens, related to Package Manager. Crash report inside

Discussion in 'Package Manager' started by Oniros88, Apr 27, 2022.

  1. Oniros88

    Oniros88

    Joined:
    Nov 15, 2014
    Posts:
    150
    =================================================================
    Native Crash Reporting
    =================================================================
    Got a UNKNOWN while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries
    used by your application.
    =================================================================

    =================================================================
    Managed Stacktrace:
    =================================================================
    at <unknown> <0xffffffff>
    at UnityEditor.PackageManager.UI.Internal.UpmBaseOperation`1:.ctor <0x00162>
    at UnityEditor.PackageManager.UI.Internal.UpmSearchOperation:.ctor <0x0001a>
    at System.Object:runtime_invoke_void__this__ <0x00087>
    =================================================================
    Received signal SIGSEGV
    Obtained 41 stack frames
    0x00007ff85c4f7399 (mono-2.0-bdwgc) [class.c:975] mono_class_inflate_generic_type_with_mempool
    0x00007ff85c7ba34c (mono-2.0-bdwgc) [mini-generic-sharing.c:726] inflate_info
    0x00007ff85c7c06b3 (mono-2.0-bdwgc) [mini-generic-sharing.c:2127] instantiate_info
    0x00007ff85c7c2451 (mono-2.0-bdwgc) [mini-generic-sharing.c:3023] fill_runtime_generic_context
    0x00007ff85c7c25e9 (mono-2.0-bdwgc) [mini-generic-sharing.c:3089] mono_class_fill_runtime_generic_context
    0x00007ff85c7b2b27 (mono-2.0-bdwgc) [mini-trampolines.c:1020] mono_rgctx_lazy_fetch_trampoline
    0x000002b3e38908c6 ((<unknown>))
    0x000002b408ab6ba3 (Mono JIT Code) UnityEditor.PackageManager.UI.Internal.UpmBaseOperation`1<T_REF>:.ctor ()
    0x000002b408ab6a1b (Mono JIT Code) UnityEditor.PackageManager.UI.Internal.UpmSearchOperation:.ctor ()
    0x000002b41518c458 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    0x00007ff85c6c0174 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
    0x00007ff85c5feb34 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
    0x00007ff85c5feccc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
    0x00007ff6fc7a5af6 (Unity) mono_runtime_object_init_exception
    0x00007ff6fc7a5b3c (Unity) mono_runtime_object_init_log_exception
    0x00007ff6fc858246 (Unity) GetOrCreateObjectStoredInField
    0x00007ff6fc8049ef (Unity) GeneralMonoObjectToTransferFor<ConfigSettingsRead>
    0x00007ff6fc84d00f (Unity) Transfer_ManagedObject<SafeBinaryRead,0>
    0x00007ff6fc7a5fb6 (Unity) ExecuteSerializationCommands<ConfigSettingsRead>
    0x00007ff6fc84d0f2 (Unity) Transfer_ManagedObject<SafeBinaryRead,0>
    0x00007ff6fc7a60d6 (Unity) ExecuteSerializationCommands<JSONRead>
    0x00007ff6fc7c0318 (Unity) <lambda_e0598d962c4e8f701fca190edc632a99>::eek:perator()
    0x00007ff6fc7ba3cc (Unity) TransferScriptingObject<SafeBinaryRead>
    0x00007ff6fc7bb9ec (Unity) SerializableManagedRefTransfer::TransferScriptingObjectWithSerializedRefSupport<SafeBinaryRead>
    0x00007ff6fc7a7d69 (Unity) SerializableManagedRefTransfer::RestoreBackupImpl<SerializableManagedRefBackupGenerator>
    0x00007ff6fc7a7a75 (Unity) SerializableManagedRefTransfer::RestoreBackup<SerializableManagedRefBackupGenerator>
    0x00007ff6fc86d396 (Unity) SerializableManagedRefsUtilities::RestoreBackups
    0x00007ff6fc7c5748 (Unity) MonoManager::FinalizeReload
    0x00007ff6fdb4f505 (Unity) ScriptingInitializer::FinalizeReload
    0x00007ff6fdbc27dc (Unity) ImportOutOfDateAssets
    0x00007ff6fdbcdcf1 (Unity) RefreshInternalV2
    0x00007ff6fdbd59af (Unity) StopAssetImportingV2Internal
    0x00007ff6fdbcf0cc (Unity) RefreshV2
    0x00007ff6fdb46290 (Unity) AssetDatabase::Refresh
    0x00007ff6fd3ea10f (Unity) Application::AutoRefresh
    0x00007ff6fd3fec87 (Unity) Application::TickTimer
    0x00007ff6fd85db0a (Unity) MainMessageLoop
    0x00007ff6fd86289e (Unity) WinMain
    0x00007ff6feba530e (Unity) __scrt_common_main_seh
    0x00007ff8d8957034 (KERNEL32) BaseThreadInitThunk
    0x00007ff8d9d62651 (ntdll) RtlUserThreadStart

    ______________________________________________________________________________
    Looks like a package manager issue.


    It doesn't happen with a fresh created project.

    Can't play unlesss I disable domain reload. It also crashes each time I update any packagemanager asset. It updates the asset correctly but crashes afterwards because it triggers a domain reload. The crash is when "completing domain" stage appears. It happens too when finishing compiling scripts after saving changes. Again, scripts compile succesfully but editor crashes afterwards.

    I have also to add that if I manage to build the project (both as dedicated server and as client) the project itself runs perfectly without any crash. Its an editor-only issue.

    I also tried deleting all package manager cache. It crashes anyway.

    I'm in Unity Alpha. Didn't happen in beta.
     
  2. SalwaC

    SalwaC

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    10
    Hello Oniro88,

    Can you please share the editor.log when the crash happens?

    Thank you,
     
    avataris-io likes this.
  3. Oniros88

    Oniros88

    Joined:
    Nov 15, 2014
    Posts:
    150
    Sorry! I already solved it. I deleted the Package folder and downloaded the core packages like HDRP again clean and it worked. Must have been a corrupted JSON file.
     
    daniel-holz and SalwaC like this.
  4. plloyer

    plloyer

    Joined:
    Apr 14, 2014
    Posts:
    1
    I recently had this issue after upgrading from 2022.1 to 2022.2. It caused a 50% crash on domain reload and the crash log pointed to PackageManager.UI.

    In my case, it turned out to be com.unity.jobs package which was not at the latest version.
    I was on 0.51.0-preview.32, but the latest is 0.70.0-preview.42.

    It's not obvious to notice if this package is pulled as a dependency of another package since in Package Manager, it won't show that there is a newer version.
     
  5. Spy-Master

    Spy-Master

    Joined:
    Aug 4, 2022
    Posts:
    635
    https://forum.unity.com/threads/lea...bs-in-unity-2022-2-beta.1357499/#post-8826586
     
    ShasV05 likes this.
  6. Henry_Xie

    Henry_Xie

    Joined:
    May 30, 2020
    Posts:
    5
    I just meet the same issue with Unity2022.3.17. Here is the editor.log and dmp file, hope it helpful.
    It happened after I add a package to my project. The package works fine on Unity2020, and it also works fine if I move the package code in project directly, not using package manager. So the fix way for me now is using this package without package manager. But I guess there are still some bugs, it's really confused.
    I try to debug with the crash, here is the stack when crash happened
    upload_2024-3-26_11-2-19.png
    the method name of function do_runtime_invoke is UpmSearchOperation
    upload_2024-3-26_11-3-45.jpeg
     

    Attached Files: