skhamis / Unity-ECS-RTS

Trying to recreate a simple RTS game using Unity and pure ECS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Burst.Compiler.IL.CompilerException: Error while processing function

castana1962 opened this issue · comments

Hi
I am trying your ECS repo in Unity 2018.3f1 and when I played it in the Editor I got the following error
Unexpected exception Burst.Compiler.IL.CompilerException: Unexpected exception ---> Burst.Compiler.IL.CompilerException: Error while processing function System.Void AABBCollisionSystem/AABBCollisionJob::Execute(System.Int32) ---> Burst.Compiler.IL.CompilerException: Unexpected error while processing IL_002f: ldstr "Collision Detected" at D:\Unity-ECS-RTS-master\Unity-ECS-RTS-master\Assets\Systems\AABBCollisionSystem.cs(20,21) ---> System.NotSupportedException: Using a managed string is not supported by burst
at Burst.Compiler.IL.ILVisitor.NotSupported (Burst.Compiler.IL.Syntax.ILInstruction inst) [0x00155] in :0
at Burst.Compiler.IL.ILVisitor.ProcessBlocks () [0x0002e] in :0
at Burst.Compiler.IL.ILVisitor.ProcessFunctionBody (Burst.Compiler.IL.Syntax.ILFunction function) [0x00103] in :0
at Burst.Compiler.IL.ILVisitor.VisitPendingFunctions () [0x0000e] in :0
--- End of inner exception stack trace ---
at Burst.Compiler.IL.ILVisitor.VisitPendingFunctions () [0x00033] in :0
at Burst.Compiler.IL.ILVisitor.VisitEntryPointFunction (Burst.Compiler.IL.MethodReferenceWithHash methodReference) [0x00066] in :0
at Burst.Compiler.IL.ILVisitor.VisitEntryPointFunction (Burst.Backend.Module module, Burst.Compiler.IL.MethodReferenceWithHash methodReference) [0x0001a] in :0
at Burst.Compiler.IL.ILVerifier.VisitEntryPointFunction (Burst.Backend.Module module, Burst.Compiler.IL.MethodReferenceWithHash methodReference) [0x00000] in :0
--- End of inner exception stack trace ---
at Burst.Compiler.IL.ILVerifier.VisitEntryPointFunction (Burst.Backend.Module module, Burst.Compiler.IL.MethodReferenceWithHash methodReference) [0x0001f] in :0
at Burst.Compiler.IL.ILHash.CompileHash (Burst.Backend.Module module, Burst.Compiler.IL.MethodReferenceWithHash methodReference) [0x00000] in :0
at Burst.Compiler.IL.NativeCompiler.ComputeHash () [0x000ea] in :0
at Burst.Compiler.IL.Jit.JitCompiler.CompileMethod (Mono.Cecil.MethodReference methodReference, Burst.Compiler.IL.Jit.JitOptions jitOptions) [0x000aa] in :0
at Burst.Compiler.IL.Jit.JitCompilerService.Compile (Burst.Compiler.IL.Jit.JitCompilerService+CompileJob job) [0x002bc] in :0
While compiling job: System.Void
Unity.Jobs.IJobParallelForExtensions/ParallelForJobStruct`1<AABBCollisionSystem/AABBCollisionJob>::Execute(T&,System.IntPtr,System.IntPtr,Unity.Jobs.LowLevel.Unsafe.JobRanges&,System.Int32)

For it, Could you help me to fix it?
Thanks for your time
Alejandro
PS. Thanks to share your efforts. I am very excited to learn ECS !!!

Hey castana1962! I appreciate the comments, this is due to calling Debug.Log.. in a bursted job. If you remove the debug statement (once ensuring the collision works) it should disappear! I have updated the project to 0.0.27 and defaulted to commented out that statement to prevent confusion. Stay on the lookout for a new video in the next coming days!