Search Unity

Bug Error after update to Unity 2021.3.16f1 LTS

Discussion in 'Burst' started by Tornar, Dec 15, 2022.

  1. Tornar

    Tornar

    Joined:
    Dec 28, 2020
    Posts:
    87
    Hello,

    I have been using Unity 2021 LTS from the beginning and updating it every 15 days, but with last update I am getting this error:

    Code (CSharp):
    1. Failed to find entry-points:
    2. System.AggregateException: One or more errors occurred. (An item with the same key has already been added. Key: ba90c8be510d7e31cc589f2de9f828e6) ---> System.ArgumentException: An item with the same key has already been added. Key: ba90c8be510d7e31cc589f2de9f828e6
    3.   at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x000dd] in <05089c1b6989455fb1452c627044bac4>:0
    4.   at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <05089c1b6989455fb1452c627044bac4>:0
    5.   at Burst.Compiler.IL.Hashing.Storage.NameToTokenDictionary.AddHash (Burst.Compiler.IL.Helpers.Hash128& hash, System.Int32 token) [0x00000] in <a2dd15248a25411e914af2a2c82fb63f>:0
    6.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinitionImpl (System.Reflection.Metadata.TypeDefinitionHandle typeDefinitionHandle, Burst.Compiler.IL.Hashing.CacheBuilder.Util.CachingMetadataReader metadataReader, Burst.Compiler.IL.Helpers.Hash128Builder hashBuilder) [0x000fc] in <a2dd15248a25411e914af2a2c82fb63f>:0
    7.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinition (System.Reflection.Metadata.TypeDefinitionHandle typeDefinitionHandle, Burst.Compiler.IL.Hashing.CacheBuilder.Util.CachingMetadataReader metadataReader) [0x00006] in <a2dd15248a25411e914af2a2c82fb63f>:0
    8.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher+<>c__DisplayClass13_0.<HashImpl>b__5 (System.Reflection.Metadata.TypeDefinitionHandle typeDefinitionHandle, System.Threading.Tasks.ParallelLoopState loopState, System.Int64 i) [0x00000] in <a2dd15248a25411e914af2a2c82fb63f>:0
    9.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.ForEach[T] (System.Collections.Generic.IEnumerable`1[T] elements, System.Action`3[T1,T2,T3] callback) [0x00018] in <a2dd15248a25411e914af2a2c82fb63f>:0
    10.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher+<>c__DisplayClass13_0.<HashImpl>b__0 () [0x00000] in <a2dd15248a25411e914af2a2c82fb63f>:0
    11.   at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <05089c1b6989455fb1452c627044bac4>:0
    12.   at System.Threading.Tasks.Task.Execute () [0x00000] in <05089c1b6989455fb1452c627044bac4>:0
    13.    --- End of inner exception stack trace ---
    14.   at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x001c8] in <05089c1b6989455fb1452c627044bac4>:0
    15.   at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, System.Int32 millisecondsTimeout) [0x00000] in <05089c1b6989455fb1452c627044bac4>:0
    16.   at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks) [0x00000] in <05089c1b6989455fb1452c627044bac4>:0
    17.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashImpl () [0x00243] in <a2dd15248a25411e914af2a2c82fb63f>:0
    18.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashAssembly (System.String filePath, System.Threading.Tasks.TaskFactory taskFactory) [0x00008] in <a2dd15248a25411e914af2a2c82fb63f>:0
    19.   at Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheLoader.CreateHashingResult (Mono.Cecil.AssemblyNameReference assemblyNameReference, Burst.Compiler.IL.AssemblyLoader assemblyLoader, Burst.Compiler.IL.Helpers.DebugLogWriter debugLogWriter) [0x001b1] in <a2dd15248a25411e914af2a2c82fb63f>:0
    20.   at Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore.GetAssemblyState (System.String assemblyName, Burst.Compiler.IL.AssemblyLoader assemblyLoader) [0x000a0] in <a2dd15248a25411e914af2a2c82fb63f>:0
    21.   at Burst.Compiler.IL.Server.EntryPointMethodFinder.LoadAllAssemblyReferences (Mono.Cecil.AssemblyDefinition asmDef, System.Collections.Generic.Dictionary`2[TKey,TValue] visited, System.Collections.Generic.Dictionary`2[TKey,TValue] jobProducers, Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore assemblyStore, Burst.Compiler.IL.AssemblyLoader assemblyLoader) [0x00020] in <a2dd15248a25411e914af2a2c82fb63f>:0
    22.   at Burst.Compiler.IL.Server.EntryPointMethodFinder.LoadAllAssemblyReferences (Mono.Cecil.AssemblyDefinition asmDef, System.Collections.Generic.Dictionary`2[TKey,TValue] visited, System.Collections.Generic.Dictionary`2[TKey,TValue] jobProducers, Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore assemblyStore, Burst.Compiler.IL.AssemblyLoader assemblyLoader) [0x001de] in <a2dd15248a25411e914af2a2c82fb63f>:0
    23.   at Burst.Compiler.IL.Server.EntryPointMethodFinder.FindEntryPoints (System.String[] rootAssemblyNames, Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore assemblyStore, Burst.Compiler.IL.AssemblyLoader assemblyLoader, Burst.Compiler.IL.NativeCompilerOptions options, Burst.Compiler.IL.Server.ProfileDelegate profileCallback, System.Boolean includeRootAssemblyReferences, System.Boolean splitTargets, Burst.Compiler.IL.Helpers.DebugLogWriter debugWriter) [0x00071] in <a2dd15248a25411e914af2a2c82fb63f>:0
    24.   at Burst.Compiler.IL.Server.FindMethodsJob.Execute (Burst.Compiler.IL.Server.CompilerServerJobExecutionContext context) [0x00133] in <a2dd15248a25411e914af2a2c82fb63f>:0
    25. ---> (Inner Exception #0) System.ArgumentException: An item with the same key has already been added. Key: ba90c8be510d7e31cc589f2de9f828e6
    26.   at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x000dd] in <05089c1b6989455fb1452c627044bac4>:0
    27.   at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <05089c1b6989455fb1452c627044bac4>:0
    28.   at Burst.Compiler.IL.Hashing.Storage.NameToTokenDictionary.AddHash (Burst.Compiler.IL.Helpers.Hash128& hash, System.Int32 token) [0x00000] in <a2dd15248a25411e914af2a2c82fb63f>:0
    29.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinitionImpl (System.Reflection.Metadata.TypeDefinitionHandle typeDefinitionHandle, Burst.Compiler.IL.Hashing.CacheBuilder.Util.CachingMetadataReader metadataReader, Burst.Compiler.IL.Helpers.Hash128Builder hashBuilder) [0x000fc] in <a2dd15248a25411e914af2a2c82fb63f>:0
    30.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinition (System.Reflection.Metadata.TypeDefinitionHandle typeDefinitionHandle, Burst.Compiler.IL.Hashing.CacheBuilder.Util.CachingMetadataReader metadataReader) [0x00006] in <a2dd15248a25411e914af2a2c82fb63f>:0
    31.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher+<>c__DisplayClass13_0.<HashImpl>b__5 (System.Reflection.Metadata.TypeDefinitionHandle typeDefinitionHandle, System.Threading.Tasks.ParallelLoopState loopState, System.Int64 i) [0x00000] in <a2dd15248a25411e914af2a2c82fb63f>:0
    32.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.ForEach[T] (System.Collections.Generic.IEnumerable`1[T] elements, System.Action`3[T1,T2,T3] callback) [0x00018] in <a2dd15248a25411e914af2a2c82fb63f>:0
    33.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher+<>c__DisplayClass13_0.<HashImpl>b__0 () [0x00000] in <a2dd15248a25411e914af2a2c82fb63f>:0
    34.   at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <05089c1b6989455fb1452c627044bac4>:0
    35.   at System.Threading.Tasks.Task.Execute () [0x00000] in <05089c1b6989455fb1452c627044bac4>:0 <---
    36.  
    37.  
    38. While compiling job:
    39.  
    Anybody could help me with it? Is it a bug with last Unity Editor version?

    Thanks!
     
    mizushino likes this.
  2. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    Hi @Tornar !

    Which version of Burst are you using there? If it's earlier than 1.8.2, please could you try 1.8.2 to see if it fixes your issue?

    If 1.8.2 doesn't fix the issue, we'll need a bug report, which you can submit via Help > Report a Bug.
     
    MarvinJesusCalvo likes this.
  3. quincyHuang

    quincyHuang

    Joined:
    May 30, 2013
    Posts:
    20
    Same here! 1.8.2 also. I have to roll back to 2021.3.15f1. Can not make it work in 2021.3.16f1. Any one has the same issue?
     
  4. Tornar

    Tornar

    Joined:
    Dec 28, 2020
    Posts:
    87
    Yes! I was using 1.8.x, not sure what specific version but it was last version I could update through "Package Manager". I don't understand why Unity 2021 LTS is using 1.8.x Burst version while Unity 2022 is using 1.7.4
     
  5. thinbugwk

    thinbugwk

    Joined:
    Oct 24, 2019
    Posts:
    2
    same question .
    2021.3.16 bursh:1.8.2
     
  6. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    Hi, we'd really like to investigate this problem, but for that we'll need a bug logged (and attached repro project / repro steps). Would one of you who have this issue be willing to do that please? :) You can do Help > Report a Bug.
     
  7. Tornar

    Tornar

    Joined:
    Dec 28, 2020
    Posts:
    87
    I updated to Unity 2022.2.1f1 and error had disappeared, but today after update to last Unity 2022.2.2f1, it is using Burst 1.8.2, and I am getting the same error :/

    I'll try report a bug @tim_jones, I hope you can fix it soon, because it is happening to me with all current Unity versions...
     
  8. Tornar

    Tornar

    Joined:
    Dec 28, 2020
    Posts:
    87
    It's the error I'm getting with Unity 2022.2.2f1

    Code (CSharp):
    1. Failed to find entry-points:
    2. System.AggregateException: One or more errors occurred. (An item with the same key has already been added. Key: ba90c8be510d7e31cc589f2de9f828e6) ---> System.ArgumentException: An item with the same key has already been added. Key: ba90c8be510d7e31cc589f2de9f828e6
    3.   at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x000dd] in <0c14436887c540e9a57b425f835ba9ed>:0
    4.   at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <0c14436887c540e9a57b425f835ba9ed>:0
    5.   at Burst.Compiler.IL.Hashing.Storage.NameToTokenDictionary.AddHash (Burst.Compiler.IL.Helpers.Hash128& hash, System.Int32 token) [0x00000] in <a2dd15248a25411e914af2a2c82fb63f>:0
    6.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinitionImpl (System.Reflection.Metadata.TypeDefinitionHandle typeDefinitionHandle, Burst.Compiler.IL.Hashing.CacheBuilder.Util.CachingMetadataReader metadataReader, Burst.Compiler.IL.Helpers.Hash128Builder hashBuilder) [0x000fc] in <a2dd15248a25411e914af2a2c82fb63f>:0
    7.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinition (System.Reflection.Metadata.TypeDefinitionHandle typeDefinitionHandle, Burst.Compiler.IL.Hashing.CacheBuilder.Util.CachingMetadataReader metadataReader) [0x00006] in <a2dd15248a25411e914af2a2c82fb63f>:0
    8.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher+<>c__DisplayClass13_0.<HashImpl>b__5 (System.Reflection.Metadata.TypeDefinitionHandle typeDefinitionHandle, System.Threading.Tasks.ParallelLoopState loopState, System.Int64 i) [0x00000] in <a2dd15248a25411e914af2a2c82fb63f>:0
    9.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.ForEach[T] (System.Collections.Generic.IEnumerable`1[T] elements, System.Action`3[T1,T2,T3] callback) [0x00018] in <a2dd15248a25411e914af2a2c82fb63f>:0
    10.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher+<>c__DisplayClass13_0.<HashImpl>b__0 () [0x00000] in <a2dd15248a25411e914af2a2c82fb63f>:0
    11.   at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <0c14436887c540e9a57b425f835ba9ed>:0
    12.   at System.Threading.Tasks.Task.Execute () [0x00000] in <0c14436887c540e9a57b425f835ba9ed>:0
    13.    --- End of inner exception stack trace ---
    14.   at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x001c8] in <0c14436887c540e9a57b425f835ba9ed>:0
    15.   at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, System.Int32 millisecondsTimeout) [0x00000] in <0c14436887c540e9a57b425f835ba9ed>:0
    16.   at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks) [0x00000] in <0c14436887c540e9a57b425f835ba9ed>:0
    17.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashImpl () [0x00243] in <a2dd15248a25411e914af2a2c82fb63f>:0
    18.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashAssembly (System.String filePath, System.Threading.Tasks.TaskFactory taskFactory) [0x00008] in <a2dd15248a25411e914af2a2c82fb63f>:0
    19.   at Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheLoader.CreateHashingResult (Mono.Cecil.AssemblyNameReference assemblyNameReference, Burst.Compiler.IL.AssemblyLoader assemblyLoader, Burst.Compiler.IL.Helpers.DebugLogWriter debugLogWriter) [0x001b1] in <a2dd15248a25411e914af2a2c82fb63f>:0
    20.   at Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore.GetAssemblyState (System.String assemblyName, Burst.Compiler.IL.AssemblyLoader assemblyLoader) [0x000a0] in <a2dd15248a25411e914af2a2c82fb63f>:0
    21.   at Burst.Compiler.IL.Server.EntryPointMethodFinder.LoadAllAssemblyReferences (Mono.Cecil.AssemblyDefinition asmDef, System.Collections.Generic.Dictionary`2[TKey,TValue] visited, System.Collections.Generic.Dictionary`2[TKey,TValue] jobProducers, Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore assemblyStore, Burst.Compiler.IL.AssemblyLoader assemblyLoader) [0x00020] in <a2dd15248a25411e914af2a2c82fb63f>:0
    22.   at Burst.Compiler.IL.Server.EntryPointMethodFinder.LoadAllAssemblyReferences (Mono.Cecil.AssemblyDefinition asmDef, System.Collections.Generic.Dictionary`2[TKey,TValue] visited, System.Collections.Generic.Dictionary`2[TKey,TValue] jobProducers, Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore assemblyStore, Burst.Compiler.IL.AssemblyLoader assemblyLoader) [0x001de] in <a2dd15248a25411e914af2a2c82fb63f>:0
    23.   at Burst.Compiler.IL.Server.EntryPointMethodFinder.FindEntryPoints (System.String[] rootAssemblyNames, Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore assemblyStore, Burst.Compiler.IL.AssemblyLoader assemblyLoader, Burst.Compiler.IL.NativeCompilerOptions options, Burst.Compiler.IL.Server.ProfileDelegate profileCallback, System.Boolean includeRootAssemblyReferences, System.Boolean splitTargets, Burst.Compiler.IL.Helpers.DebugLogWriter debugWriter) [0x00071] in <a2dd15248a25411e914af2a2c82fb63f>:0
    24.   at Burst.Compiler.IL.Server.FindMethodsJob.Execute (Burst.Compiler.IL.Server.CompilerServerJobExecutionContext context) [0x00133] in <a2dd15248a25411e914af2a2c82fb63f>:0
    25. ---> (Inner Exception #0) System.ArgumentException: An item with the same key has already been added. Key: ba90c8be510d7e31cc589f2de9f828e6
    26.   at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x000dd] in <0c14436887c540e9a57b425f835ba9ed>:0
    27.   at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <0c14436887c540e9a57b425f835ba9ed>:0
    28.   at Burst.Compiler.IL.Hashing.Storage.NameToTokenDictionary.AddHash (Burst.Compiler.IL.Helpers.Hash128& hash, System.Int32 token) [0x00000] in <a2dd15248a25411e914af2a2c82fb63f>:0
    29.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinitionImpl (System.Reflection.Metadata.TypeDefinitionHandle typeDefinitionHandle, Burst.Compiler.IL.Hashing.CacheBuilder.Util.CachingMetadataReader metadataReader, Burst.Compiler.IL.Helpers.Hash128Builder hashBuilder) [0x000fc] in <a2dd15248a25411e914af2a2c82fb63f>:0
    30.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinition (System.Reflection.Metadata.TypeDefinitionHandle typeDefinitionHandle, Burst.Compiler.IL.Hashing.CacheBuilder.Util.CachingMetadataReader metadataReader) [0x00006] in <a2dd15248a25411e914af2a2c82fb63f>:0
    31.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher+<>c__DisplayClass13_0.<HashImpl>b__5 (System.Reflection.Metadata.TypeDefinitionHandle typeDefinitionHandle, System.Threading.Tasks.ParallelLoopState loopState, System.Int64 i) [0x00000] in <a2dd15248a25411e914af2a2c82fb63f>:0
    32.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.ForEach[T] (System.Collections.Generic.IEnumerable`1[T] elements, System.Action`3[T1,T2,T3] callback) [0x00018] in <a2dd15248a25411e914af2a2c82fb63f>:0
    33.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher+<>c__DisplayClass13_0.<HashImpl>b__0 () [0x00000] in <a2dd15248a25411e914af2a2c82fb63f>:0
    34.   at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <0c14436887c540e9a57b425f835ba9ed>:0
    35.   at System.Threading.Tasks.Task.Execute () [0x00000] in <0c14436887c540e9a57b425f835ba9ed>:0 <---
    36.  
    37.  
    38. While compiling job:
    39.  
    And it is the bug report email:

    New Incident created: IN-28703 - Getting Error after update to Unity 2022.2.2f1 for Burts version

    @tim_jones please if you can follow-up this case, it would be great because we are going to release our game in a few months and it is a disturbing bug.

    Thanks!
     
    tim_jones and MarcoPersson like this.
  9. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    Thanks @Tornar - I can see the bug report, I'll follow-up.
     
    Tornar likes this.
  10. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    @Tornar I've found the problem: in one of your precompiled dlls, there's a type with two fields that have the same name. I'd guess this happens because you've run an obfuscator on that dll? Technically, types aren't supposed to have fields with duplicate names, and Burst relies on that rule, which is why it's breaking when there are fields with duplicate names.

    I'll DM you with the details about which dll / type / field, to avoid leaking that information here. If you're able to set some obfuscator options to stop it giving duplicate names to fields, that should fix the problem.

    We can also see what we can do on our end to make Burst more tolerant of this, but as I say, the ECMA335 standard for .NET dlls does say that field names should be unique, within an owner type.
     
  11. Tornar

    Tornar

    Joined:
    Dec 28, 2020
    Posts:
    87
  12. Tornar

    Tornar

    Joined:
    Dec 28, 2020
    Posts:
    87
    The developer of this awesome asset was so kind to send me the code associated to that DLL and now everything is working correctly with last Unity version,

    Thanks everybody for the help :)
     
    tim_jones likes this.
  13. derzorngottes

    derzorngottes

    Joined:
    May 13, 2016
    Posts:
    3
    Hi @tim_jones! I'm also seeing the same error while following the ML-Agent Hummingbird tutorial after installing the latest ML-Agent package.

    Unity version is also 2021.3.16 and the ML-Agent package is 2.0.1. Info specific to this combination in the error stack:

    Code (CSharp):
    1.  
    2. System.Exception: Unexpected exception while collecting types in assembly `Unity.Barracuda.ONNX, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null` ---> Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Google.Protobuf, Version=3.9.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604'
    Barracuda package is v 2.0.0 and Burst version is 1.8.2 if it matters.
     
  14. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    Hi @derzorngottes - next time you see that error in the Editor, please could you report a bug via Help > Report a Bug. That will help me get to the problem much more quickly, rather than going through the ML-Agent Hummingbird tutorial myself :) If you do, then please let me know the IN-XXXX number here, and I'll track it down.

    This looks like a different problem from the one that @Tornar mentioned above.
     
  15. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    Actually @derzorngottes I just tried creating an empty project from the URP template, and then added the ML-Agent package, and I saw the same error. This is a known issue in Burst 1.8.2, and will be fixed in 1.8.3. For now you can workaround it by restarting the Editor.
     
  16. yusufdemir2012

    yusufdemir2012

    Joined:
    Dec 21, 2013
    Posts:
    50
    Hey @tim_jones, we have same problem. I think I can't submit a bug report because of project is including too much dlls and the size of project is about ~60GB. Previously I was using Unity version 2021.3.2 and fixed this issue by downgrading Burst to version 1.6.6. Now I switched my unity version to 2021.3.16 and now I can't downgrading Burst version, because some unity packages like URP is need Burst 1.8.2. I can't build my project. Do you have any suggestion?


    Code (CSharp):
    1. BuildFailedException: Burst compiler (1.8.2) failed running
    2.  
    3. stdout:
    4. Error: Failed to find entry-points:
    5. System.AggregateException: One or more errors occurred. ---> System.ArgumentException: An item with the same key has already been added.
    6.    at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
    7.    at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
    8.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinitionImpl(TypeDefinitionHandle typeDefinitionHandle, CachingMetadataReader metadataReader, Hash128Builder hashBuilder)
    9.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinition(TypeDefinitionHandle typeDefinitionHandle, CachingMetadataReader metadataReader)
    10.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.<>c__DisplayClass13_0.<HashImpl>b__5(TypeDefinitionHandle typeDefinitionHandle, ParallelLoopState loopState, Int64 i)
    11.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.ForEach[T](IEnumerable`1 elements, Action`3 callback)
    12.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.<>c__DisplayClass13_0.<HashImpl>b__0()
    13.    at System.Threading.Tasks.Task.Execute()
    14.    --- End of inner exception stack trace ---
    15.    at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
    16.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashImpl()
    17.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashAssembly(String filePath, TaskFactory taskFactory)
    18.    at Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheLoader.CreateHashingResult(AssemblyNameReference assemblyNameReference, AssemblyLoader assemblyLoader, DebugLogWriter debugLogWriter)
    19.    at Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore.GetAssemblyState(String assemblyName, AssemblyLoader assemblyLoader)
    20.    at Burst.Compiler.IL.Server.EntryPointMethodFinder.LoadAllAssemblyReferences(AssemblyDefinition asmDef, Dictionary`2 visited, Dictionary`2 jobProducers, HashCacheAssemblyStore assemblyStore, AssemblyLoader assemblyLoader)
    21.    at Burst.Compiler.IL.Server.EntryPointMethodFinder.LoadAllAssemblyReferences(AssemblyDefinition asmDef, Dictionary`2 visited, Dictionary`2 jobProducers, HashCacheAssemblyStore assemblyStore, AssemblyLoader assemblyLoader)
    22.    at Burst.Compiler.IL.Server.EntryPointMethodFinder.FindEntryPoints(String[] rootAssemblyNames, HashCacheAssemblyStore assemblyStore, AssemblyLoader assemblyLoader, NativeCompilerOptions options, ProfileDelegate profileCallback, Boolean includeRootAssemblyReferences, Boolean splitTargets, DebugLogWriter debugWriter)
    23.    at Burst.Compiler.IL.Server.FindMethodsJob.Execute(CompilerServerJobExecutionContext context)
    24. ---> (Inner Exception #0) System.ArgumentException: An item with the same key has already been added.
    25.    at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
    26.    at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
    27.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinitionImpl(TypeDefinitionHandle typeDefinitionHandle, CachingMetadataReader metadataReader, Hash128Builder hashBuilder)
    28.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinition(TypeDefinitionHandle typeDefinitionHandle, CachingMetadataReader metadataReader)
    29.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.<>c__DisplayClass13_0.<HashImpl>b__5(TypeDefinitionHandle typeDefinitionHandle, ParallelLoopState loopState, Int64 i)
    30.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.ForEach[T](IEnumerable`1 elements, Action`3 callback)
    31.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.<>c__DisplayClass13_0.<HashImpl>b__0()
    32.    at System.Threading.Tasks.Task.Execute()<---
    33.  
    34. stderr:
    35.  
    36. Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at Library/PackageCache/com.unity.burst@1.8.2/Editor/BurstAotCompiler.cs:1728)
    37. Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at Library/PackageCache/com.unity.burst@1.8.2/Editor/BurstAotCompiler.cs:1594)
    38. Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunManagedProgram (System.String exe, System.String args, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at Library/PackageCache/com.unity.burst@1.8.2/Editor/BurstAotCompiler.cs:1569)
    39. Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLsImpl (Unity.Burst.Editor.BurstAotCompiler+BurstAOTSettings settings, UnityEditor.Compilation.Assembly[] playerAssemblies) (at Library/PackageCache/com.unity.burst@1.8.2/Editor/BurstAotCompiler.cs:710)
    40. Unity.Burst.Editor.BurstAOTCompilerPostprocessor.DoGenerate (UnityEditor.Compilation.Assembly[] assemblies) (at Library/PackageCache/com.unity.burst@1.8.2/Editor/BurstAotCompiler.cs:265)
    41. Unity.Burst.Editor.BurstAOTCompilerPostprocessor.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.8.2/Editor/BurstAotCompiler.cs:189)
    42. UnityEditor.Build.BuildPipelineInterfaces.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at <11d97693183d4a6bb35c29ae7882c66b>:0)
    43. UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions)
    44. EditorBuildProcessor:BuildPlayerHandler(BuildPlayerOptions) (at Assets/_Game/Scripts/Editor/EditorBuildProcessor.cs:38)
    45. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
     
  17. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    Hi @yusufdemir2012 - that error does indeed look the same as @Tornar's error. Are you using any precompiled and obfuscated dlls in your project?
     
  18. yusufdemir2012

    yusufdemir2012

    Joined:
    Dec 21, 2013
    Posts:
    50
    Actually I am not sure about that, how do I know?
     
  19. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    Precompiled dlls would be any .dll files in your Assets folder, that are not compiled by the script compilation pipeline, but are already compiled by you or third parties and then added to your project as already-compiled dlls. They can also exist in packages, although I'm pretty sure that Unity-provided packages don't include obfuscated dlls, but third-party packages might contain them.

    The next step is finding out if any of the precompiled assemblies are obfuscated. That's a bit harder, if you didn't compile the assemblies yourself. Usually you need to do something like opening the .dll in a tool like ILSpy, and looking to see if any of the type names or method names have been obfuscated.
     
  20. LiamVisionary

    LiamVisionary

    Joined:
    Apr 2, 2020
    Posts:
    48
    I'm getting the same error as OP in Unity 2021.3.16 and 2021.3.17. As a result, seems like burst is stuck at 99% compilation.

    @tim_jones
     
  21. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    233
    Having a similar issue. I'm using 3rd party DLLs. Just like others mentioned, the problem started with Unity 2021.3.16.

    Code (CSharp):
    1. Failed to find entry-points:
    2. System.Exception: Unexpected exception while collecting types in assembly `InsaneScatterbrain.MapGraph.Editor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null` ---> Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'QuikGraph_MapGraph, Version=2.5.0.0, Culture=neutral, PublicKeyToken=null'
    3.   at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x00105] in <ebb9e4250ed24cbfa42055e3532ef311>:0
    4.   at zzzUnity.Burst.CodeGen.AssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00039] in <a2dd15248a25411e914af2a2c82fb63f>:0
    5.   at Burst.Compiler.IL.AssemblyLoader.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00079] in <a2dd15248a25411e914af2a2c82fb63f>:0
    6.   at Mono.Cecil.MetadataResolver.Resolve (Mono.Cecil.TypeReference type) [0x00038] in <ebb9e4250ed24cbfa42055e3532ef311>:0
    7.   at Mono.Cecil.ModuleDefinition.Resolve (Mono.Cecil.TypeReference type) [0x00006] in <ebb9e4250ed24cbfa42055e3532ef311>:0
    8.   at Mono.Cecil.TypeReference.Resolve () [0x00006] in <ebb9e4250ed24cbfa42055e3532ef311>:0
    9.   at Burst.Compiler.IL.Server.EntryPointMethodFinder.CollectGenericTypeInstances (Mono.Cecil.TypeReference type, System.Collections.Generic.List`1[T] types, System.Collections.Generic.HashSet`1[T] visited) [0x0002f] in <a2dd15248a25411e914af2a2c82fb63f>:0
    10.   at Burst.Compiler.IL.Server.EntryPointMethodFinder.CollectGenericTypeInstances (Mono.Cecil.AssemblyDefinition assembly, System.Collections.Generic.List`1[T] types, System.Collections.Generic.HashSet`1[T] visited) [0x00057] in <a2dd15248a25411e914af2a2c82fb63f>:0
    11.   at Burst.Compiler.IL.Server.EntryPointMethodFinder.FindEntryPoints (System.String[] rootAssemblyNames, Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore assemblyStore, Burst.Compiler.IL.AssemblyLoader assemblyLoader, Burst.Compiler.IL.NativeCompilerOptions options, Burst.Compiler.IL.Server.ProfileDelegate profileCallback, System.Boolean includeRootAssemblyReferences, System.Boolean splitTargets, Burst.Compiler.IL.Helpers.DebugLogWriter debugWriter) [0x0019d] in <a2dd15248a25411e914af2a2c82fb63f>:0
    12.    --- End of inner exception stack trace ---
    13.   at Burst.Compiler.IL.Server.EntryPointMethodFinder.FindEntryPoints (System.String[] rootAssemblyNames, Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore assemblyStore, Burst.Compiler.IL.AssemblyLoader assemblyLoader, Burst.Compiler.IL.NativeCompilerOptions options, Burst.Compiler.IL.Server.ProfileDelegate profileCallback, System.Boolean includeRootAssemblyReferences, System.Boolean splitTargets, Burst.Compiler.IL.Helpers.DebugLogWriter debugWriter) [0x001d9] in <a2dd15248a25411e914af2a2c82fb63f>:0
    14.   at Burst.Compiler.IL.Server.FindMethodsJob.Execute (Burst.Compiler.IL.Server.CompilerServerJobExecutionContext context) [0x00133] in <a2dd15248a25411e914af2a2c82fb63f>:0
    15.  
    16. While compiling job:
     
  22. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    @AbdelNabut and @InScatterbrain - please could you log bug reports via Help > Report a Bug ? There are at least a couple of different callstacks in this thread, and without seeing your project it's really hard to know which problem it is or how to fix it. Once you've reported the bug please let me know the bug number and I'll follow it up :)
     
  23. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    233
    Thanks for the swift reply! I've reported the bug under IN-30071. :)
     
  24. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    233
    Oh, one thing I forgot to mention is that for me it seems to be a one and done error. Meaning that it shows the error once and there are not real issues after that. However, I don't have any projects going using the HDRP/URP templates atm.

    I've heard from others that are using my asset that the error will recur to the point that it goes into an infinite import loop.

    I could ask them to do a bug report as well if that's helpful?
     
  25. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    Thanks very much @InScatterbrain - from an initial look, I'm 99% sure this a known issue that we've fixed (but not yet released). Specifically, the issue occurs when you have Burst already in your project, and then you add a package or asset that contains precompiled binaries. Burst doesn't correctly resolve the newly-added precompiled binaries. We've fixed that bug in the upcoming 1.8.3.
     
    Salty333, amokto and InScatterbrain like this.
  26. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    Yes please :) If it's occurring every time, even after restarting the Editor, then they may be encountering a different bug. The bug I just mentioned above only occurs immediately after you add the new asset / package, and goes away after you restart the Editor.
     
    InScatterbrain likes this.
  27. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    233
    Ok, great! Thanks for looking into it and getting back to me. :)
     
  28. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    233
    Ok, I will try to get some more bug reports going then. :)
     
    tim_jones likes this.
  29. weiner_monkey

    weiner_monkey

    Joined:
    Aug 1, 2022
    Posts:
    49
    Facing this issue as well after upgrading to 2021.3.17 LTS, no extra packages added or anything

    Code (CSharp):
    1. BuildFailedException: Burst compiler (1.8.2) failed running
    2.  
    3. stdout:
    4. Error: Failed to find entry-points:
    5. System.AggregateException: One or more errors occurred. ---> System.ArgumentException: An item with the same key has already been added.
    6.    at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
    7.    at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
    8.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinitionImpl(TypeDefinitionHandle typeDefinitionHandle, CachingMetadataReader metadataReader, Hash128Builder hashBuilder)
    9.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinition(TypeDefinitionHandle typeDefinitionHandle, CachingMetadataReader metadataReader)
    10.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.<>c__DisplayClass13_0.<HashImpl>b__5(TypeDefinitionHandle typeDefinitionHandle, ParallelLoopState loopState, Int64 i)
    11.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.ForEach[T](IEnumerable`1 elements, Action`3 callback)
    12.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.<>c__DisplayClass13_0.<HashImpl>b__0()
    13.    at System.Threading.Tasks.Task.Execute()
    14.    --- End of inner exception stack trace ---
    15.    at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
    16.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashImpl()
    17.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashAssembly(String filePath, TaskFactory taskFactory)
    18.    at Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheLoader.CreateHashingResult(AssemblyNameReference assemblyNameReference, AssemblyLoader assemblyLoader, DebugLogWriter debugLogWriter)
    19.    at Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore.GetAssemblyState(String assemblyName, AssemblyLoader assemblyLoader)
    20.    at Burst.Compiler.IL.Server.EntryPointMethodFinder.LoadAllAssemblyReferences(AssemblyDefinition asmDef, Dictionary`2 visited, Dictionary`2 jobProducers, HashCacheAssemblyStore assemblyStore, AssemblyLoader assemblyLoader)
    21.    at Burst.Compiler.IL.Server.EntryPointMethodFinder.LoadAllAssemblyReferences(AssemblyDefinition asmDef, Dictionary`2 visited, Dictionary`2 jobProducers, HashCacheAssemblyStore assemblyStore, AssemblyLoader assemblyLoader)
    22.    at Burst.Compiler.IL.Server.EntryPointMethodFinder.FindEntryPoints(String[] rootAssemblyNames, HashCacheAssemblyStore assemblyStore, AssemblyLoader assemblyLoader, NativeCompilerOptions options, ProfileDelegate profileCallback, Boolean includeRootAssemblyReferences, Boolean splitTargets, DebugLogWriter debugWriter)
    23.    at Burst.Compiler.IL.Server.FindMethodsJob.Execute(CompilerServerJobExecutionContext context)
    24. ---> (Inner Exception #0) System.ArgumentException: An item with the same key has already been added.
    25.    at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
    26.    at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
    27.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinitionImpl(TypeDefinitionHandle typeDefinitionHandle, CachingMetadataReader metadataReader, Hash128Builder hashBuilder)
    28.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinition(TypeDefinitionHandle typeDefinitionHandle, CachingMetadataReader metadataReader)
    29.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.<>c__DisplayClass13_0.<HashImpl>b__5(TypeDefinitionHandle typeDefinitionHandle, ParallelLoopState loopState, Int64 i)
    30.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.ForEach[T](IEnumerable`1 elements, Action`3 callback)
    31.    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.<>c__DisplayClass13_0.<HashImpl>b__0()
    32.    at System.Threading.Tasks.Task.Execute()<---
    33.  
    34. stderr:
    35.  
    36. Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at Library/PackageCache/com.unity.burst@1.8.2/Editor/BurstAotCompiler.cs:1728)
    37. Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at Library/PackageCache/com.unity.burst@1.8.2/Editor/BurstAotCompiler.cs:1594)
    38. Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunManagedProgram (System.String exe, System.String args, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at Library/PackageCache/com.unity.burst@1.8.2/Editor/BurstAotCompiler.cs:1569)
    39. Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLsImpl (Unity.Burst.Editor.BurstAotCompiler+BurstAOTSettings settings, UnityEditor.Compilation.Assembly[] playerAssemblies) (at Library/PackageCache/com.unity.burst@1.8.2/Editor/BurstAotCompiler.cs:710)
    40. Unity.Burst.Editor.BurstAOTCompilerPostprocessor.DoGenerate (UnityEditor.Compilation.Assembly[] assemblies) (at Library/PackageCache/com.unity.burst@1.8.2/Editor/BurstAotCompiler.cs:265)
    41. Unity.Burst.Editor.BurstAOTCompilerPostprocessor.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.8.2/Editor/BurstAotCompiler.cs:189)
    42. UnityEditor.Build.BuildPipelineInterfaces.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at <434908727417408abd02bbd1a0835ef8>:0)
    43. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
     
    Last edited: Jan 29, 2023
  30. LiamVisionary

    LiamVisionary

    Joined:
    Apr 2, 2020
    Posts:
    48
    At first couldn't even the get the project to load anymore, was stuck at loading initial domain with user assemblies. Downgraded to Unity 2021.3.15 lets me open the project, but the whole thing is frozen. Can't even access the help menu to report the bug. Any alternative way of reporting?
     
  31. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    233
    Looks like it still uses the same version of Burst (1.8.2), so I wouldn't expect it to be fixed yet.

    Think we need to wait for Burst 1.8.3 to be released before this is solved.
     
  32. weiner_monkey

    weiner_monkey

    Joined:
    Aug 1, 2022
    Posts:
    49
    Yep, disabling burst compilation/downgrading unity seems to be the only option for now
     
  33. siumanchun

    siumanchun

    Joined:
    Apr 7, 2013
    Posts:
    44
    Plaese Help ! Unity 2021.3.18.f1 , Not Burst 1.8.3 Update ?
    Thanks !
     
  34. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    @siumanchun if I understand correctly, you're saying that Burst 1.8.3 is not visible in Package Manager in 2021.3.18f1?

    If so, yes you're correct that it doesn't show up in the UI by default. But you can manually install it by clicking the "+" button in the Package Manager window, then choosing "Install package by name", then entering "com.unity.burst" for the name and "1.8.3" for the version.
     
    JiaruiLi726 and mkr67n like this.
  35. thinbugwk

    thinbugwk

    Joined:
    Oct 24, 2019
    Posts:
    2
    The bug still exists
    unity : 2021.3.18f1c1
    burst : 1.8.3

    Code (CSharp):
    1.  
    2. Failed to find entry-points:
    3. System.AggregateException: One or more errors occurred. (An item with the same key has already been added. Key: ba90c8be510d7e31cc589f2de9f828e6) ---> System.ArgumentException: An item with the same key has already been added. Key: ba90c8be510d7e31cc589f2de9f828e6
    4.   at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x000dd] in <1f66344f2f89470293d8b67d71308c07>:0
    5.   at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <1f66344f2f89470293d8b67d71308c07>:0
    6.   at Burst.Compiler.IL.Hashing.Storage.NameToTokenDictionary.AddHash (Burst.Compiler.IL.Helpers.Hash128& hash, System.Int32 token) [0x00000] in <a60580435cf345a18c987df05e687648>:0
    7.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinitionImpl (System.Reflection.Metadata.TypeDefinitionHandle typeDefinitionHandle, Burst.Compiler.IL.Hashing.CacheBuilder.Util.CachingMetadataReader metadataReader, Burst.Compiler.IL.Helpers.Hash128Builder hashBuilder) [0x000fc] in <a60580435cf345a18c987df05e687648>:0
    8.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinition (System.Reflection.Metadata.TypeDefinitionHandle typeDefinitionHandle, Burst.Compiler.IL.Hashing.CacheBuilder.Util.CachingMetadataReader metadataReader) [0x00006] in <a60580435cf345a18c987df05e687648>:0
    9.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher+<>c__DisplayClass13_0.<HashImpl>b__5 (System.Reflection.Metadata.TypeDefinitionHandle typeDefinitionHandle, System.Threading.Tasks.ParallelLoopState loopState, System.Int64 i) [0x00000] in <a60580435cf345a18c987df05e687648>:0
    10.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.ForEach[T] (System.Collections.Generic.IEnumerable`1[T] elements, System.Action`3[T1,T2,T3] callback) [0x00018] in <a60580435cf345a18c987df05e687648>:0
    11.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher+<>c__DisplayClass13_0.<HashImpl>b__0 () [0x00000] in <a60580435cf345a18c987df05e687648>:0
    12.   at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <1f66344f2f89470293d8b67d71308c07>:0
    13.   at System.Threading.Tasks.Task.Execute () [0x00000] in <1f66344f2f89470293d8b67d71308c07>:0
    14.    --- End of inner exception stack trace ---
    15.   at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x001c8] in <1f66344f2f89470293d8b67d71308c07>:0
    16.   at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, System.Int32 millisecondsTimeout) [0x00000] in <1f66344f2f89470293d8b67d71308c07>:0
    17.   at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks) [0x00000] in <1f66344f2f89470293d8b67d71308c07>:0
    18.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashImpl () [0x00243] in <a60580435cf345a18c987df05e687648>:0
    19.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashAssembly (System.String filePath, System.Threading.Tasks.TaskFactory taskFactory) [0x00008] in <a60580435cf345a18c987df05e687648>:0
    20.   at Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheLoader.CreateHashingResult (Mono.Cecil.AssemblyNameReference assemblyNameReference, Burst.Compiler.IL.AssemblyLoader assemblyLoader, Burst.Compiler.IL.Helpers.DebugLogWriter debugLogWriter) [0x001b1] in <a60580435cf345a18c987df05e687648>:0
    21.   at Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore.GetAssemblyState (System.String assemblyName, Burst.Compiler.IL.AssemblyLoader assemblyLoader) [0x000a0] in <a60580435cf345a18c987df05e687648>:0
    22.   at Burst.Compiler.IL.Server.EntryPointMethodFinder.LoadAllAssemblyReferences (Mono.Cecil.AssemblyDefinition asmDef, System.Collections.Generic.Dictionary`2[TKey,TValue] visited, System.Collections.Generic.Dictionary`2[TKey,TValue] jobProducers, Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore assemblyStore, Burst.Compiler.IL.AssemblyLoader assemblyLoader) [0x00025] in <a60580435cf345a18c987df05e687648>:0
    23.   at Burst.Compiler.IL.Server.EntryPointMethodFinder.LoadAllAssemblyReferences (Mono.Cecil.AssemblyDefinition asmDef, System.Collections.Generic.Dictionary`2[TKey,TValue] visited, System.Collections.Generic.Dictionary`2[TKey,TValue] jobProducers, Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore assemblyStore, Burst.Compiler.IL.AssemblyLoader assemblyLoader) [0x001e3] in <a60580435cf345a18c987df05e687648>:0
    24.   at Burst.Compiler.IL.Server.EntryPointMethodFinder.FindEntryPoints (System.String[] rootAssemblyNames, Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore assemblyStore, Burst.Compiler.IL.AssemblyLoader assemblyLoader, Burst.Compiler.IL.NativeCompilerOptions options, Burst.Compiler.IL.Server.ProfileDelegate profileCallback, System.Boolean includeRootAssemblyReferences, System.Boolean splitTargets) [0x00071] in <a60580435cf345a18c987df05e687648>:0
    25.   at Burst.Compiler.IL.Server.FindMethodsJob.Execute (Burst.Compiler.IL.Server.CompilerServerJobExecutionContext context) [0x0011e] in <a60580435cf345a18c987df05e687648>:0
    26. ---> (Inner Exception #0) System.ArgumentException: An item with the same key has already been added. Key: ba90c8be510d7e31cc589f2de9f828e6
    27.   at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x000dd] in <1f66344f2f89470293d8b67d71308c07>:0
    28.   at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <1f66344f2f89470293d8b67d71308c07>:0
    29.   at Burst.Compiler.IL.Hashing.Storage.NameToTokenDictionary.AddHash (Burst.Compiler.IL.Helpers.Hash128& hash, System.Int32 token) [0x00000] in <a60580435cf345a18c987df05e687648>:0
    30.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinitionImpl (System.Reflection.Metadata.TypeDefinitionHandle typeDefinitionHandle, Burst.Compiler.IL.Hashing.CacheBuilder.Util.CachingMetadataReader metadataReader, Burst.Compiler.IL.Helpers.Hash128Builder hashBuilder) [0x000fc] in <a60580435cf345a18c987df05e687648>:0
    31.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinition (System.Reflection.Metadata.TypeDefinitionHandle typeDefinitionHandle, Burst.Compiler.IL.Hashing.CacheBuilder.Util.CachingMetadataReader metadataReader) [0x00006] in <a60580435cf345a18c987df05e687648>:0
    32.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher+<>c__DisplayClass13_0.<HashImpl>b__5 (System.Reflection.Metadata.TypeDefinitionHandle typeDefinitionHandle, System.Threading.Tasks.ParallelLoopState loopState, System.Int64 i) [0x00000] in <a60580435cf345a18c987df05e687648>:0
    33.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.ForEach[T] (System.Collections.Generic.IEnumerable`1[T] elements, System.Action`3[T1,T2,T3] callback) [0x00018] in <a60580435cf345a18c987df05e687648>:0
    34.   at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher+<>c__DisplayClass13_0.<HashImpl>b__0 () [0x00000] in <a60580435cf345a18c987df05e687648>:0
    35.   at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <1f66344f2f89470293d8b67d71308c07>:0
    36.   at System.Threading.Tasks.Task.Execute () [0x00000] in <1f66344f2f89470293d8b67d71308c07>:0 <---
    37. While compiling job:
    38.  
    39.  

    Build:
    Code (CSharp):
    1. BuildFailedException: Burst compiler (1.8.3) failed running
    2.  
    3. stdout:
    4. Error: Failed to find entry-points:
    5. System.AggregateException: ����һ���������� ---> System.ArgumentException: ������˾�����ͬ�����
    6.    �� System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
    7.    �� System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
    8.    �� Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinitionImpl(TypeDefinitionHandle typeDefinitionHandle, CachingMetadataReader metadataReader, Hash128Builder hashBuilder)
    9.    �� Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinition(TypeDefinitionHandle typeDefinitionHandle, CachingMetadataReader metadataReader)
    10.    �� Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.<>c__DisplayClass13_0.<HashImpl>b__5(TypeDefinitionHandle typeDefinitionHandle, ParallelLoopState loopState, Int64 i)
    11.  
    BuildFailedException: Burst compiler (1.8.3) failed running
    stdout:
    Error: Failed to find entry-points:
    System.AggregateException: ����һ���������� ---> System.ArgumentException: ������˾�����ͬ�����
    �� System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
    �� System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
    �� Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinitionImpl(TypeDefinitionHandle typeDefinitionHandle, CachingMetadataReader metadataReader, Hash128Builder hashBuilder)
    �� Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashTypeDefinition(TypeDefinitionHandle typeDefinitionHandle, CachingMetadataReader metadataReader)
    �� Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.<>c__DisplayClass13_0.<HashImpl>b__5(TypeDefinitionHandle typeDefinitionHandle, ParallelLoopState loopState, Int64 i)
     
  36. justindpnt

    justindpnt

    Joined:
    Feb 21, 2019
    Posts:
    18
    Can confirm still broken. Happens when using 3rd party DLLs.
     
  37. LiamVisionary

    LiamVisionary

    Joined:
    Apr 2, 2020
    Posts:
    48
    Burst was completely freezing my editor, I had to open up a new scene (to clear out any references to game objects using burst), then disable burst compilation. Seems totally broken on Silicon Macs.
     
  38. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    Regarding the "An item with the same key has already been added" error - thanks for the replies. It does indeed look like there's still a bug there, but we'll need bug reports to be able to investigate what that bug is. @thinbugwk and @justindpnt please could you submit a bug report via Help > Report a Bug?

    @AbdelNabut that sounds like a different problem. We'd appreciate a bug report for that too, along with repro steps. As you noted, you can't reach the Help menu after it freezes, which is awkward :) But could you still submit a bug report when it's not frozen, as long as there are some repro steps that reproduce the problem reasonably consistently - is that the case? Or is it quite random?
     
  39. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    Okay, we're pretty sure we've figured out the bug causing the "An item with the same key has already been added" error. We'll have a fix in the upcoming Burst 1.8.4 that we plan to release soon.
     
    InScatterbrain likes this.
  40. Silentor666

    Silentor666

    Joined:
    Dec 14, 2013
    Posts:
    16
    Hello!
    I have added minimal reproducible project for "An item with the same key has already been added" error. Just one DLL from Adverty plugin + two scripts.
    IN-33119
     
  41. Maroow1

    Maroow1

    Joined:
    May 18, 2020
    Posts:
    6
    Me too , same error..

    Failed to find entry-points:
    System.ArgumentException: An item with the same key has already been added. Key: ab51592ddff0ec7816dcd0bf7a6a095b
    at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x000dd] in <83161767e3f34f4a9c1453ea3e22d1f1>:0
    at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <83161767e3f34f4a9c1453ea3e22d1f1>:0
    at Burst.Compiler.IL.Hashing.Storage.NameToTokenDictionary.AddHash (Burst.Compiler.IL.Helpers.Hash128& hash, System.Int32 token) [0x00000] in <a60580435cf345a18c987df05e687648>:0
    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashImpl () [0x0022c] in <a60580435cf345a18c987df05e687648>:0
    at Burst.Compiler.IL.Hashing.CacheBuilder.ILHasher.HashAssembly (System.String filePath, System.Threading.Tasks.TaskFactory taskFactory) [0x00008] in <a60580435cf345a18c987df05e687648>:0
    at Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheLoader.CreateHashingResult (Mono.Cecil.AssemblyNameReference assemblyNameReference, Burst.Compiler.IL.AssemblyLoader assemblyLoader, Burst.Compiler.IL.Helpers.DebugLogWriter debugLogWriter) [0x001b1] in <a60580435cf345a18c987df05e687648>:0
    at Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore.GetAssemblyState (System.String assemblyName, Burst.Compiler.IL.AssemblyLoader assemblyLoader) [0x000a0] in <a60580435cf345a18c987df05e687648>:0
    at Burst.Compiler.IL.Server.EntryPointMethodFinder.LoadAllAssemblyReferences (Mono.Cecil.AssemblyDefinition asmDef, System.Collections.Generic.Dictionary`2[TKey,TValue] visited, System.Collections.Generic.Dictionary`2[TKey,TValue] jobProducers, Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore assemblyStore, Burst.Compiler.IL.AssemblyLoader assemblyLoader) [0x00025] in <a60580435cf345a18c987df05e687648>:0
    at Burst.Compiler.IL.Server.EntryPointMethodFinder.LoadAllAssemblyReferences (Mono.Cecil.AssemblyDefinition asmDef, System.Collections.Generic.Dictionary`2[TKey,TValue] visited, System.Collections.Generic.Dictionary`2[TKey,TValue] jobProducers, Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore assemblyStore, Burst.Compiler.IL.AssemblyLoader assemblyLoader) [0x001e3] in <a60580435cf345a18c987df05e687648>:0
    at Burst.Compiler.IL.Server.EntryPointMethodFinder.FindEntryPoints (System.String[] rootAssemblyNames, Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore assemblyStore, Burst.Compiler.IL.AssemblyLoader assemblyLoader, Burst.Compiler.IL.NativeCompilerOptions options, Burst.Compiler.IL.Server.ProfileDelegate profileCallback, System.Boolean includeRootAssemblyReferences, System.Boolean splitTargets) [0x00071] in <a60580435cf345a18c987df05e687648>:0
    at Burst.Compiler.IL.Server.FindMethodsJob.Execute (Burst.Compiler.IL.Server.CompilerServerJobExecutionContext context) [0x0011e] in <a60580435cf345a18c987df05e687648>:0

    While compiling job:

    Please Help me.............
     
  42. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    233
    I think the only thing you can do right now to avoid this, is to open your project in an older version of Unity (2021.3.15 or lower). It uses a different version of the Burst package that doesn't have this issue.
     
    Maroow1 likes this.
  43. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    Hi @Silentor666 - thanks for the bug report. I can confirm that Burst 1.8.4 will fix the issue in the repro project you uploaded. We plan to release 1.8.4 soon.
     
    Silentor666 likes this.
  44. miroslav1414

    miroslav1414

    Joined:
    Feb 12, 2023
    Posts:
    2
    I downloaded an asset from asset store and it caused this error from above. When i deleted it from the project, error was gone :)
     
  45. Maroow1

    Maroow1

    Joined:
    May 18, 2020
    Posts:
    6
    yes. thank you for reply
    but i'm don't want downgrade engine (cause re install it scares me)

    i'm wating Burst 1.8.4 update.

    1.8.3 ↓ Solution

    Project Settings->Burst AOT Settings -> Enable Burst Compilation(Un Check) , Enable Optimizations (Un Check)
    Go to build

    this is non burst compiler build.

    i'm use this!
     
    dev2X and jongning like this.
  46. IJM

    IJM

    Joined:
    Aug 31, 2010
    Posts:
    143
    When will you release burst 1.8.4?
     
  47. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    In the coming small number of weeks - it's hard to be more precise than that.
     
    InScatterbrain likes this.
  48. IJM

    IJM

    Joined:
    Aug 31, 2010
    Posts:
    143
    Highly unfortunate, and extremely unacceptable.

    Anyway...

    If anyone else was unfortunate enough to move to one of the latest versions of Unity that only supports this broken version of Burst, I have some good news for you. You can still run Burst 1.7.4 that works just fine.

    How to run Burst 1.7.4:
    First of all, you'll need a package.
    One way to download the Burst 1.7.4. is to create a project with the older version of Unity that "supports" it and install Burst 1.7.4.
    After that, close Unity Editor and go to the Library folder of that project, there you can find "PackageCache" folder that will contain "com.unity.burst@1.7.4".
    Copy this folder (com.unity.burst@1.7.4) outside of the "Assets" folder in your new project that "doesn't" support Burst 1.7 or older, and now you can open that project and manually reference this burst version from the Package Manager.

    Hope this helps.
    Have a nice day.
     
    leejunghoon likes this.
  49. monry_kidsstar

    monry_kidsstar

    Joined:
    Jun 7, 2013
    Posts:
    10
    It was still occurring in v1.8.3. (Has v1.8.4 been withdrawn?)
    It seems to occur when arguments of an asynchronous lambda expression with multiple arguments is discarded with underscores.

    Code (CSharp):
    1. // NG
    2. Func<int, int, Task> ng = async (_, _) => {};
    3.  
    4. // OK
    5. Action<int, int> ok1 = (_, _) => {};
    6. Func<int, int, int> ok2 = (_, _) => 1;
    7. Func<int, int, Task> ok3 = (_, _) => Task.CompletedTask;
     
    Last edited: Feb 27, 2023
    kyubuns and tim_jones like this.
  50. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    Thanks @monry_kidsstar, that's useful to know. I'll check that the fix in the upcoming 1.8.4 covers those cases you mentioned.
     
    monry_kidsstar likes this.