2021.3 editor unusable, constantly performing search through 20000+ elements

So this is happening in all of my projects with every editor version since 2021.2.17f1, including the latest 2021.3 LTS release. It’s basically unusable with roughly 50ms being taken up by this search operation. As a cherry on top the editor crashes on exiting in this state. I sent a bug report already, any ideas on a workaround for the time being?

8062976–1041458–crashlog.txt (48.4 KB)

Hi, I am trying to repro the issue. Do you have a project to share where I could investigate the issue? Otherwise, do you have a set of steps I could do in order to get into that state?

Just posted a duplicate thread a few minutes ago, then found this one. Pasting here my post for convenience, though it doesn’t add much to what locquehardt already said:


I’m an asset publisher, I sell several assets in the Asset Store. One of my users (that would be “locquehardt” above) recently brought to my attention a very strange behavior when importing one of my assets (which is a physics add-on, so mainly C# scripts).

Immediately after importing the asset (no need to actually play a scene), the editor starts to behave in an unresponsive and sluggish way. Using the editor profiler reveals there’s some kind of enumeration over +20000 elements happening every frame, amounting to 50 ms/frame even on empty scenes.

The stack trace is:

  • Application.Tick()
  • Application.TickGlobalCallbacks()
  • EditorAppliaction.Internal_Invoke()
  • .Invoke_void()
  • BaseAsyncIEnumerableHandler.OnUpdate()
  • BaseAsyncIEnumerableHandler.FetchSome()
  • SearchEnumerator.NextItem()

The user has only been able to reproduce this in Unity 2021.2.17f1 and above, I haven’t been able to reproduce it in any Unity version.

I’ve instructed the user in question to report this as a bug and send a repro project, but I’d still like to ask here: Any idea what might be causing this? Does anyone have encountered this before?

Ok thanks for the info. I will investigate this issue today and let you know what I find.

Thanks for reporting.

Thanks! In case it is of any use, here’s the original thread in the Obi support forums where this topic emerged. I’m user “josemendez”:
http://obi.virtualmethodstudio.com/forum/thread-3410.html

That thread might contain useful info.

On reason I see this could occur is a background search request being ran to do something, but from the callstack we can’t tell what triggered it.

That’s what I though at first too, since the change log for 2021.2.17f1 shows several search-related changes/improvements. Also the name “SearchEnumerator.NextItem()” suggests this is search-related, thought the name could be a red herring.

So far I’ve not been able to reproduce anything similar on my own, though. We only have locquehardt’s report to work with.

@ebaender would you be able to share the list of packages you have installed in your project in case it is a 3rd party package that is running background queries. Normally the built-in Search module only runs queries if you have the Search Window opened.

Ok good news, after some testing and investigation this issue has been fixed in 22.2. I will backport the fix up to 21.3.

2 Likes

Thanks for the help @jonathans42 , good to hear it’s being fixed!

Sorry I wasn’t able to respond earlier, do you still want the repro project? As for the list of packages, it’s just Obi Fluid and the 2021.3.0f1 default packages. I didn’t mention it because I thought that would just lead to the asset being blamed, and I talked with @arkano22 first to make sure it is not the cause.

From what I understand about the bug, I think a repro might not be necessary for the time being.

You can follow the progress of the backport here and if you update to a version with the fix and if it still occurs then, then a new bug report with a repro project might be helpful :slight_smile:

2 Likes