DeserializeWorld Il2CPP crash

So stumbled across something this evening

This code

var transaction = deserializeWorld.EntityManager.BeginExclusiveEntityTransaction();
SerializeUtility.DeserializeWorld(transaction, reader, savedState.ReferencedObjects);
deserializeWorld.EntityManager.EndExclusiveEntityTransaction();

Is crashing on windows il2cpp but not on mono builds in Entities 0.13, 2020.1, burst 1.3.3 and burst 1.4p,

I traced it all the way down to this line in EntityManagerChangeArchetype.interop.gen.cs

private static void _forward_mono_SetChunkComponent(EntityComponentStore* entityComponentStore, ArchetypeChunk* chunks, int chunkCount, void* componentData, int componentTypeIndex)
{
_bfp_SetChunkComponent(entityComponentStore, chunks, chunkCount, componentData, componentTypeIndex);
}

I should add, this entity world is pretty much empty.

There is only 1 component in the project, and 3 entities total (only 1 I created)

public struct SimulationTime : IComponentData
{
public double ElapsedTime;
public float TimeScale;
}

So it shouldn’t be too hard for me to get a repo case up, but it’s late so I’ll look into it tomorrow if I find some time

1 Like