Getting this error when trying to burst compile a generic job: Code (csharp): Unexpected exception Burst.Compiler.IL.CompilerException: Unexpected exception ---> Burst.Compiler.IL.CompilerException: Error while processing function `System.Void NetCode.DeltaCompressorSystem/Job`1::Execute()` ---> Burst.Compiler.IL.CompilerException: Unexpected error while processing `IL_00dd: call System.Void NetCode.DeltaCompressorSystem::CheckField(NetCode.NetworkedEntityState*,System.Byte*,System.Byte*,NetCode.ReplicationFieldInfo) args(IL_00ad, IL_00c4, IL_00c5, IL_00d8)` at C:\Users\Fredrik\Documents\GitHub\ecsnetcode\ecsnetcode\Assets\NetCode\SerializerSystem.Serializer1.cs(96,19) ---> Burst.Compiler.IL.Syntax.BuilderException: Internal compiler error while processing function `System.Void NetCode.DeltaCompressorSystem::CheckField(NetCode.NetworkedEntityState*,System.Byte*,System.Byte*,NetCode.ReplicationFieldInfo)` ---> System.InvalidOperationException: Stack empty. at System.Collections.Generic.Stack`1[T].ThrowForEmptyStack () [0x00000] in <3845a180c26b4889bc2d47593a665814>:0 at System.Collections.Generic.Stack`1[T].Peek () [0x00008] in <3845a180c26b4889bc2d47593a665814>:0 at Burst.Compiler.IL.Syntax.ILBuilder.Peek () [0x00000] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.Syntax.ILBuilder.ProcessInstruction (Mono.Cecil.Cil.Instruction inst) [0x00402] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.Syntax.ILBuilder.ProcessInstructions () [0x00092] in <37bebafd236f4ccd943dc039a926a017>:0 --- End of inner exception stack trace --- at Burst.Compiler.IL.Syntax.ILBuilder.ThrowInternalError (System.Exception ex) [0x0002e] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.Syntax.ILBuilder.ProcessInstructions () [0x001fc] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.Syntax.ILBuilder.ProcessFunctionBody () [0x000b7] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.Syntax.ILBuilder.Visit (Burst.Compiler.IL.Syntax.MethodBinding binding) [0x00099] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.ILVisitor.PrepareFunctionInternal (Burst.Compiler.IL.Syntax.MethodBinding methodBinding) [0x00065] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.ILVisitor.PrepareFunction (Burst.Compiler.IL.Syntax.MethodBinding methodBinding) [0x00000] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.ILVerifier.PrepareFunction (Burst.Compiler.IL.Syntax.MethodBinding methodBinding) [0x00013] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.ILVisitor.GetFunction (Burst.Compiler.IL.Syntax.MethodBinding binding) [0x00016] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.ILVisitor.Call (Burst.Compiler.IL.Syntax.ILInstruction inst) [0x0007b] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.ILVisitor.CompileInternal (Burst.Compiler.IL.Syntax.ILInstruction inst) [0x003b0] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.ILVerifier.CompileInternal (Burst.Compiler.IL.Syntax.ILInstruction inst) [0x00018] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.ILVisitor.Compile (Burst.Compiler.IL.Syntax.ILInstruction inst) [0x0001e] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.ILVisitor.ProcessBlock (Burst.Compiler.IL.Syntax.ILBlock block) [0x0009a] in <37bebafd236f4ccd943dc039a926a017>:0 --- End of inner exception stack trace --- at Burst.Compiler.IL.ILVisitor.ProcessBlock (Burst.Compiler.IL.Syntax.ILBlock block) [0x000e9] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.ILVisitor.ProcessBlocks () [0x0002e] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.ILVisitor.ProcessFunctionBody (Burst.Compiler.IL.Syntax.ILFunction function) [0x00103] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.ILVisitor.VisitPendingFunctions () [0x0000e] in <37bebafd236f4ccd943dc039a926a017>:0 --- End of inner exception stack trace --- at Burst.Compiler.IL.ILVisitor.VisitPendingFunctions () [0x00033] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.ILVisitor.VisitEntryPointFunction (Burst.Compiler.IL.MethodReferenceWithHash methodReference) [0x00066] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.ILVisitor.VisitEntryPointFunction (Burst.Backend.Module module, Burst.Compiler.IL.MethodReferenceWithHash methodReference) [0x0001a] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.ILVerifier.VisitEntryPointFunction (Burst.Backend.Module module, Burst.Compiler.IL.MethodReferenceWithHash methodReference) [0x00000] in <37bebafd236f4ccd943dc039a926a017>:0 --- End of inner exception stack trace --- at Burst.Compiler.IL.ILVerifier.VisitEntryPointFunction (Burst.Backend.Module module, Burst.Compiler.IL.MethodReferenceWithHash methodReference) [0x0001f] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.ILHash.CompileHash (Burst.Backend.Module module, Burst.Compiler.IL.MethodReferenceWithHash methodReference) [0x00000] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.NativeCompiler.ComputeHash () [0x000ea] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.Jit.JitCompiler.CompileMethod (Mono.Cecil.MethodReference methodReference, Burst.Compiler.IL.Jit.JitOptions jitOptions) [0x000aa] in <37bebafd236f4ccd943dc039a926a017>:0 at Burst.Compiler.IL.Jit.JitCompilerService.Compile (Burst.Compiler.IL.Jit.JitCompilerService+CompileJob job) [0x002b2] in <37bebafd236f4ccd943dc039a926a017>:0 While compiling job: System.Void Unity.Jobs.IJobExtensions/JobStruct`1<NetCode.DeltaCompressorSystem/Job`1<Unity.Transforms.Position>>::Execute(T&,System.IntPtr,System.IntPtr,Unity.Jobs.LowLevel.Unsafe.JobRanges&,System.Int32) No clue where to go from here. Edit: It seems to be this part of the CheckField function it crashes on: Code (csharp): case ReplicationFieldType.Mathematics_Float3: { var shd = (float3*)(s); var val = *(float3*)(f); var valShd = *shd; if (c = (val.x != valShd.x || val.y != valShd.y || val.z != valShd.z)) { *shd = val; } } break; Edit2: For reference this works fine with regular int/float (not float3 or quaternion): Code (csharp): case ReplicationFieldType.Int32: { var shd = (Int32*)(s); var val = *(Int32*)(f); if (c = (val != *shd)) { *shd = val; } } break; case ReplicationFieldType.Float: { var shd = (Single*)(s); var val = *(Single*)(f); if (c = (val != *shd)) { *shd = val; } } break; Edit3: Just for completeness sake the code runs fine under non-burst of course, and does exactly what its supposed to.