Unity getting stuck on Completing Domain

So I’m having this issue when sometimes after saving a prefab, or making a code change, when entering playmode it gets stuck on “Completing Domain” forever. I tried to pinpoint this to some kind of a scripting issue but using VS debugging, it points to nothing.

I attached an editor log. Using LTS Unity 2022.3.21f.

2024-05-21T00:39:44.322Z|0x2460|[Licensing::Client] Successfully resolved entitlements
2024-05-21T00:39:44.459Z|0x2460|<RI> Initialized touch support.
2024-05-21T00:39:44.460Z|0x2460|<RI> Initialized touch support.
2024-05-21T00:39:44.461Z|0x2460|<RI> Initialized touch support.
2024-05-21T00:39:44.462Z|0x2460|<RI> Initialized touch support.
2024-05-21T00:39:44.464Z|0x2460|<RI> Initialized touch support.
2024-05-21T00:39:44.678Z|0x2460|[00:00:00] Finished 1 Bake Ambient Probe job (0.00s execute, 0.00s integrate, 0.05s wallclock)
2024-05-21T00:39:47.362Z|0x2460|Loaded scene 'Library/Unused/4a976c491c7f78846a11763092aba514'
    Deserialize:            3.125 ms
    Integration:            3.151 ms
    Integration of assets:  0.002 ms
    Thread Wait Time:       0.008 ms
    Total Operation Time:   6.286 ms
2024-05-21T00:39:47.487Z|0x2460|[00:00:03] Finished 1 Bake Ambient Probe job (0.00s execute, 0.00s integrate, 0.05s wallclock)
2024-05-21T00:40:03.291Z|0x2460|Start importing Assets/FPS_Starter_Pack/Animations/Two_Hands_Weapon/TwoHandRun.anim using Guid(f1e981cf0e8c4884e9d7dc8fe252895c) Importer(-1,00000000000000000000000000000000) 2024-05-21T00:40:03.312Z|0x2460| -> (artifact id: '704baa673e71155f6b701ce1de00fdd3') in 0.020985 seconds
2024-05-21T00:40:03.429Z|0x2460|Refreshing native plugins compatible for Editor in 6.21 ms, found 6 plugins.
2024-05-21T00:40:03.429Z|0x2460|Preloading 0 native plugins for Editor in 0.00 ms.
2024-05-21T00:40:03.430Z|0x2460|Asset Pipeline Refresh (id=22952503620763543a972fa65f26927a): Total: 0.169 seconds - Initiated by StopAssetImportingV2(NoUpdateAssetOptions)
2024-05-21T00:40:03.452Z|0x7480|[Worker0] 2024-05-21T00:40:03.452Z|0x5084|Start importing Assets/Network Prefabs/FPP_Player.prefab using Guid(5ec9ff7ae76065148ac00296b732337c) Importer(815301076,1909f56bfc062723c751e8b465ee728b)
2024-05-21T00:40:04.338Z|0x7480|[Worker0] 2024-05-21T00:40:04.337Z|0x5084|Refreshing native plugins compatible for Editor in 6.88 ms, found 6 plugins.
2024-05-21T00:40:04.338Z|0x7480|[Worker0] 2024-05-21T00:40:04.338Z|0x5084|Preloading 0 native plugins for Editor in 0.00 ms.
2024-05-21T00:40:05.442Z|0x2460|Reloading assemblies for play mode.
2024-05-21T00:40:05.451Z|0x2460|Reloading assemblies after forced synchronous recompile.
2024-05-21T00:40:05.462Z|0x2460|Begin MonoManager ReloadAssembly
2024-05-21T00:40:05.921Z|0x2460|- Loaded All Assemblies, in  0.460 seconds
2024-05-21T00:40:06.062Z|0x2460|Refreshing native plugins compatible for Editor in 5.53 ms, found 6 plugins.
2024-05-21T00:40:06.468Z|0x2460|Native extension for WindowsStandalone target not found
2024-05-21T00:40:07.123Z|0x2460|[Licensing::Client] Successfully resolved entitlement details
2024-05-21T00:40:07.249Z|0x2460|[MODES] ModeService[none].Initialize2024-05-21T00:40:07.249Z|0x2460|
2024-05-21T00:40:07.249Z|0x2460|[MODES] ModeService[none].LoadModes2024-05-21T00:40:07.249Z|0x2460|
2024-05-21T00:40:07.257Z|0x2460|[MODES] Loading mode Default (0) for mode-current-id-Burglar Simulator2024-05-21T00:40:07.257Z|0x2460|
2024-05-21T00:40:07.615Z|0x2460|Mono: successfully reloaded assembly
2024-05-21T00:40:07.680Z|0x2460|- Finished resetting the current domain, in  1.618 seconds
2024-05-21T00:40:07.680Z|0x2460|Domain Reload Profiling: 2079ms
    BeginReloadAssembly (359ms)
        ExecutionOrderSort (0ms)
        DisableScriptedObjects (11ms)
        BackupInstance (0ms)
        ReleaseScriptingObjects (1ms)
        CreateAndSetChildDomain (174ms)
    RebuildCommonClasses (20ms)
    RebuildNativeTypeToScriptingClass (7ms)
    initialDomainReloadingComplete (21ms)
    LoadAllAssembliesAndSetupDomain (54ms)
        LoadAssemblies (118ms)
        RebuildTransferFunctionScriptingTraits (0ms)
        AnalyzeDomain (20ms)
            TypeCache.Refresh (5ms)
                TypeCache.ScanAssembly (0ms)
            ScanForSourceGeneratedMonoScriptInfo (0ms)
            ResolveRequiredComponents (12ms)
    FinalizeReload (1618ms)
        ReleaseScriptCaches (0ms)
        RebuildScriptCaches (0ms)
        SetupLoadedEditorAssemblies (733ms)
            LogAssemblyErrors (0ms)
            InitializePlatformSupportModulesInManaged (4ms)
            SetLoadedEditorAssemblies (3ms)
            RefreshPlugins (0ms)
            BeforeProcessingInitializeOnLoad (46ms)
            ProcessInitializeOnLoadAttributes (660ms)
            ProcessInitializeOnLoadMethodAttributes (16ms)
            AfterProcessingInitializeOnLoad (4ms)
            EditorAssembliesLoaded (0ms)
        ExecutionOrderSort2 (0ms)
        AwakeInstancesAfterBackupRestoration (419ms)

