Skip to content

Rare NRE with trade caravans #913

@kbsmilk

Description

@kbsmilk

Describe the bug
Every tick, a null reference exception is logged when a certain trader is on map.
After deleting the problematic trader, the errors stop.
In the attached savefile, the problem trader is the latest one - use the letter to jump to its location. All the other traders were spawned problem-free, owing to the rarity of this bug.

The full player.log is in the zip file, too.

To Reproduce
You can load the savefile and unpause to reliably see the errors. Or, the steps I took:

  1. Start a new game with Core, the 4 official DLC, and Pawnmorpher + dependencies.
  2. To test it easier, remove friendly factions except 'free morph enclave'.
  3. Get to the colony map, open debug actions, and start generating the trader caravan incident repeatedly. This will take a few tries.

Error Log

Exception while ticking lord with job RimWorld.LordJob_TradeWithColony: 
System.NullReferenceException: Object reference not set to an instance of an object
[Ref 1EEB184A]
 at RimWorld.LordJob_TradeWithColony+<>c__DisplayClass7_0.<CreateGraph>b__0 (Verse.AI.Group.TriggerSignal s) [0x00009] in <69945a8ed6c540cf90b578de735e0605>:0 
 at Verse.AI.Group.Trigger_Custom.ActivateOn (Verse.AI.Group.Lord lord, Verse.AI.Group.TriggerSignal signal) [0x00000] in <69945a8ed6c540cf90b578de735e0605>:0 
 at Verse.AI.Group.Transition.CheckSignal (Verse.AI.Group.Lord lord, Verse.AI.Group.TriggerSignal signal) [0x00013] in <69945a8ed6c540cf90b578de735e0605>:0 
 at Verse.AI.Group.Lord.CheckTransitionOnSignal (Verse.AI.Group.TriggerSignal signal) [0x00050] in <69945a8ed6c540cf90b578de735e0605>:0 
 at Verse.AI.Group.Lord.LordTick () [0x000bb] in <69945a8ed6c540cf90b578de735e0605>:0 
 at Verse.AI.Group.LordManager.LordManagerTick () [0x00011] in <69945a8ed6c540cf90b578de735e0605>:0  
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Expected behavior
No errors.

pm-lordjob-errors.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions