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.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

2019.3.0b8 freezing in AssetImportManager::Import

Discussion in 'Unity Accelerator' started by Hyp-X, Oct 25, 2019.

  1. Hyp-X

    Hyp-X

    Joined:
    Jun 24, 2015
    Posts:
    421
    Crossposting from beta forum

    Some devs of our team already using the beta is experiencing frequent freezes.
    The lock up can happen during startup, or on any asset change or during build.

    I attached VS2019 to Unity.exe, and I see the main thread is stuck in
    AssetImportManager::Import


    Here's the call stack of the main thread:

    Code (CSharp):
    1. >    ntdll.dll!NtWaitForSingleObject()    Unknown
    2.      KernelBase.dll!WaitForSingleObjectEx()    Unknown
    3.      Unity.exe!AssetImportManager::Import(class core::hash_map<struct AssetDatabase::ImporterID,struct ImporterInfo,struct core::hash<struct AssetDatabase::ImporterID>,struct std::equal_to<struct AssetDatabase::ImporterID> > const &,struct dynamic_array<struct PostprocessorInfo,0> const &,class AssetResolver &,struct CategorizedAssets &,class IImportProgress *,class core::hash_set<struct UnityGUID,struct core::hash<struct UnityGUID>,struct std::equal_to<struct UnityGUID> > const &,struct LoadedImportedAssetsSnapshot const *,class core::hash_set<class core::basic_string<char,class core::StringStorageDefault<char> >,struct core::hash<class core::basic_string<char,class core::StringStorageDefault<char> > >,struct std::equal_to<class core::basic_string<char,class core::StringStorageDefault<char> > > > &,class CrashedAssetImportsDatabase &,class core::hash_set<struct ArtifactKey,struct core::hash<struct ArtifactKey>,struct std::equal_to<struct ArtifactKey> > &)    Unknown
    4.      Unity.exe!ImportAndPostprocessOutOfDateAssets()    Unknown
    5.      Unity.exe!RefreshInternalV2()    Unknown
    6.      Unity.exe!StopAssetImportingV2()    Unknown
    7.      Unity.exe!RefreshV2(enum AssetDatabase::UpdateAssetOptions)    Unknown
    8.      Unity.exe!AssetDatabase::Refresh(enum AssetDatabase::UpdateAssetOptions)    Unknown
    9.      Unity.exe!Application::InitializeProject(void)    Unknown
    10.      Unity.exe!WinMain()    Unknown
    11.      Unity.exe!__scrt_common_main_seh()    Unknown
    12.      kernel32.dll!00007ff9a1847bd4()    Unknown
    13.      ntdll.dll!RtlUserThreadStart()    Unknown
    14.  
    Disassembly shows:

    Code (CSharp):
    1. 00007FF7E16F7DF4  call        RemoteAssetCache::GetArtifactFromCacheServerAsync (07FF7E16F5E80h)
    2. 00007FF7E16F7DF9  nop         dword ptr [rax]
    3. 00007FF7E16F7E00  mov         edx,0FFFFFFFFh
    4. 00007FF7E16F7E05  mov         r8d,1
    5. 00007FF7E16F7E0B  mov         rcx,qword ptr [rbp+50h]
    6. 00007FF7E16F7E0F  call        qword ptr [__imp_WaitForSingleObjectEx (07FF7E4BF9C10h)]
    7. 00007FF7E16F7E15  test        eax,eax  
    I guess it waits for that async fetch to complete...
    Editor.log doesn't contain anything useful.