Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting, upgrading, or otherwise updating a road makes vehicles despawn instead of recalculating their route #218

Closed
22Pilots opened this issue Mar 7, 2019 · 27 comments · Fixed by #232
Assignees
Labels
adjustments required An issue require some adjustments in code confirmed Represents confirmed issue or bug PATHFINDER Pathfinding tweaks or issues
Milestone

Comments

@22Pilots
Copy link

22Pilots commented Mar 7, 2019

This is the same issue as issue #86 which was thought solved with Labs version 1.10.16. When you make any kind of adjustment to a roadway segment that would force a vehicle to recalculate its route, the vehicle will instead despawn upon reaching the adjusted segment. To make matters stranger, the issue only seems to occur in certain areas or scenarios for me. In my case, making changes to any road in a transit / parking lot complex for an amusement park triggers this bug.

ezgif-1-2da6e31c5b3f

Traffic eventually normalizes after all the vehicles that existed at the time of the change get filtered out or you use the 'Clear Traffic' button.

@originalfoo
Copy link
Member

Was this outside the central 25 tiles are of the map?

@22Pilots
Copy link
Author

22Pilots commented Mar 7, 2019

No, this occurs within the central 25 tiles for me.

I should add that the repro in the gif was done with only Network Extensions, TM:PE Labs version 1.10.16, and 81 tiles enabled.

@originalfoo
Copy link
Member

originalfoo commented Mar 7, 2019

Savegame...

Wilmington2.zip

TMPE version: Labs version 1.10.16

@22Pilots Could you also send us your log file so we can see if there's any errors, etc?

@22Pilots
Copy link
Author

22Pilots commented Mar 7, 2019

Here you go:
output_log.txt

@originalfoo
Copy link
Member

originalfoo commented Mar 7, 2019

Mods:

Bundled Mod: HardMode.dll 
Bundled Mod: UnlimitedMoney.dll 
Bundled Mod: UnlimitedOilAndOre.dll 
Bundled Mod: UnlimitedSoil.dll 
Bundled Mod: UnlockAll.dll 
Workshop Mod: Roads United NA PLUS.dll 
Workshop Mod: RoadsUnited_Core.dll 
Workshop Mod: NodeElevationControl.dll 
Workshop Mod: NoPillars.dll 
Workshop Mod: FullRefundFromRoadsMod.dll 
Workshop Mod: AutoEmptyingExtended.dll 
Workshop Mod: ObjUnity3D.dll 
Workshop Mod: Transit.Framework.dll 
Workshop Mod: NetworkExtensions2.dll 
Workshop Mod: Transit.Framework.ExtensionPoints.dll 
Workshop Mod: Transit.Addon.RoadExtensions.dll 
Workshop Mod: Transit.Addon.Tools.dll 
Workshop Mod: Transit.Framework.Redirection.dll 
Workshop Mod: Transit.Framework.Hooks.dll 
Workshop Mod: SpawnPointsFix.dll 
Workshop Mod: FineRoadAnarchy.dll 
Workshop Mod: FineRoadTool.dll 
Workshop Mod: NaturalResourcesBrush.dll 
Workshop Mod: SurfacePainter.dll 
Workshop Mod: American RoadSigns.dll 
Workshop Mod: MoreBeautification.dll 
Workshop Mod: ParallelRoadTool.dll 
Workshop Mod: NewAmericanTrafficLights.dll 
Workshop Mod: RoadsUnited_US.dll 
Workshop Mod: EnvironmentChanger.dll 
Workshop Mod: WG_CitizenEdit.dll 
Workshop Mod: EightyOne.dll 
Workshop Mod: UnlimitedOutsideConnections.dll 
Workshop Mod: PrefabHook.dll 
Workshop Mod: AnyRoadOutsideConnections.dll 
Workshop Mod: 0Harmony.dll 
Workshop Mod: CSL_RebalancedIndustriesDistricts.dll 
Workshop Mod: CSLShowMoreLimits.dll 
Workshop Mod: V10Speed.dll 
Workshop Mod: AirportRoads.dll 
Workshop Mod: MoveIt.dll 
Workshop Mod: CSUtil.CameraControl.dll 
Workshop Mod: CSUtil.Commons.dll 
Workshop Mod: TMPE.GenericGameBridge.dll 
Workshop Mod: TMPE.CitiesGameBridge.dll 
Workshop Mod: TrafficManager.dll 
Workshop Mod: TreeFireControl.dll 

