0
Fixed

Fuzzy Finder TimeoutException

Jonas 3 months ago updated by Lazlo Bonin (Lead Developer) 2 months ago 11

Whenever I enter the fuzzy finder by clicking the scene view with the creator I get a TimeoutException after waiting a while. Unity version 2019.1.0f2, macOS 10.14.16. Output:

TimeoutException: Time-out exceeded on Unity API thread action delegate. Potential deadlock.
Ludiq.PeekCore.UnityAPI.Await (System.Action action, System.Nullable`1[T] timeout) (at Assets/Ludiq/Ludiq.PeekCore/Editor/Utilities/UnityAPI.cs:130)
Ludiq.PeekCore.UnityAPI.Await (System.Action action) (at Assets/Ludiq/Ludiq.PeekCore/Editor/Utilities/UnityAPI.cs:91)
Ludiq.Peek.CreateGameObjectOptionTree.Prewarm () (at Assets/Ludiq/Ludiq.Peek/Editor/Creator/Fuzzy/CreateGameObjectOptionTree.cs:27)
Ludiq.PeekCore.FuzzyWindow+<>c__DisplayClass18_0.b__0 () (at Assets/Ludiq/Ludiq.PeekCore/Editor/Interface/Fuzzy/FuzzyWindow.cs:360)
Ludiq.PeekCore.FuzzyWindow.RunTaskSynchronous (System.Action task) (at Assets/Ludiq/Ludiq.PeekCore/Editor/Interface/Fuzzy/FuzzyWindow.cs:1274)
UnityEngine.Debug:LogException(Exception)
Ludiq.PeekCore.FuzzyWindow:RunTaskSynchronous(Action) (at Assets/Ludiq/Ludiq.PeekCore/Editor/Interface/Fuzzy/FuzzyWindow.cs:1279)
Ludiq.PeekCore.FuzzyWindow:Work() (at Assets/Ludiq/Ludiq.PeekCore/Editor/Interface/Fuzzy/FuzzyWindow.cs:1308)
System.Threading.ThreadHelper:ThreadStart()

Unity Version:
Peek Version:
Pending Review

Hi Jonas,

Thanks for the report and sorry you're experiencing this issue.

It seems like the creator hangs while trying to find all prefabs/sprites in your project.

Unfortunately, I can't seem to reproduce it here.

Can you give me a bit more information about the issu

  1. Does it happen every time, or only sometimes?
  2. Is your project very big (number of assets)?
  3. Does this issue happen on an empty project with Peek?

Thanks!

    +1

    Hi Lazlo,

    Sure thing:

    1. It happens every time. I have not been able to use it in my current project yet.
    2. It is quiet big. So far there is about 15.000 files (not including meta files) in the Asset folder.
    3. It does in fact not happen in a new project.
    +1

    I think it would be beneficial if it was possible to exclude certain directories in the preferences. We, as an example, have a mesh library of around 12.000 models, which we do not need to search through

    Hi Jonas,

    Thanks for following up with more details.

    Actually, you can already exclude models from search by unchecking "Create Models" from the project settings. Can you try that and see if it helps in the mean time?

    Regardless, I'll look at ways of improving the search efficiency for huge projects like yours.

    All right. I got this after unchecking "Create Models" and bringing up the fuzzy search through the Creator:

    ArgumentException: An item with the same key has already been added. Key: ui_box (UnityEngine.Sprite)
    System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    Ludiq.Peek.CreateGameObjectOptionTree.b__4_0 () (at Assets/Ludiq/Ludiq.Peek/Editor/Creator/Fuzzy/CreateGameObjectOptionTree.cs:62)
    Ludiq.PeekCore.UnityAPI+<>c__DisplayClass13_0.b__0 () (at Assets/Ludiq/Ludiq.PeekCore/Editor/Utilities/UnityAPI.cs:114)
    --- End of stack trace from previous location where exception was thrown ---
    System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    Ludiq.PeekCore.UnityAPI.Await (System.Action action, System.Nullable`1[T] timeout) (at Assets/Ludiq/Ludiq.PeekCore/Editor/Utilities/UnityAPI.cs:138)
    Ludiq.PeekCore.UnityAPI.Await (System.Action action) (at Assets/Ludiq/Ludiq.PeekCore/Editor/Utilities/UnityAPI.cs:91)
    Ludiq.Peek.CreateGameObjectOptionTree.Prewarm () (at Assets/Ludiq/Ludiq.Peek/Editor/Creator/Fuzzy/CreateGameObjectOptionTree.cs:27)
    Ludiq.PeekCore.FuzzyWindow+<>c__DisplayClass18_0.b__0 () (at Assets/Ludiq/Ludiq.PeekCore/Editor/Interface/Fuzzy/FuzzyWindow.cs:360)
    Ludiq.PeekCore.FuzzyWindow.RunTaskSynchronous (System.Action task) (at Assets/Ludiq/Ludiq.PeekCore/Editor/Interface/Fuzzy/FuzzyWindow.cs:1274)
    UnityEngine.Debug:LogException(Exception)
    Ludiq.PeekCore.FuzzyWindow:RunTaskSynchronous(Action) (at Assets/Ludiq/Ludiq.PeekCore/Editor/Interface/Fuzzy/FuzzyWindow.cs:1279)
    Ludiq.PeekCore.FuzzyWindow:Work() (at Assets/Ludiq/Ludiq.PeekCore/Editor/Interface/Fuzzy/FuzzyWindow.cs:1308)
    System.Threading.ThreadHelper:ThreadStart()


    I tried also unchecking create Sprites. That brought up my directory for the first time, but after typing one character I got a NullRef:

    NullReferenceException: Object reference not set to an instance of an object
    Ludiq.Peek.CreateGameObjectOptionTree+d__19.MoveNext () (at Assets/Ludiq/Ludiq.Peek/Editor/Creator/Fuzzy/CreateGameObjectOptionTree.cs:259)
    System.Collections.Concurrent.Partitioner+DynamicPartitionerForIEnumerable`1+InternalPartitionEnumerable[TSource].GrabChunk_Buffered (System.Collections.Generic.KeyValuePair`2[System.Int64,TSource][] destArray, System.Int32 requestedChunkSize, System.Int32& actualNumElementsGrabbed) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.Collections.Concurrent.Partitioner+DynamicPartitionerForIEnumerable`1+InternalPartitionEnumerable[TSource].GrabChunk (System.Collections.Generic.KeyValuePair`2[System.Int64,TSource][] destArray, System.Int32 requestedChunkSize, System.Int32& actualNumElementsGrabbed) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.Collections.Concurrent.Partitioner+DynamicPartitionerForIEnumerable`1+InternalPartitionEnumerator[TSource].GrabNextChunk (System.Int32 requestedChunkSize) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.Collections.Concurrent.Partitioner+DynamicPartitionEnumerator_Abstract`2[TSource,TSourceReader].MoveNext () (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.Threading.Tasks.Parallel+<>c__DisplayClass42_0`2[TSource,TLocal].b__1 () (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.Threading.Tasks.Task.InnerInvoke () (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.Threading.Tasks.Task.InnerInvokeWithArg (System.Threading.Tasks.Task childTask) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.Threading.Tasks.Task+<>c__DisplayClass178_0.b__0 (System.Object ) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    Rethrow as AggregateException: One or more errors occurred.
    System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.Threading.Tasks.Task.Wait () (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal] (System.Collections.Concurrent.Partitioner`1[TSource] source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action`1[T] simpleBody, System.Action`2[T1,T2] bodyWithState, System.Action`3[T1,T2,T3] bodyWithStateAndIndex, System.Func`4[T1,T2,T3,TResult] bodyWithStateAndLocal, System.Func`5[T1,T2,T3,T4,TResult] bodyWithEverything, System.Func`1[TResult] localInit, System.Action`1[T] localFinally) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal] (System.Collections.Generic.IEnumerable`1[T] source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action`1[T] body, System.Action`2[T1,T2] bodyWithState, System.Action`3[T1,T2,T3] bodyWithStateAndIndex, System.Func`4[T1,T2,T3,TResult] bodyWithStateAndLocal, System.Func`5[T1,T2,T3,T4,TResult] bodyWithEverything, System.Func`1[TResult] localInit, System.Action`1[T] localFinally) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.Threading.Tasks.Parallel.ForEach[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action`1[T] body) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    Ludiq.PeekCore.SearchUtility.OrderableSearchFilter[THaystack,TResult] (System.Collections.Generic.IEnumerable`1[T] enumeration, System.Func`2[T,TResult] getResult, System.String query, System.Func`2[T,TResult] getHaystack, System.Nullable`1[T] cancellation) (at Assets/Ludiq/Ludiq.PeekCore/Editor/Utilities/SearchUtility.cs:244)
    Ludiq.PeekCore.SearchUtility.OrderableSearchFilter[T] (System.Collections.Generic.IEnumerable`1[T] enumeration, System.String query, System.Func`2[T,TResult] haystack, System.Nullable`1[T] cancellation) (at Assets/Ludiq/Ludiq.PeekCore/Editor/Utilities/SearchUtility.cs:270)
    Ludiq.PeekCore.FuzzyOptionTree.SearchResults (System.String query, Ludiq.PeekCore.IFuzzyOption parent, System.Threading.CancellationToken cancellation) (at Assets/Ludiq/Ludiq.PeekCore/Editor/Interface/Fuzzy/FuzzyOptionTree.cs:134)
    Ludiq.PeekCore.FuzzyOptionTree.OrderedSearchResults (System.String query, Ludiq.PeekCore.IFuzzyOption parent, System.Threading.CancellationToken cancellation) (at Assets/Ludiq/Ludiq.PeekCore/Editor/Interface/Fuzzy/FuzzyOptionTree.cs:127)
    Ludiq.PeekCore.FuzzyWindow+<>c__DisplayClass43_0.b__0 () (at Assets/Ludiq/Ludiq.PeekCore/Editor/Interface/Fuzzy/FuzzyWindow.cs:582)
    Ludiq.PeekCore.FuzzyWindow.RunTaskSynchronous (System.Action task) (at Assets/Ludiq/Ludiq.PeekCore/Editor/Interface/Fuzzy/FuzzyWindow.cs:1274)
    UnityEngine.Debug:LogException(Exception)
    Ludiq.PeekCore.FuzzyWindow:RunTaskSynchronous(Action) (at Assets/Ludiq/Ludiq.PeekCore/Editor/Interface/Fuzzy/FuzzyWindow.cs:1279)
    Ludiq.PeekCore.FuzzyWindow:Work() (at Assets/Ludiq/Ludiq.PeekCore/Editor/Interface/Fuzzy/FuzzyWindow.cs:1308)
    System.Threading.ThreadHelper:ThreadStart()

    Working on Fix

    Hi Jonas,

    Sorry for the trouble.

    The first error (duplicate key) was fixed in Peek v.1.0.1. 

    The second error I'll have to fix for the next version, but it's pretty easy.

    In the mean time, I recommend upgrading to v.1.0.1 and enabling Create Sprites. Hopefully this should be a workable state for your project!

    Hi Lazlo,

    Thank you for your quick responses. Will it be possible to update through the Update Wizard at some point? I tried updating yesterday when I saw there was an update, but the wizard told me I was up to date with version 1.0.0.

    I unfortunately cannot work reliably with the instability on macOS (I had three crashes in the span of two hours monday), so until this is addressed I will have to use a limited set of the functionality. I really hope you find a fix for this as, when it works, it's an amazing tool.

    Hi Jonas,

    Unfortunately the update wizard only updates the "local" copy once imported; we cannot authenticate and fetch new versions on line from the Asset Store, that's not possible with the Unity API.

    I'm very sorry the tool is unusable for you due to the OSX instability. I am making this a priority, however I'm not sure how to improve it without support from Unity at the moment. If you would like a refund in the mean time, please contact support@ludiq.io with your invoice number.

    Re: your initial issue, I went a step further than fixing the bugs and I just rewrote the entire creator search to use lazy loading. This makes is *much* faster and eliminates any initial load time. You should be able to still enable Create Models even with a 15k model library in the next version.

    Hi Lazlo,

    After updating I'm getting this: 

    Assets/Ludiq/Ludiq.Peek/Editor/Probe/Probe.cs(128,11): error CS0122: 'SceneVisibilityManager' is inaccessible due to its protection level

    Hi Jonas,

    Sorry for the late reply, this was fixed the day after in v.1.1.1: https://ludiq.io/peek/download/1.1.1