Burst internal compiler error from BurstTriangulator in AStar v5.2.4

  • A* version: 5.2.4
  • Unity version: 2022.3.51f1
  • Entities 1.3.5
  • Entities.Graphics 1.3.2
  • Unity.Collections 2.5.1
  • Burst 1.8.18

Burst compiler is throwing the error:
Burst internal compiler error: System.Exception: Error while generating hash for method references: System.Exception: Error while hashing 0x06000083 in andywiecko.BurstTriangulator…

I’m assuming it’s coming from Core/Geometry/Triangulation that has a separate assembly definition.
It’s constrained to Unity.Collections 2.2.0 or higher & getting included in my build.

A won’t-fix resolution note mentions upgrading to burst 1.8.7 shows the message more clearly (probably unsupported return type, structs not allowed)… I’m currently on 1.8.18 & can’t upgrade in this project yet, so I can’t confirm.

Might be unrelated, but I notice that assembly wants to load Unity.Mathematics.FixedPoint, which isn’t found in my project.

image

Full error:

Burst internal compiler error: System.Exception: Error while generating hash for method references: System.Exception: Error while hashing 0x06000083 in andywiecko.BurstTriangulator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null —> System.Exception: Error while visiting referenced token 0x0A0000B4 in andywiecko.BurstTriangulator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null —> System.Exception: Error while resolving interface method 0x0A0000B4 in andywiecko.BurstTriangulator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null on type 0x02000029 in assembly E:\Dev\RC\Unity\Operator\Operator-Unity\Library\ScriptAssemblies\andywiecko.BurstTriangulator.dll —> System.InvalidOperationException: Failed to resolve method with name hash ‘d569f60975f13ee07b01ce8bdcba0231’ in type definition ‘0x02000029 in assembly E:\Dev\RC\Unity\Operator\Operator-Unity\Library\ScriptAssemblies\andywiecko.BurstTriangulator.dll’
at Burst.Compiler.IL.Hashing.CacheRuntime.Metadata.CachedTypeDefinition.TryResolveInterfaceMethod (Burst.Compiler.IL.Hashing.CacheRuntime.Metadata.CachedHandle interfaceMethod, Burst.Compiler.IL.Hashing.ILGenericContext interfaceMethodGenericContext, Burst.Compiler.IL.Hashing.ILGenericContext& methodGenericContext, Burst.Compiler.IL.Hashing.CacheRuntime.Metadata.CachedMethodDefinition& result) [0x00115] in <69b504cf34c54d688310e60f1ce29d2e>:0
at Burst.Compiler.IL.Hashing.CacheRuntime.ILFinalHashCalculator.TryResolveConstrainedMethod (Burst.Compiler.IL.Hashing.CacheRuntime.Metadata.CachedHandle constrainedType, Burst.Compiler.IL.Hashing.CacheRuntime.Metadata.CachedHandle interfaceMethod, Burst.Compiler.IL.Hashing.ILGenericContext interfaceMethodGenericContext, Burst.Compiler.IL.Hashing.CacheRuntime.Metadata.CachedMethodDefinition& methodDefinition, Burst.Compiler.IL.Hashing.ILGenericContext& methodGenericContext) [0x0008a] in <69b504cf34c54d688310e60f1ce29d2e>:0
— End of inner exception stack trace —
at Burst.Compiler.IL.Hashing.CacheRuntime.ILFinalHashCalculator.TryResolveConstrainedMethod (Burst.Compiler.IL.Hashing.CacheRuntime.Metadata.CachedHandle constrainedType, Burst.Compiler.IL.Hashing.CacheRuntime.Metadata.CachedHandle interfaceMethod, Burst.Compiler.IL.Hashing.ILGenericContext interfaceMethodGenericContext, Burst.Compiler.IL.Hashing.CacheRuntime.Metadata.CachedMethodDefinition& methodDefinition, Burst.Compiler.IL.Hashing.ILGenericContext& methodGenericContext) [0x000ba] in <69b504cf34c54d688310e60f1ce29d2e>:0
at Burst.Compiler.IL.Hashing.CacheRuntime.ILFinalHashCalculator.VisitMemberReference (Burst.Compiler.IL.Hashing.CacheRuntime.Metadata.CachedMemberReference& memberReference, System.Nullable1[T] constrainedType, Burst.Compiler.IL.Hashing.ILGenericContext genericContext, System.Collections.Immutable.ImmutableArray1[Burst.Compiler.IL.Hashing.Types.ILType]& methodGenericParameters) [0x00035] in <69b504cf34c54d688310e60f1ce29d2e>:0
at Burst.Compiler.IL.Hashing.CacheRuntime.ILFinalHashCalculator.HashMethodDefinition (Burst.Compiler.IL.Hashing.CacheRuntime.ToVisit& itemToVisit) [0x00167] in <69b504cf34c54d688310e60f1ce29d2e>:0
— End of inner exception stack trace —
at Burst.Compiler.IL.Hashing.CacheRuntime.ILFinalHashCalculator.HashMethodDefinition (Burst.Compiler.IL.Hashing.CacheRuntime.ToVisit& itemToVisit) [0x001ff] in <69b504cf34c54d688310e60f1ce29d2e>:0
at Burst.Compiler.IL.Hashing.CacheRuntime.ILFinalHashCalculator.VisitItem (Burst.Compiler.IL.Hashing.CacheRuntime.ToVisit& itemToVisit) [0x000a6] in <69b504cf34c54d688310e60f1ce29d2e>:0
— End of inner exception stack trace —
at Burst.Compiler.IL.Hashing.CacheRuntime.ILFinalHashCalculator.VisitItem (Burst.Compiler.IL.Hashing.CacheRuntime.ToVisit& itemToVisit) [0x000de] in <69b504cf34c54d688310e60f1ce29d2e>:0
at Burst.Compiler.IL.Hashing.CacheRuntime.ILFinalHashCalculator.GetHashImpl (Mono.Cecil.MethodReference methodReference) [0x0028e] in <69b504cf34c54d688310e60f1ce29d2e>:0
at Burst.Compiler.IL.Hashing.CacheRuntime.ILFinalHashCalculator.GetPerMethodHashes (Burst.Compiler.IL.MethodReferenceWithLinkName methodReferences, Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore assemblyStore, Burst.Compiler.IL.AssemblyLoader assemblyLoader, Burst.Compiler.IL.NativeCompilerOptions options, Burst.Compiler.IL.Helpers.DebugLogWriter debugLogWriter, Burst.Compiler.IL.Server.ProfileDelegate profileCallback, Burst.Compiler.IL.Hashing.CacheRuntime.OnVisitItemDelegate onVisitItem) [0x00070] in <69b504cf34c54d688310e60f1ce29d2e>:0
Unity.Jobs.IJobExtensions+JobStruct1[[andywiecko.BurstTriangulator.LowLevel.Unsafe.TriangulationJob5[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[Unity.Mathematics.int2, Unity.Mathematics, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null],[System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[andywiecko.BurstTriangulator.LowLevel.Unsafe.TransformInt, andywiecko.BurstTriangulator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null],[andywiecko.BurstTriangulator.LowLevel.Unsafe.IntUtils, andywiecko.BurstTriangulator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], andywiecko.BurstTriangulator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null::Execute(!0&|System.IntPtr, netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51|System.IntPtr, netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51|Unity.Jobs.LowLevel.Unsafe.JobRanges&, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.Int32, netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51)
Unity.Jobs.IJobExtensions+JobStruct1[[andywiecko.BurstTriangulator.LowLevel.Unsafe.TriangulationJob5[[System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[Unity.Mathematics.float2, Unity.Mathematics, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null],[System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[andywiecko.BurstTriangulator.LowLevel.Unsafe.TransformFloat, andywiecko.BurstTriangulator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null],[andywiecko.BurstTriangulator.LowLevel.Unsafe.FloatUtils, andywiecko.BurstTriangulator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], andywiecko.BurstTriangulator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null::Execute(!0&|System.IntPtr, netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51|System.IntPtr, netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51|Unity.Jobs.LowLevel.Unsafe.JobRanges&, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.Int32, netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51)
Unity.Jobs.IJobExtensions+JobStruct1[[andywiecko.BurstTriangulator.LowLevel.Unsafe.TriangulationJob5[[System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[Unity.Mathematics.double2, Unity.Mathematics, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null],[System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[andywiecko.BurstTriangulator.LowLevel.Unsafe.TransformDouble, andywiecko.BurstTriangulator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null],[andywiecko.BurstTriangulator.LowLevel.Unsafe.DoubleUtils, andywiecko.BurstTriangulator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], andywiecko.BurstTriangulator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null::Execute(!0&|System.IntPtr, netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51|System.IntPtr, netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51|Unity.Jobs.LowLevel.Unsafe.JobRanges&, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.Int32, netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51) —> System.Exception: Error while hashing 0x06000083 in andywiecko.BurstTriangulator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null —> System.Exception: Error while visiting referenced token 0x0A0000B4 in andywiecko.BurstTriangulator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null —> System.Exception: Error while resolving interface method 0x0A0000B4 in andywiecko.BurstTriangulator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null on type 0x02000029 in assembly E:\Dev\RC\Unity\Operator\Operator-Unity\Library\ScriptAssemblies\andywiecko.BurstTriangulator.dll —> System.InvalidOperationException: Failed to resolve method with name hash ‘d569f60975f13ee07b01ce8bdcba0231’ in type definition ‘0x02000029 in assembly E:\Dev\RC\Unity\Operator\Operator-Unity\Library\ScriptAssemblies\andywiecko.BurstTriangulator.dll’
at Burst.Compiler.IL.Hashing.CacheRuntime.Metadata.CachedTypeDefinition.TryResolveInterfaceMethod (Burst.Compiler.IL.Hashing.CacheRuntime.Metadata.CachedHandle interfaceMethod, Burst.Compiler.IL.Hashing.ILGenericContext interfaceMethodGenericContext, Burst.Compiler.IL.Hashing.ILGenericContext& methodGenericContext, Burst.Compiler.IL.Hashing.CacheRuntime.Metadata.CachedMethodDefinition& result) [0x00115] in <69b504cf34c54d688310e60f1ce29d2e>:0
at Burst.Compiler.IL.Hashing.CacheRuntime.ILFinalHashCalculator.TryResolveConstrainedMethod (Burst.Compiler.IL.Hashing.CacheRuntime.Metadata.CachedHandle constrainedType, Burst.Compiler.IL.Hashing.CacheRuntime.Metadata.CachedHandle interfaceMethod, Burst.Compiler.IL.Hashing.ILGenericContext interfaceMethodGenericContext, Burst.Compiler.IL.Hashing.CacheRuntime.Metadata.CachedMethodDefinition& methodDefinition, Burst.Compiler.IL.Hashing.ILGenericContext& methodGenericContext) [0x0008a] in <69b504cf34c54d688310e60f1ce29d2e>:0
— End of inner exception stack trace —
at Burst.Compiler.IL.Hashing.CacheRuntime.ILFinalHashCalculator.TryResolveConstrainedMethod (Burst.Compiler.IL.Hashing.CacheRuntime.Metadata.CachedHandle constrainedType, Burst.Compiler.IL.Hashing.CacheRuntime.Metadata.CachedHandle interfaceMethod, Burst.Compiler.IL.Hashing.ILGenericContext interfaceMethodGenericContext, Burst.Compiler.IL.Hashing.CacheRuntime.Metadata.CachedMethodDefinition& methodDefinition, Burst.Compiler.IL.Hashing.ILGenericContext& methodGenericContext) [0x000ba] in <69b504cf34c54d688310e60f1ce29d2e>:0
at Burst.Compiler.IL.Hashing.CacheRuntime.ILFinalHashCalculator.VisitMemberReference (Burst.Compiler.IL.Hashing.CacheRuntime.Metadata.CachedMemberReference& memberReference, System.Nullable1[T] constrainedType, Burst.Compiler.IL.Hashing.ILGenericContext genericContext, System.Collections.Immutable.ImmutableArray1[Burst.Compiler.IL.Hashing.Types.ILType]& methodGenericParameters) [0x00035] in <69b504cf34c54d688310e60f1ce29d2e>:0
at Burst.Compiler.IL.Hashing.CacheRuntime.ILFinalHashCalculator.HashMethodDefinition (Burst.Compiler.IL.Hashing.CacheRuntime.ToVisit& itemToVisit) [0x00167] in <69b504cf34c54d688310e60f1ce29d2e>:0
— End of inner exception stack trace —
at Burst.Compiler.IL.Hashing.CacheRuntime.ILFinalHashCalculator.HashMethodDefinition (Burst.Compiler.IL.Hashing.CacheRuntime.ToVisit& itemToVisit) [0x001ff] in <69b504cf34c54d688310e60f1ce29d2e>:0
at Burst.Compiler.IL.Hashing.CacheRuntime.ILFinalHashCalculator.VisitItem (Burst.Compiler.IL.Hashing.CacheRuntime.ToVisit& itemToVisit) [0x000a6] in <69b504cf34c54d688310e60f1ce29d2e>:0
— End of inner exception stack trace —
at Burst.Compiler.IL.Hashing.CacheRuntime.ILFinalHashCalculator.VisitItem (Burst.Compiler.IL.Hashing.CacheRuntime.ToVisit& itemToVisit) [0x000de] in <69b504cf34c54d688310e60f1ce29d2e>:0
at Burst.Compiler.IL.Hashing.CacheRuntime.ILFinalHashCalculator.GetHashImpl (Mono.Cecil.MethodReference methodReference) [0x0028e] in <69b504cf34c54d688310e60f1ce29d2e>:0
at Burst.Compiler.IL.Hashing.CacheRuntime.ILFinalHashCalculator.GetPerMethodHashes (Burst.Compiler.IL.MethodReferenceWithLinkName methodReferences, Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore assemblyStore, Burst.Compiler.IL.AssemblyLoader assemblyLoader, Burst.Compiler.IL.NativeCompilerOptions options, Burst.Compiler.IL.Helpers.DebugLogWriter debugLogWriter, Burst.Compiler.IL.Server.ProfileDelegate profileCallback, Burst.Compiler.IL.Hashing.CacheRuntime.OnVisitItemDelegate onVisitItem) [0x00070] in <69b504cf34c54d688310e60f1ce29d2e>:0
— End of inner exception stack trace —
at Burst.Compiler.IL.Hashing.CacheRuntime.ILFinalHashCalculator.GetPerMethodHashes (Burst.Compiler.IL.MethodReferenceWithLinkName methodReferences, Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore assemblyStore, Burst.Compiler.IL.AssemblyLoader assemblyLoader, Burst.Compiler.IL.NativeCompilerOptions options, Burst.Compiler.IL.Helpers.DebugLogWriter debugLogWriter, Burst.Compiler.IL.Server.ProfileDelegate profileCallback, Burst.Compiler.IL.Hashing.CacheRuntime.OnVisitItemDelegate onVisitItem) [0x00118] in <69b504cf34c54d688310e60f1ce29d2e>:0
at Burst.Compiler.IL.NativeCompiler.ComputePerMethodHash (System.ValueTuple2[System.String,Burst.Compiler.IL.Helpers.Hash128][]& perMethodHashes, System.Collections.Generic.HashSet1[Burst.Compiler.IL.AssemblyNameReferenceAndMetadata]& referencedAssemblies, Burst.Compiler.IL.Helpers.DebugLogWriter debugLogWriter, Burst.Compiler.IL.Server.ProfileDelegate profileCallback) [0x00007] in <69b504cf34c54d688310e60f1ce29d2e>:0
at Burst.Compiler.IL.Server.LibraryCompiler.HashAndCompileMethodGroup (Burst.Compiler.IL.Server.CompilationJob request, System.Int32 methodGroupIndex, Burst.Compiler.IL.Server.SharedLibraryCompilationState sharedState, Burst.Compiler.IL.Aot.AotCompilerOptions defaultOptions, Burst.Compiler.IL.NativeCompiler& nativeCompiler, Burst.Compiler.IL.Aot.AotModuleGroup& aotModuleGroup) [0x002e5] in <69b504cf34c54d688310e60f1ce29d2e>:0

While compiling job:
Unity.Jobs.IJobExtensions+JobStruct1[[andywiecko.BurstTriangulator.LowLevel.Unsafe.TriangulationJob5[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[Unity.Mathematics.int2, Unity.Mathematics, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null],[System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[andywiecko.BurstTriangulator.LowLevel.Unsafe.TransformInt, andywiecko.BurstTriangulator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null],[andywiecko.BurstTriangulator.LowLevel.Unsafe.IntUtils, andywiecko.BurstTriangulator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], andywiecko.BurstTriangulator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null::Execute(andywiecko.BurstTriangulator.LowLevel.Unsafe.TriangulationJob5[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[Unity.Mathematics.int2, Unity.Mathematics, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null],[System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[andywiecko.BurstTriangulator.LowLevel.Unsafe.TransformInt, andywiecko.BurstTriangulator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null],[andywiecko.BurstTriangulator.LowLevel.Unsafe.IntUtils, andywiecko.BurstTriangulator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]&, andywiecko.BurstTriangulator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|Unity.Jobs.LowLevel.Unsafe.JobRanges&, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) Unity.Jobs.IJobExtensions+JobStruct1[[andywi

Sounds like a unity or burst bug. I’d try upgrading to a newer version of Unity if you can. If not, try to delete your Library folder to force unity to reimport everything.

This is just an optional dependency.

Unfortunately I can’t change Unity versions. I do have some leeway with package versions.
Fortunately I seem to have fixed the compile errors.

I’ve just tested with the latest pathfinding version (v5.2.5) & deleted Library folder.
It still gave compile errors.

The errors are fixed with the below steps
(& I’m no longer getting the “Burst internal compile error” that started this thread)

… which reveals the next error…

  • Packages\com.arongranberg.astar\Core\Geometry\Triangulation\Triangulator.cs(3424,37): error CS0535: 'FpUtils' does not implement interface member 'IUtils<fp, fp2, fp>.SupportsRefinement()'
    • Looks like a typo, like 3469 should be SupportsRefinement (with a s) instead of SupportRefinement

… which reveals the next error…

  • Packages\com.arongranberg.astar\Core\Geometry\Triangulation\Triangulator.cs(858,291): error CS1501: No overload for method 'RefineMesh' takes 6 arguments
    • Not sure is this breaks anything, but removing the concentricShells parameter matches one of the existing RefineMesh() methods.

… and now it compiles!
… and I don’t see this original BurstTriangulator compile error I was getting in v5.2.4

(Also want to thank you, A* is one of my top always-include-this-in-almost-every-project package. It’s by far one of the best value-for-money assets by orders of magnitude.
It was already great when I started using it years ago, & you’ve continually been piling on improvements. MUCH appreciated!)

1 Like

Thanks. Having the Unity.Mathematics.FixedPoint package installed did indeed lead to some errors.
I’ll include a fix in the next update.

Thank you for the kind words :slight_smile: I’m glad you enjoy using the package.
If you want to support the future development even more, a rating and/or review in the asset store is always really helpful :blush: .

Done! It’s the least I could do!

In the past Unity wouldn’t let me put a review in the past, because it was confused about whether I owned it because of assigned asset seats.
… trying again now, it acknowledges I bought the asset, but thinks I bought it today! :rofl: :sweat_smile:

image
Crazy!
… but it let me post the review, so all’s good!

2 Likes