Edit: Mods listed in second log file...

Bundled Mod: HardMode.dll 
Bundled Mod: UnlimitedMoney.dll 
Bundled Mod: UnlimitedOilAndOre.dll 
Bundled Mod: UnlimitedSoil.dll 
Bundled Mod: UnlockAll.dll 
Workshop Mod: Roads United NA PLUS.dll 
Workshop Mod: RoadsUnited_Core.dll 
Workshop Mod: NodeElevationControl.dll 
Workshop Mod: NoPillars.dll 
Workshop Mod: FullRefundFromRoadsMod.dll 
Workshop Mod: AutoEmptyingExtended.dll 
Workshop Mod: ObjUnity3D.dll 
Workshop Mod: Transit.Framework.dll 
Workshop Mod: NetworkExtensions2.dll 
Workshop Mod: Transit.Framework.ExtensionPoints.dll 
Workshop Mod: Transit.Addon.RoadExtensions.dll 
Workshop Mod: Transit.Addon.Tools.dll 
Workshop Mod: Transit.Framework.Redirection.dll 
Workshop Mod: Transit.Framework.Hooks.dll 
Workshop Mod: SpawnPointsFix.dll 
Workshop Mod: FineRoadAnarchy.dll 
Workshop Mod: FineRoadTool.dll 
Workshop Mod: NaturalResourcesBrush.dll 
Workshop Mod: SurfacePainter.dll 
Workshop Mod: American RoadSigns.dll 
Workshop Mod: MoreBeautification.dll 
Workshop Mod: ParallelRoadTool.dll 
Workshop Mod: NewAmericanTrafficLights.dll 
Workshop Mod: RoadsUnited_US.dll 
Workshop Mod: EnvironmentChanger.dll 
Workshop Mod: WG_CitizenEdit.dll 
Workshop Mod: EightyOne.dll 
Workshop Mod: UnlimitedOutsideConnections.dll 
Workshop Mod: PrefabHook.dll 
Workshop Mod: AnyRoadOutsideConnections.dll 
Workshop Mod: 0Harmony.dll 
Workshop Mod: CSL_RebalancedIndustriesDistricts.dll 
Workshop Mod: CSLShowMoreLimits.dll 
Workshop Mod: V10Speed.dll 
Workshop Mod: AirportRoads.dll 
Workshop Mod: MoveIt.dll 
Workshop Mod: CSUtil.CameraControl.dll 
Workshop Mod: CSUtil.Commons.dll 
Workshop Mod: TMPE.GenericGameBridge.dll 
Workshop Mod: TMPE.CitiesGameBridge.dll 
Workshop Mod: TrafficManager.dll 
Workshop Mod: TreeFireControl.dll 

@krzychu124
Copy link
Member

krzychu124 commented Mar 7, 2019

The first thing I've seen yesterday after loading that save was that vehicles gets confused while entering the parking using first entrance.
After deleting that road they despawn completely, similar like on this gif.
Additionally I found some floating detached segments of train tracks and airplane routes. I have to do more tests 😉

@22Pilots
Copy link
Author

22Pilots commented Mar 7, 2019

Disregard that last output log file, I had a brain fart and didn't bother to grab it from the repro environment. Here's the fixed version:
output_log.txt

@originalfoo
Copy link
Member

@22Pilots : While I don't think the following is causing the issue, some of your mods are obsolete or replaced by better alternatives.

You are using outdated Roads United Core: https://steamcommunity.com/sharedfiles/filedetails/?id=726005715

Suggestion: Upgrade to a newer version (I've never used Roads United stuff so I don't know what latest version is)

Network Nodes Experimental is broken and causes phantom nodes and other strangeness. https://steamcommunity.com/sharedfiles/filedetails/?id=658653260

