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)
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 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.
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.