9846042–1417071–log.rar (62.5 KB)

1 Like

Please see Debugging Editor freezes and hangs [Windows Only] . If a callstack doesn’t give a good clue, I can look at a dump file if you capture one.

Sure, here you go. I can’t find any clues as to what is causing it. I update to newest LTS and it still happens.
I will send the dump file shortly.

Happened again. It’s impossible to work

2024-05-21T15:11:32.016Z|0x79fc|[Licensing::Client] Successfully resolved entitlements
2024-05-21T15:11:32.098Z|0x79fc|[00:00:00] Finished 1 Bake Ambient Probe job (0.00s execute, 0.00s integrate, 0.05s wallclock)
2024-05-21T15:11:32.780Z|0x1b90|[Worker0] 2024-05-21T15:11:32.780Z|0x35cc| -> (artifact id: 'b03565abb41127e9d9f6a4b82d7c5d2a') in 3.643644 seconds
2024-05-21T15:11:41.520Z|0x79fc|Start importing Assets/FPS_Starter_Pack/Animations/Hands_Empty/Hands_Full.controller using Guid(2d99e6490f847684db7258df5730da02) Importer(-1,00000000000000000000000000000000) 2024-05-21T15:11:41.526Z|0x79fc| -> (artifact id: '7bbaa5dfcca74d0c77cc7f2bb3f9a61f') in 0.004532 seconds
2024-05-21T15:11:41.631Z|0x79fc|Refreshing native plugins compatible for Editor in 5.49 ms, found 5 plugins.
2024-05-21T15:11:41.631Z|0x79fc|Preloading 0 native plugins for Editor in 0.00 ms.
2024-05-21T15:11:41.632Z|0x79fc|Asset Pipeline Refresh (id=b07211bd7af4dfa4bbd123d7c90d17f7): Total: 0.137 seconds - Initiated by StopAssetImportingV2(NoUpdateAssetOptions)
2024-05-21T15:11:41.650Z|0x1b90|[Worker0] 2024-05-21T15:11:41.648Z|0x35cc|Start importing Assets/Network Prefabs/FPP_Player.prefab using Guid(5ec9ff7ae76065148ac00296b732337c) Importer(815301076,1909f56bfc062723c751e8b465ee728b)
2024-05-21T15:11:41.653Z|0x1b90|[Worker1] 2024-05-21T15:11:41.653Z|0x595c|Start importing Assets/FPS_Starter_Pack/Animations/Hands_Empty/Hands_Full.controller using Guid(2d99e6490f847684db7258df5730da02) Importer(815301076,1909f56bfc062723c751e8b465ee728b)
2024-05-21T15:11:42.317Z|0x1b90|[Worker1] 2024-05-21T15:11:42.317Z|0x595c| -> (artifact id: '78c4d7dd9c55a41ec1476903817c001a') in 0.663255 seconds
2024-05-21T15:11:42.524Z|0x1b90|[Worker0] 2024-05-21T15:11:42.524Z|0x35cc|Refreshing native plugins compatible for Editor in 6.05 ms, found 5 plugins.
2024-05-21T15:11:42.524Z|0x1b90|[Worker0] 2024-05-21T15:11:42.524Z|0x35cc|Preloading 0 native plugins for Editor in 0.00 ms.
2024-05-21T15:11:43.720Z|0x79fc|Reloading assemblies for play mode.
2024-05-21T15:11:43.726Z|0x79fc|Reloading assemblies after forced synchronous recompile.
2024-05-21T15:11:43.740Z|0x79fc|Begin MonoManager ReloadAssembly
2024-05-21T15:11:44.362Z|0x79fc|- Loaded All Assemblies, in  0.621 seconds
2024-05-21T15:11:44.511Z|0x79fc|Refreshing native plugins compatible for Editor in 6.45 ms, found 5 plugins.
2024-05-21T15:11:44.986Z|0x79fc|Native extension for WindowsStandalone target not found
2024-05-21T15:11:45.626Z|0x79fc|[Licensing::Client] Successfully resolved entitlement details
2024-05-21T15:11:45.740Z|0x79fc|[MODES] ModeService[none].Initialize2024-05-21T15:11:45.740Z|0x79fc|
2024-05-21T15:11:45.740Z|0x79fc|[MODES] ModeService[none].LoadModes2024-05-21T15:11:45.740Z|0x79fc|
2024-05-21T15:11:45.746Z|0x79fc|[MODES] Loading mode Default (0) for mode-current-id-Burglar Simulator2024-05-21T15:11:45.746Z|0x79fc|
2024-05-21T15:11:46.089Z|0x79fc|Mono: successfully reloaded assembly
2024-05-21T15:11:46.147Z|0x79fc|- Finished resetting the current domain, in  1.634 seconds
2024-05-21T15:11:46.147Z|0x79fc|Domain Reload Profiling: 2256ms
    BeginReloadAssembly (401ms)
        ExecutionOrderSort (0ms)
        DisableScriptedObjects (11ms)
        BackupInstance (0ms)
        ReleaseScriptingObjects (1ms)
        CreateAndSetChildDomain (171ms)
    RebuildCommonClasses (26ms)
    RebuildNativeTypeToScriptingClass (9ms)
    initialDomainReloadingComplete (27ms)
    LoadAllAssembliesAndSetupDomain (159ms)
        LoadAssemblies (245ms)
        RebuildTransferFunctionScriptingTraits (0ms)
        AnalyzeDomain (21ms)
            TypeCache.Refresh (5ms)
                TypeCache.ScanAssembly (0ms)
            ScanForSourceGeneratedMonoScriptInfo (0ms)
            ResolveRequiredComponents (15ms)
    FinalizeReload (1635ms)
        ReleaseScriptCaches (0ms)
        RebuildScriptCaches (0ms)
        SetupLoadedEditorAssemblies (721ms)
            LogAssemblyErrors (0ms)
            InitializePlatformSupportModulesInManaged (4ms)
            SetLoadedEditorAssemblies (3ms)
            RefreshPlugins (0ms)
            BeforeProcessingInitializeOnLoad (41ms)
            ProcessInitializeOnLoadAttributes (651ms)
            ProcessInitializeOnLoadMethodAttributes (17ms)
            AfterProcessingInitializeOnLoad (4ms)
            EditorAssembliesLoaded (0ms)
        ExecutionOrderSort2 (0ms)
        AwakeInstancesAfterBackupRestoration (385ms)