Suggestion: Use 'Move It!' instead: https://steamcommunity.com/sharedfiles/filedetails/?id=1619685021

No pillars can also cause some strangeness: https://steamcommunity.com/sharedfiles/filedetails/?id=463845891

Suggestion: Use 'Network Skins' instead: https://steamcommunity.com/sharedfiles/filedetails/?id=543722850

Automatic Emptying Extended is obsolete: https://steamcommunity.com/sharedfiles/filedetails/?id=686588890

Suggestion: Use 'Empty It!' instead: https://steamcommunity.com/sharedfiles/filedetails/?id=1661072176

More Beautification causes lag when opening build menus: https://steamcommunity.com/sharedfiles/filedetails/?id=505480567

Suggestion: Use 'Find It!' instead: https://steamcommunity.com/sharedfiles/filedetails/?id=837734529

CSL Show More Limits is somewhat old mod: https://steamcommunity.com/sharedfiles/filedetails/?id=531738447

Suggestion: Use 'Watch It!' instead which has a hugely improved limits panel: https://steamcommunity.com/sharedfiles/filedetails/?id=1643902284

Also, completely unsubscribe any mods you don't use as sometimes they still change game code even when not enabled.

@krzychu124
Copy link
Member

I think I found possible cause of issue. I haven't checked how to fix that yet but for now set Vehicle restrictions aggression to Low to be able play normally

@22Pilots
Copy link
Author

22Pilots commented Mar 7, 2019

Awesome, I'll be sure to test this later. I had no idea just how many of those mods had updated replacements!

@krzychu124
Copy link
Member

krzychu124 commented Mar 7, 2019

Unfortunately setting that option to low will cause small issues like this... (they'll sometimes ignore car ban on bus lanes...)

Look at black camper van 😉

  • Not allowed turn left?? No problem...

zrzut ekranu 130

  • Turn right and and do U-turn to go straight 😄

zrzut ekranu 129

BONUS
It seems that they'll start using all available lanes (sometimes 😕 )
zrzut ekranu 132

@22Pilots
Copy link
Author

22Pilots commented Mar 7, 2019

Wild 😂 Nothing a little lane assignment can't fix!

@VictorPhilipp VictorPhilipp self-assigned this Mar 9, 2019
@VictorPhilipp VictorPhilipp added investigating Issue currently under investigation confirmed Represents confirmed issue or bug labels Mar 9, 2019
@VictorPhilipp
Copy link
Collaborator

VictorPhilipp commented Mar 9, 2019

Confirmed: I added a lane connection (btw you have wayyy too many xD) on the 4-lane one-way and vehicles start to disappear.

@VictorPhilipp
Copy link
Collaborator

VictorPhilipp commented Mar 10, 2019

Have you disabled and re-enabled the Parking AI recently?

Almost all cims/cars want to park at those large parking lots in order to get to your zoo (probably by taking the bus). The problem is, I see that they do not know anymore why they want to park there (Parking AI keeps track of the "why").

If you disabled the Parking AI, the "why" information is lost - that means cars still drive towards the parking lot (a custom via point) but then forget what their original target is. If route recalculation is enforced while they are directed towards a via point (such as a parking lot) and Parking AI detects an invalid state (e.g. it does not know where to send them next), things become problematic. While Parking AI should be able to recover from such situations this might explain the despawn.

Anyway, I cleared all traffic and let the simulation run until cars appeared again on the 4-lane one-way: When I now force route recalculation now (e.g. by adding a lane connection) cars still despawn. (reason: see my next comment)

@VictorPhilipp
Copy link
Collaborator

I think I found possible cause of issue. I haven't checked how to fix that yet but for now set Vehicle restrictions aggression to Low to be able play normally

Lowering vehicle restrictions aggression works because the road to the zoo is restricted for passenger cars:
grafik

This restriction is the reason why Parking AI fails to recover from the lost "why" information. Internally, first a regular path-find to the target (zoo) is executed (as if the Parking AI was not active). During this path-find, vehicle restrictions are taken into account.

@krzychu124
Copy link
Member

Oh... Good to know 😃

@22Pilots
Copy link
Author

I had disabled and reenabled the parking AI in response to vehicles disappearing, not prior to vehicles beginning to disappear.

@VictorPhilipp
Copy link
Collaborator

VictorPhilipp commented Mar 10, 2019

I had disabled and reenabled the parking AI in response to vehicles disappearing, not prior to vehicles beginning to disappear.

Yes, even after making sure that the Parking AI has every information it needs they still despawn after a road network modification and route recalculation.

The main problem is that the Parking AI was never designed for situations where the target is not reachable by car at all.

Some distantly related issue: #143

@22Pilots
Copy link
Author

Ah I see, that makes more sense. I left that connection there to act as an access road for maintenance and emergency vehicles. Would deleting the access road force the parking AI to recognize the transit option as it's only route or would it still trigger issues?

@VictorPhilipp
Copy link
Collaborator

VictorPhilipp commented Mar 10, 2019

If you delete the access road you will get problems with city services (police, garbage, etc.). There is no free lunch I guess :-)

