2023.3.15f1 LTS - Initial Asset Database Refresh Editor Hang

I just upgrade to 2022.3.15f1 and the editor is hanging during startup. The status message is “Open Project: Initial Asset Database Refresh”.

Few observations…

  • This is the second time I have encountered this behavior in three days.
  • Reinstalling the same editor version (3.15f1) temporarily fixes the issue.
  • This is not an initial asset database refresh.
  • Deleting /library does not resolve the issue.

Update The issue is resolved by shutting down all instances of Visual Studio before launching the editor.

Check the editor.log to see if there’s hints at where exactly it is getting stuck at or possible error messages.

Disable antivirus or add the project path to the exclusion list, to prevent these from interfering.

That reinstalling Unity fixes the issue is somewhat smelly. Either it’s just coincidence, or it would indicate that it works once but then no longer a second time, which could indicate something is corrupting the installation or otherwise preventing it from functioning normally.

Thanks, @CodeSmile . The issue is not manifesting with 2022.3.14f1, and so I am going to stick with this version. *Edited to show 2022.3.14f1.

FYI: there is no 2023.3.14f1. 2023.3 is in alpha. I’m guessing you’re trying to say 2022.3.14f1 and 2022.3.15f1 LTS in the title.
Would you please fix your version numbers both in your post and in your title? It is confusing and later, when the real 2023.3

For anyone who might encounter this behavior – I have found that shutting down all Visual Studio instances and restarting Unity resolves the behavior.

The precise cause is having an instance of Visual Studio open with a debugger attached to a separate process. I run a game server which usually stays active while I cycle the Unity editor. But in this scenario Unity freezes on startup.

@sailro

1 Like

I get the same hang even with 2022.3.14f1. I have tried 2022.3.8f1 - 2022.3.16f1 which all hang. This hang only occurs on one of my machines. On another machine I don’t hang and can develop as normal. Back on the machine that does hang, I have found that it is only an issue when using VS 2022. If I run the same project in VS 2019, then load any Unity project, I don’t get the hang.

This is the last line in the Editor.log when the hang occurs.

Application.AssetDatabase Initial Refresh Start
Unhandled exception. System.InvalidOperationException: Operation is not valid due to the current state of the object.
at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.GetDisplayName()
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions.Serialize(Utf8JsonWriter writer)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.KestrelEventSource.Configuration(KestrelServerOptions options)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.KestrelEventSource.AddServerOptions(KestrelServerOptions options)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
at Microsoft.AspNetCore.Builder.WebApplication.Run(String url)
at Program.$(String[ ] args)

1 Like

Bug report is filed as “Bug 2023.3.15f1 LTS - Editor Startup Hang If Debugger Running”.

Unity Issue Tracker - Editor gets stuck loading “Initial asset database refresh” indefinitely on startup when Visual Studio .Net project debugging is running in the background (unity3d.com)