Skip to content

error CompHive.AddInsect on null map #4

@tk421storm

Description

@tk421storm

Just saw this in my 1.5 nomad game (when there is no home base, and the insectoid queen is in a caravan). I think the error is in AddInsect, or earlier in the dospawn func (map needs null check)

Tried to create a lord with null map.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Warning (string)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.Group.LordMaker.MakeNewLord_Patch1 (RimWorld.Faction,Verse.AI.Group.LordJob,Verse.Map,System.Collections.Generic.IEnumerable`1<Verse.Pawn>)
VFEInsectoids.CompHive:AddInsect (Verse.Pawn)
VFEInsectoids.CompHive:TrySpawnPawn (Verse.IntVec3,single)
VFEInsectoids.CompHive:DoSpawn (bool)
VFEInsectoids.CompHive:CompTick ()
Verse.ThingWithComps:Tick ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Pawn.Tick_Patch2 (Verse.Pawn)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.Planet.WorldPawns.WorldPawnsTick_Patch2 (RimWorld.Planet.WorldPawns)
RimWorld.Planet.World:WorldTick ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.TickManager.DoSingleTick_Patch6 (Verse.TickManager)
Verse.TickManager:TickManagerUpdate ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Game.UpdatePlay_Patch2 (Verse.Game)
Verse.Root_Play:Update ()

Exception ticking world pawn VFEI2_Empress127583. Suppressing further errors. System.NullReferenceException: Object reference not set to an instance of an object
[Ref DA99F4FE]
at VFEEmpire.HarmonyPatches.Patch_Lords.MakeNewLord_Postfix (Verse.Map map, Verse.AI.Group.Lord __result) [0x0000a] in :0
at Verse.AI.Group.LordMaker.MakeNewLord (RimWorld.Faction faction, Verse.AI.Group.LordJob lordJob, Verse.Map map, System.Collections.Generic.IEnumerable1[T] startingPawns) [0x000c0] in <630e2863bc9a4a3493f2eff01e3a9556>:0 - POSTFIX VFEEmpire.Mod: Void VFEEmpire.HarmonyPatches.Patch_Lords:MakeNewLord_Postfix(Map map, Lord __result) at VFEInsectoids.CompHive.AddInsect (Verse.Pawn insect) [0x000ba] in <27f075d3dbb24f0aaa2424728fe1a0e7>:0 at VFEInsectoids.CompHive.TrySpawnPawn (Verse.IntVec3 position, System.Single age) [0x000a7] in <27f075d3dbb24f0aaa2424728fe1a0e7>:0 at VFEInsectoids.CompHive.DoSpawn (System.Boolean sendMessage) [0x00027] in <27f075d3dbb24f0aaa2424728fe1a0e7>:0 at VFEInsectoids.CompHive.CompTick () [0x00038] in <27f075d3dbb24f0aaa2424728fe1a0e7>:0 at Verse.ThingWithComps.Tick () [0x00024] in <630e2863bc9a4a3493f2eff01e3a9556>:0 at Verse.Pawn.Tick () [0x0064a] in <630e2863bc9a4a3493f2eff01e3a9556>:0 - TRANSPILER Krkr.RocketMan.Soyuz: IEnumerable1 Soyuz.Patches.Pawn_Tick_Patch:Transpiler(IEnumerable`1 instructions, ILGenerator generator)
- POSTFIX Mlie.MarkThatPawn: Void MarkThatPawn.Harmony.Pawn_Tick:Postfix(Pawn __instance)
- FINALIZER Krkr.RocketMan.Soyuz: Void Soyuz.Patches.Pawn_Tick_Patch:Finalizer(Pawn __instance, Exception __exception)
at RimWorld.Planet.WorldPawns.WorldPawnsTick () [0x0003e] in <630e2863bc9a4a3493f2eff01e3a9556>:0
- PREFIX Krkr.RocketMan.Soyuz: Void Soyuz.Patches.WorldPawns_Patch+WorldPawns_WorldPawnsTick_Patch:Prefix()
- POSTFIX Krkr.RocketMan.Soyuz: Void Soyuz.Patches.WorldPawns_Patch+WorldPawns_WorldPawnsTick_Patch:Postfix()
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch4 (string)
Verse.Log:ErrorOnce (string,int)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.Planet.WorldPawns.WorldPawnsTick_Patch2 (RimWorld.Planet.WorldPawns)
RimWorld.Planet.World:WorldTick ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.TickManager.DoSingleTick_Patch6 (Verse.TickManager)
Verse.TickManager:TickManagerUpdate ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Game.UpdatePlay_Patch2 (Verse.Game)
Verse.Root_Play:Update ()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions