#null reference exception warning crashes game
4 messages · Page 1 of 1 (latest)
here is the code I keep getting:
NullReferenceException: Object reference not set to an instance of an object
at Unity.Entities.ChunkDataUtility.GetIndexInTypeArray (Unity.Entities.Archetype* archetype, Unity.Entities.TypeIndex typeIndex, System.Int16& typeLookupCache) [0x00000] in <c9e2601f920f40cea0d8439e612eb1ba>:0
at Unity.Entities.LookupCache.Update (Unity.Entities.Archetype* archetype, Unity.Entities.TypeIndex typeIndex) [0x00000] in <c9e2601f920f40cea0d8439e612eb1ba>:0
at Unity.Entities.ChunkDataUtility.GetComponentDataWithTypeRO (Unity.Entities.ChunkIndex chunk, Unity.Entities.Archetype* archetype, System.Int32 baseEntityIndex, Unity.Entities.TypeIndex typeIndex, Unity.Entities.LookupCache& lookupCache) [0x00014] in <c9e2601f920f40cea0d8439e612eb1ba>:0
at Unity.Entities.EntityComponentStore.GetComponentDataWithTypeRO (Unity.Entities.Entity entity, Unity.Entities.TypeIndex typeIndex, Unity.Entities.LookupCache& cache) [0x0001a] in <c9e2601f920f40cea0d8439e612eb1ba>:0
at Unity.Entities.ComponentLookup1[T].get_Item (Unity.Entities.Entity entity) [0x0001e] in <c9e2601f920f40cea0d8439e612eb1ba>:0 at Game.Simulation.CityServiceBudgetSystem+UpdateDataJob.Execute () [0x00045] in <22877fcc5ec6454c98cff9bf91dc0556>:0 at Unity.Jobs.IJobExtensions+JobStruct1[T].Execute (T& data, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) [0x00001] in <c39a522eee05469b8171a6cfeb646c59>:0
at (wrapper delegate-invoke) Unity.Jobs.IJobExtensions+JobStruct`1+ExecuteJobFunction[Game.Simulation.CityServiceBudgetSystem+UpdateDataJob].invoke_void_T&_intptr_intptr_JobRanges&_int(Game.Simulation.CityServiceBudgetSystem/UpdateDataJob&,intptr,intptr,Unity.Jobs.LowLevel.Unsafe.JobRanges&,int)
Colossal.Logging.CustomLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
NullReferenceException
Object reference not set to an instance of an object
NullReferenceException: Object reference not set to an instance of an object
at Unity.Entities.EntityComponentStore+EntityStore.GetEntityInChunk (Unity.Entities.Entity entity) [0x00038] in <c9e2601f920f40cea0d8439e612eb1ba>:0
at Unity.Entities.EntityComponentStore.GetEntityInChunk (Unity.Entities.Entity entity) [0x0000a] in <c9e2601f920f40cea0d8439e612eb1ba>:0
at Unity.Entities.EntityComponentStore.GetComponentDataWithTypeRO (Unity.Entities.Entity entity, Unity.Entities.TypeIndex typeIndex, Unity.Entities.LookupCache& cache) [0x00000] in <c9e2601f920f40cea0d8439e612eb1ba>:0
at Unity.Entities.ComponentLookup1[T].get_Item (Unity.Entities.Entity entity) [0x0001e] in <c9e2601f920f40cea0d8439e612eb1ba>:0 at Game.Simulation.CityServiceBudgetSystem+UpdateDataJob.Execute () [0x00045] in <22877fcc5ec6454c98cff9bf91dc0556>:0 at Unity.Jobs.IJobExtensions+JobStruct1[T].Execute (T& data, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) [0x00001] in <c39a522eee05469b8171a6cfeb646c59>:0
at (wrapper delegate-invoke) Unity.Jobs.IJobExtensions+JobStruct`1+ExecuteJobFunction[Game.Simulation.CityServiceBudgetSystem+UpdateDataJob].invoke_void_T&_intptr_intptr_JobRanges&_int(Game.Simulation.CityServiceBudgetSystem/UpdateDataJob&,intptr,intptr,Unity.Jobs.LowLevel.Unsafe.JobRanges&,int)
Colossal.Logging.CustomLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
and the other