I will investigate why path calculation fails and try to solve it.

@22Pilots
Copy link
Author

Providing the park with it's own isolated services would in theory get around that I'd assume, albeit not particularly realistically but I suppose it beats the current issue!

@VictorPhilipp
Copy link
Collaborator

This won't work. You will get service problems anyway because the game will try to assign city-wide service tasks to your isolated service buildings which they cannot fulfill. For example, you will see things like service vehicles counters hopping from 0/20 to 1/20 and back to 0/20 and residential zones complaining about missing services.

@22Pilots
Copy link
Author

I see, so much for that. Looking forward to whatever fixes you can come up with then!

@VictorPhilipp
Copy link
Collaborator

VictorPhilipp commented Mar 10, 2019

Technical stuff ahead:

I have traced a full path-find execution which failed:

UNIT(215775)
PathFindImplementation: Preparing calculation:
	bufferItemStartA: segment=19233 lane=1 off=229 laneId=228806
	bufferItemStartB: segment=0 lane=0 off=0 laneId=0
	bufferItemEndA: segment=27583 lane=0 off=139 laneId=226216
	bufferItemEndB: segment=0 lane=0 off=0 laneId=0
	vehicleItem: segment=0 lane=0 off=0 laneId=0 vehiclePosIndicator=1
Properties:
	[...]
	pathType=DrivingOnly
	[...]
  • In the current implementation the Parking AI tries to calculate a regular car path to the target building first (pathType=DrivingOnly).
  • The start segment (19233) is located at the 4-lane one-way road
    grafik
  • The end segment (27583) is located in front of the "House of Horros" (building 27573)
    grafik
  • The target is only reachable by a drive car -> PARK -> walk -> monorail -> walk path
  • Using public transport is prohibited on the path (m_laneTypes=Vehicle, Pedestrian, TransportVehicle and m_vehicleTypes=Car). The monorail segment 25711 is inaccessible.

@22Pilots
Copy link
Author

Interesting, I think I clipped the monorail track over the corner of the House of Horrors building, I wonder if the game somehow considered it blocked because of that?

@VictorPhilipp
Copy link
Collaborator

VictorPhilipp commented Mar 10, 2019

Interesting, I think I clipped the monorail track over the corner of the House of Horrors building, I wonder if the game somehow considered it blocked because of that?

No, that's not a problem.

Referencing #196, since a fix for #196 should give us a solution to this problem

@VictorPhilipp
Copy link
Collaborator

Also referencing #47

@VictorPhilipp VictorPhilipp added adjustments required An issue require some adjustments in code in-progress The problem is being solved currently and removed investigating Issue currently under investigation labels Mar 13, 2019
@VictorPhilipp VictorPhilipp added this to the 1.10.17 milestone Mar 13, 2019
krzychu124 added a commit that referenced this issue Mar 14, 2019
@VictorPhilipp VictorPhilipp removed the in-progress The problem is being solved currently label Mar 16, 2019
@originalfoo originalfoo added the PATHFINDER Pathfinding tweaks or issues label Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adjustments required An issue require some adjustments in code confirmed Represents confirmed issue or bug PATHFINDER Pathfinding tweaks or issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants