Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

String with asset GUID's prevents dependency index rebuild

Aperta
#53 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
csharp, unity
Ambito
search

Direzione di ricerca

Inspect Dependencies/DependencyIndexer.cs, especially ProcessText and ProcessAsset, using the stack-trace locations as entry points. Reproduce the issue by rebuilding the dependency index with a C# asset containing a dashed GUID string. Done means the rebuild completes without a KeyNotFoundException.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

If you reference a asset using its asset GUID in code (with dashes), retrieved via AssetDatabase.AssetPathToGUID, the dependency index rebuild will fail.

Example if you have a asset with the GUID 1329489f-fc68-a574-78aa-f964e2a8bbd9 and you store that value as a string in a .cs file (with the dashes!).
The following exception is thrown, preventing the dependency index to build.

KeyNotFoundException: The given key '1329489f-fc68-a574-78aa-f964e2a8bbd9' was not present in the dictionary.
System.Collections.Concurrent.ConcurrentDictionary`2[TKey,TValue].ThrowKeyNotFoundException (System.Object key) (at <51fded79cd284d4d911c5949aff4cb21>:0)
System.Collections.Concurrent.ConcurrentDictionary`2[TKey,TValue].get_Item (TKey key) (at <51fded79cd284d4d911c5949aff4cb21>:0)
UnityEditor.Search.DependencyIndexer.ProcessText (System.String& path, System.String& assetGuid) (at ./Library/PackageCache/com.unity.search.extensions@892b9ab4cf/Dependencies/DependencyIndexer.cs:320)
UnityEditor.Search.DependencyIndexer.ProcessAsset (System.String metaFilePath, System.Int32 progressId, System.Int32& completed, System.Int32 totalCount) (at ./Library/PackageCache/com.unity.search.extensions@892b9ab4cf/Dependencies/DependencyIndexer.cs:254)
UnityEditor.Search.DependencyIndexer+<>c__DisplayClass13_0.<Build>b__0 (System.String mf) (at ./Library/PackageCache/com.unity.search.extensions@892b9ab4cf/Dependencies/DependencyIndexer.cs:62)
System.Threading.Tasks.Parallel+<>c__DisplayClass32_0`2[TSource,TLocal].<ForEachWorker>b__0 (System.Int32 i) (at <51fded79cd284d4d911c5949aff4cb21>:0)
System.Threading.Tasks.Parallel+<>c__DisplayClass19_0`1[TLocal].<ForWorker>b__1 (System.Threading.Tasks.RangeWorker& currentWorker, System.Int32 timeout, System.Boolean& replicationDelegateYieldedBeforeCompletion) (at <51fded79cd284d4d911c5949aff4cb21>:0)
--- End of stack trace from previous location where exception was thrown ---
System.Threading.Tasks.Parallel+<>c__DisplayClass19_0`1[TLocal].<ForWorker>b__1 (System.Threading.Tasks.RangeWorker& currentWorker, System.Int32 timeout, System.Boolean& replicationDelegateYieldedBeforeCompletion) (at <51fded79cd284d4d911c5949aff4cb21>:0)
System.Threading.Tasks.TaskReplicator+Replica`1[TState].ExecuteAction (System.Boolean& yieldedBeforeCompletion) (at <51fded79cd284d4d911c5949aff4cb21>:0)
System.Threading.Tasks.TaskReplicator+Replica.Execute () (at <51fded79cd284d4d911c5949aff4cb21>:0)
Rethrow as AggregateException: One or more errors occurred. (The given key '1329489f-fc68-a574-78aa-f964e2a8bbd9' was not present in the dictionary.)
System.Threading.Tasks.TaskReplicator.Run[TState] (System.Threading.Tasks.TaskReplicator+ReplicatableUserAction`1[TState] action, System.Threading.Tasks.ParallelOptions options, System.Boolean stopOnFirstFailure) (at <51fded79cd284d4d911c5949aff4cb21>:0)
System.Threading.Tasks.Parallel.ForWorker[TLocal] (System.Int32 fromInclusive, System.Int32 toExclusive, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action`1[T] body, System.Action`2[T1,T2] bodyWithState, System.Func`4[T1,T2,T3,TResult] bodyWithLocal, System.Func`1[TResult] localInit, System.Action`1[T] localFinally) (at <51fded79cd284d4d911c5949aff4cb21>:0)
--- End of stack trace from previous location where exception was thrown ---
System.Threading.Tasks.Parallel.ThrowSingleCancellationExceptionOrOtherException (System.Collections.ICollection exceptions, System.Threading.CancellationToken cancelToken, System.Exception otherException) (at <51fded79cd284d4d911c5949aff4cb21>:0)
System.Threading.Tasks.Parallel.ForWorker[TLocal] (System.Int32 fromInclusive, System.Int32 toExclusive, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action`1[T] body, System.Action`2[T1,T2] bodyWithState, System.Func`4[T1,T2,T3,TResult] bodyWithLocal, System.Func`1[TResult] localInit, System.Action`1[T] localFinally) (at <51fded79cd284d4d911c5949aff4cb21>:0)
System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal] (TSource[] array, 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 <51fded79cd284d4d911c5949aff4cb21>: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 <51fded79cd284d4d911c5949aff4cb21>:0)
System.Threading.Tasks.Parallel.ForEach[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Action`1[T] body) (at <51fded79cd284d4d911c5949aff4cb21>:0)
UnityEditor.Search.DependencyIndexer.Build (System.Int32 progressId, System.String[]& metaFiles) (at ./Library/PackageCache/com.unity.search.extensions@892b9ab4cf/Dependencies/DependencyIndexer.cs:62)
UnityEditor.Search.Dependency.RunThreadIndexing (UnityEditor.Search.DependencyIndexer index) (at ./Library/PackageCache/com.unity.search.extensions@892b9ab4cf/Dependencies/Dependency.cs:350)
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback()
Lingua principale
C#
Stelle
226
Fork
22
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Unity-Technologies/com.unity.search.extensions

Tutte le issue di Unity-Technologies/com.unity.search.extensions

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.