[1.1.2654] "The extreme animals" quest fails to spawn manhunting pack

Started by spawarotti, July 02, 2020, 09:45:40 PM

Previous topic - Next topic

spawarotti

Update: 7/3/2020 3:17 PM PST: I found the underlying root cause in unmodded new colony, please see here for the repro:
https://ludeon.com/forums/index.php?topic=52557.0

The colony exhibiting the bug I describe below had the same errors as explained in the repro above, right from the save I made moments after starting the colony.
Here is the save: https://1drv.ms/u/s!Aj1D93DYDBC3iZ1czlmqhXDK8cPXtA?e=zgRILJ

Original description:

As in subject.

How to reproduce:
1. Load the save game (it has no mods) from my personal OneDrive: https://1drv.ms/u/s!Aj1D93DYDBC3iZZJTuEVTg6MT_vFoA?e=gAun9z
2. Accept the "The extreme animals" quest. Doesn't matter which reward you chose.
3. Wait 9 hours.
4. Observe that no manhunting iguana pack appears. The empire cataphract sticks around, and quest remains active.

Expected behavior:
Instead, I expected in the step 4 for the manhunting iguanas to arrive.

Logs:
Please see the attached log capturing the error that was output when the manhunting pack was supposed to appear.

Additional observations:
- I noticed that if in the debug mode of the quest I select "End QuestPart_Delay (index=19)" then the manhunting pack does spawn correctly. If I then kill all the iguanas with debug mode kill tool the quest completes successfully.
- In the debug mode of the quest, if I select "send defined signal" and choose "Quest13.OuterNodeCompleted4" and I do it BEFORE the manhuners should arrive, then their arrival is triggered correctly. However, if I do the same but AFTER the manhunters failed to arrive, then pressing this just triggers the same exception.
- The savegame I shared has no mods, but it came from a game with 160 mods which I unloaded before I shared the save. The quest proposal was generated when the mods were active, and thus they might have corrupted it. Please see the attached active_mods.txt for the list of the mods.
- Even if load the original save with all 160 mods, I can use the debug tool to force the iguanas to spawn the same way I described above.

Possibly related problems:
https://ludeon.com/forums/index.php?topic=52491.0
https://ludeon.com/forums/index.php?topic=52453.msg480102#msg480102
https://ludeon.com/forums/index.php?topic=47024.msg446222#msg446222

If you conclude the reason for the problem is corruption of the quest definition by one of the mods, I would greatly appreciate a pointer which part got corrupted and what is wrong with it, so I can investigate which mod might have affected it.

Update 7/2/2020 8:21 PM PST:

I managed to capture a situation in which the game is about to spawn a new quest proposal in next 3 hours. It always results in the same error as seen in the attached player.log, i.e.:

Exception test running QuestNode_ManhunterPack: System.InvalidOperationException: Sequence contains no elements
  at System.Linq.Enumerable.Min[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] selector) [0x00030] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at RimWorld.ManhunterPackIncidentUtility.TryFindManhunterAnimalKind (System.Single points, System.Int32 tile, Verse.PawnKindDef& animalKind) [0x00042] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
  at RimWorld.QuestGen.QuestNode_ManhunterPack.TestRunInt (RimWorld.QuestGen.Slate slate) [0x00046] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
  at RimWorld.QuestGen.QuestNode.TestRun (RimWorld.QuestGen.Slate slate) [0x0001b] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0


This happens even if I unload the mods.

The save with mods: https://1drv.ms/u/s!Aj1D93DYDBC3iZZQFX-SKmffI8oZkw?e=CRhRgL
The save without mods: https://1drv.ms/u/s!Aj1D93DYDBC3iZZPHjQgUNc06MLdhw?e=UMQnvL

Load the save and wait 3 game hours to see the exception being output to the log.

Update 7/2/2020 9:02 PM PST:

Trying to start an incident through the debug menu shows the same error. I cannot even choose specific incident type: the debug window closes once I click "do incident". Even if I unload all the mods. However, it worked before. Recall I mentioned I could work around the problem by triggering the quest signals from the debug menu in the first save I attached. Starting of the incident from the debug menu works after you load the save, but it stops working approximately 2 hours before the manhunter iguana attack, resulting in the error being logged instead.

ison