1 Like

I’m attaching the dump file.

it happened with me with unity version 2022.3.16f1. But I was able to resolve it by removing the infinite loop triggered due to instantiating a prefab with in the the code of the prefab (basically infinite loop)
check if there is an infinite loop in the recently added code

Unity shouldn’t stuck if there is an infinite loop running from developers code

I have no code like that, if there was then debugging should point right to it. But it doesn’t point anywhere

1 Like

Bump, this is driving me mad

2 Likes

It happened again. I attached a mini dump.

I looked at your dump, it’s a deadlock in asset loading code (it’s a bug in Unity, not your code). I’ve contacted folks working on that area of the code to see if they’ve seen this before. In the meantime, I’d recommend updating to the newest version of the Unity 2022 LTS as it might be fixed there.

1 Like

Thanks for your reply, I’m using the newest LTS release and it happens still. I suppose I have to wait for a fix?

If it is still happening on the latest LTS (2022.3.29), then I’d recommend submitting a bug report so we could get the train going in case it is not a known issue.

I’ve reported it.

@MrCiastku could you please share bug ID you should have gotten on the email - so we can speed it up a bit :slight_smile:

Only thing I’ve received is
CASE IN-76783

1 Like

Still broken on the newest LTS 2022.3.31.

1 Like

Yes unfortunately we’re still looking at the issue. You should be able to track the status of it with the link that was emailed to you. There’s also this issue tracker link that should populate soon: Unity Issue Tracker - Getting randomly stuck on Completing Domain ,deadlock in asset loading code

Is this still an issue in 2022.3.33?

1 Like

Bump

Still happens on 3.36.

1 Like