joaofarias / csl-traffic

A WIP mod for Cities: Skylines to improve traffic.
91 stars 30 forks source link

Cargo Truck AI error / flying vehicles #45

Closed originalfoo closed 9 years ago

originalfoo commented 9 years ago

http://www.reddit.com/r/CitiesSkylines/comments/37niqx/bug_from_new_update/

[System.NullReferenceException] Details: No details System.NullReferenceException: Object reference not set to an instance of an object at TrafficManager.CustomCarAI.CalculateSegmentPosition (UInt16 vehicleID, .Vehicle& vehicleData, Position nextPosition, Position position, UInt32 laneID, Byte offset, Position prevPos, UInt32 prevLaneID, Byte prevOffset, UnityEngine.Vector3& pos, UnityEngine.Vector3& dir, System.Single& maxSpeed) [0x00000] in :0 at CSL_Traffic.CustomCargoTruckAI.CalculateSegmentPosition (UInt16 vehicleID, .Vehicle& vehicleData, Position nextPosition, Position position, UInt32 laneID, Byte offset, Position prevPos, UInt32 prevLaneID, Byte prevOffset, UnityEngine.Vector3& pos, UnityEngine.Vector3& dir, System.Single& maxSpeed) [0x00000] in :0 at CSL_Traffic.CustomVehicleAI.UpdatePathTargetPositions (.VehicleAI vehicleAI, UInt16 vehicleID, .Vehicle& vehicleData, Vector3 refPos, System.Int32& index, Int32 max, Single minSqrDistanceA, Single minSqrDistanceB) [0x00000] in :0 at CSL_Traffic.CustomCarAI.SimulationStep (.CarAI carAI, UInt16 vehicleID, .Vehicle& vehicleData, .Frame& frameData, UInt16 leaderID, .Vehicle& leaderData, Int32 lodPhysics) [0x00000] in :0 at CSL_Traffic.CustomCargoTruckAI.SimulationStep (UInt16 vehicleID, .Vehicle& vehicleData, UInt16 leaderID, .Vehicle& leaderData, Int32 lodPhysics) [0x00000] in :0 at CarAI.SimulationStep (UInt16 vehicleID, .Vehicle& data, Vector3 physicsLodRefPos) [0x00000] in :0 at CargoTruckAI.SimulationStep (UInt16 vehicleID, .Vehicle& data, Vector3 physicsLodRefPos) [0x00000] in :0 at CSL_Traffic.CustomCargoTruckAI.SimulationStep (UInt16 vehicleID, .Vehicle& data, Vector3 physicsLodRefPos) [0x00000] in :0 at VehicleManager.SimulationStepImpl (Int32 subStep) [0x00000] in :0 at SimulationManagerBase`2[Manager,Properties].SimulationStep (Int32 subStep) [0x00000] in :0 at VehicleManager.ISimulationManager.SimulationStep (Int32 subStep) [0x00000] in :0 at SimulationManager.SimulationStep () [0x00000] in :0 at SimulationManager.SimulationThread () [0x00000] in :0

originalfoo commented 9 years ago

There are also lots of people reporting flying vehicles, only started happening recently - possibly something to do with setting correct vehicle AIs (and core game AIs might be broken)?

http://www.reddit.com/r/CitiesSkylines/comments/37m5rb/cars_flying_instead_of_using_the_roads/

http://www.reddit.com/r/CitiesSkylines/comments/37n1qj/i_just_started_a_new_world_and_im_having_a_weird/

http://www.reddit.com/r/CitiesSkylines/comments/37n91a/flying_firetrucks_and_garbage_trucks_problem/

originalfoo commented 9 years ago

http://www.reddit.com/r/CitiesSkylines/comments/37niqx/bug_from_new_update/

Log - lots of T++ errors in there: https://drive.google.com/file/d/0B6Qd6z0lXx8VM2NlLWpUdTdyODg/view

Savegame: http://steamcommunity.com/sharedfiles/filedetails/?id=451128318

Looks like TM and T++ are competing over AIs?

originalfoo commented 9 years ago

http://www.reddit.com/r/CitiesSkylines/comments/37o8ob/cars_ignore_roads_with_up_to_date/

joaofarias commented 9 years ago

We recently detected a bug in the core game code where vehicle assets from the workshop were all being assigned to the CarAI, and that was causing all sorts of other problems.

Where did you learn this?

I may have been misinterpreted somewhere but Traffic++ does not fix this issue since I didn't even know this was an issue. In fact, I do believe this information is wrong or at least does not happen in all cases.

originalfoo commented 9 years ago

I thought that was one of the bugs fixed in recent release / hotfix? That the vehicles were using the wrong AI (it was also causing workshop vehicles to ignore lane restrictions)...? Regardless, I'll edit the statement to remove bad infos.

joaofarias commented 9 years ago

No, the problem was that T++ wasn't changing their AI, so they had their default AI, be it hearse, ambulance, whatever. It wasn't a problem from the game. :)

I still can't reproduce this problem though. I've tried the saves people provided and have been running them from some time now. Still, no problem. I think I'll focus on the performance problem as that will require me to change a lot of things and I might stumble upon the bug. Having said that, I'll be keeping an eye open for reports to see if I can fix it sooner rather than later.

originalfoo commented 9 years ago

I've updated posts to let people know what I said was gibberish :)

Will start gathering some infos here to see if I can identify any other possible causes for these issues.

originalfoo commented 9 years ago

User: Stopdaydreaming

originalfoo commented 9 years ago

user: wjdp

output_log: https://gist.github.com/wjdp/5cce09db18a900ab6244

originalfoo commented 9 years ago

http://www.reddit.com/r/CitiesSkylines/comments/37mr0q/best_way_to_cargo_port_direct_by_air/

originalfoo commented 9 years ago

User: Wokit

originalfoo commented 9 years ago

User: McOffsky

Mentioned he had the vehicle stopping bug (provided some support to help him fix that) but also mentioned that the flying vehicles bug was happening before he started using T++.....!

originalfoo commented 9 years ago

Screenshots: http://imgur.com/a/UMwFC

originalfoo commented 9 years ago

More flying vehicles....

http://steamcommunity.com/app/255710/discussions/0/615085406661448628/

originalfoo commented 9 years ago

BTW, with the AI stuff from what I can see T++ changes the AI of vehicles - is that stored in save game? If so, what happens when save game loaded?

joaofarias commented 9 years ago

the flying vehicles bug was happening before he started using T++.....!

This is very interesting. I also remember reading somewhere that setting T++ in ghost mode didn't fix it. I'll try to find it.

AFAIK, nothing on the AI classes is saved.

originalfoo commented 9 years ago

User: Danish-Viking:

joaofarias commented 9 years ago

Was there a silent update? I don't think I got anything. How do I check?

originalfoo commented 9 years ago

I've no idea - several users have mentioned they had a big download from Steam today on C:S, roughly 230MB. But there doesn't seem to be any way to find out what it actually is or what it does. Still digging in to it to try and find out.

originalfoo commented 9 years ago

More vehicles experiencing a gravitational rift: https://www.reddit.com/r/CitiesSkylines/comments/37wi5g/i_really_borked_up_traffic_by_the_looks_of_it/

originalfoo commented 9 years ago

https://www.reddit.com/r/CitiesSkylines/comments/37wrmw/im_not_sure_if_this_is_a_glitch_or_if_i_am_doing/

originalfoo commented 9 years ago

Getting reports that the off-road vehicle bug is fixed; possibly too early to confirm though. Will monitor interwebs and if no further reports of this issue will close after weekend.

originalfoo commented 9 years ago

No further reports of airborne vehicles, seems this bug is fixed :)