VictorPhilipp / Cities-Skylines-Traffic-Manager-President-Edition

Cities: Skylines Traffic Manager: Traffic President Edition
http://steamcommunity.com/sharedfiles/filedetails/?id=583429740
MIT License
147 stars 51 forks source link

Citizen not found errors when using walking tours #223

Closed dymanoid closed 5 years ago

dymanoid commented 6 years ago

How to reproduce:

In the log, there are following errors:

Citizen not found!
   at System.Environment.get_StackTrace()
   at Building.RemoveTargetCitizen(UInt16 instanceID, CitizenInstance ByRef data)
   at TouristAI.SetTarget(UInt16 instanceID, CitizenInstance ByRef data, UInt16 targetIndex, Boolean targetIsNode)
   at CitizenAI.SetTarget(UInt16 instanceID, CitizenInstance ByRef data, UInt16 targetBuilding)
   at TrafficManager.Custom.AI.CustomHumanAI.CustomArriveAtDestination(UInt16 instanceID, CitizenInstance ByRef citizenData, Boolean success)
   at TrafficManager.Custom.AI.CustomHumanAI.CustomSimulationStep(UInt16 instanceID, CitizenInstance ByRef instanceData, Vector3 physicsLodRefPos)
   at CitizenManager.SimulationStepImpl(Int32 subStep)
   at SimulationManagerBase`2.SimulationStep(Int32 subStep)
   at CitizenManager.ISimulationManager.SimulationStep(Int32 subStep)
   at SimulationManager.SimulationStep()
   at SimulationManager.SimulationThread()  [Core]

and the same for ResidentAI:

Citizen not found!
   at System.Environment.get_StackTrace()
   at Building.RemoveTargetCitizen(UInt16 instanceID, CitizenInstance ByRef data)
   at ResidentAI.SetTarget(UInt16 instanceID, CitizenInstance ByRef data, UInt16 targetIndex, Boolean targetIsNode)
   at CitizenAI.SetTarget(UInt16 instanceID, CitizenInstance ByRef data, UInt16 targetBuilding)
   at TrafficManager.Custom.AI.CustomHumanAI.CustomArriveAtDestination(UInt16 instanceID, CitizenInstance ByRef citizenData, Boolean success)
   at TrafficManager.Custom.AI.CustomHumanAI.CustomSimulationStep(UInt16 instanceID, CitizenInstance ByRef instanceData, Vector3 physicsLodRefPos)
   at CitizenManager.SimulationStepImpl(Int32 subStep)
   at SimulationManagerBase`2.SimulationStep(Int32 subStep)
   at CitizenManager.ISimulationManager.SimulationStep(Int32 subStep)
   at SimulationManager.SimulationStep()
   at SimulationManager.SimulationThread()  [Core]

Such an error is logged when the game detects a broken linked list of citizen instance IDs - see method Building.RemoveTargetCitizen. I guess TM:PE breaks these lists for walking tours somewhere.

I didn't encounter these errors without TM:PE, they seem to be caused by this mod.