CitiesSkylinesMods / TMPE

Cities: Skylines Traffic Manager: President Edition
https://steamcommunity.com/sharedfiles/filedetails/?id=1637663252
MIT License
571 stars 85 forks source link

An error has occured in mod's OnBeforeSimulationTick method. Mod name: TM:PE 11.6.0 TEST #1124

Closed Kexik-png-jpeg-negr closed 3 years ago

Kexik-png-jpeg-negr commented 3 years ago

I have a save that I have been playing for several weeks. Yesterday evening, I went to sleep and when I started playing Cities Skylines today morning, I started getting this error. I tried using both TM:PE Stable and test. When I start a new city, I don't seem to get the error. When I disabled the mod, I don't get the error. Also when the game time is paused, the error doesn't appear. The game is unplayable because I get the error every 15-30 seconds. Also when you go to main menu, you get a second error, but that is only in Test version.

Complete error message:

An error has occured in mod's OnBeforeSimulationTick method.
Mod name: TM:PE 11.6.0 TEST - Manage your city's traffic
Assembly: TrafficManager, Version=11.6.0.36640, Culture=neutral, PublicKeyToken=null
Severity: Medium

System.InvalidOperationException: Nullable object must have a value.
  at System.Nullable`1[System.Boolean].get_Value () [0x00000] in <filename unknown>:0 
  at TrafficManager.Manager.Impl.RoutingManager.RecalculateLaneEndRoutingData (UInt16 segmentId, Int32 laneIndex, UInt32 laneId, Boolean startNode) [0x00000] in <filename unknown>:0 
  at TrafficManager.Manager.Impl.RoutingManager+<>c__DisplayClass23_0.<RecalculateSegment>b__0 (UInt32 laneId, .NetLane+ lane, .Lane laneInfo, UInt16 segId, .NetSegment+ segment, Byte laneIndex) [0x00000] in <filename unknown>:0 
  at CitiesGameBridge.Service.NetService.IterateSegmentLanes (UInt16 segmentId, .NetSegment+ segment, GenericGameBridge.Service.NetSegmentLaneHandler handler) [0x00000] in <filename unknown>:0 
  at CitiesGameBridge.Service.NetService.IterateSegmentLanes (UInt16 segmentId, GenericGameBridge.Service.NetSegmentLaneHandler handler) [0x00000] in <filename unknown>:0 
  at TrafficManager.Manager.Impl.RoutingManager.RecalculateSegment (UInt16 segmentId) [0x00000] in <filename unknown>:0 
  at TrafficManager.Manager.Impl.RoutingManager.SimulationStep () [0x00000] in <filename unknown>:0 
  at TrafficManager.Lifecycle.ThreadingExtension.OnBeforeSimulationTick () [0x00000] in <filename unknown>:0 
  at HealkitMod.Patches.ThreadingWrapperOnBeforeSimulationTickPatch.Prefix (System.Collections.Generic.List`1 ___m_ThreadingExtensions) [0x00000] in <filename unknown>:0 

Second error: https://pastebin.com/Q87AzWeF

Steps to reproduce: Unknown

How to trigger:

  1. Play the game on the save I included, I should pop when you start the time.
  2. You should get the second error message when you go to main menu after loading the save. (Only on TM:PE Test)

Log files: https://ufile.io/rfpr5n0s I don't have TMPE.log

Savegame: https://steamcommunity.com/sharedfiles/filedetails/?id=2514934321

Screenshot: https://ufile.io/dnx8p2w3

Notes or questions?

krzychu124 commented 3 years ago

Hi, I need full output_log.txt and TMPE.log (you can find both in Cities_Skylines/Cities_Data). If you don't use too many assets you can share that savegame through workshop.

Kexik-png-jpeg-negr commented 3 years ago

I accidentally uploaded the post when It wasn't done. Fixed now.

krzychu124 commented 3 years ago

Check again, I really need TMPE.log. Also, could you disable Extended Error reporting mod? That mod is suppressing all errors leaving no trace in the log. It's really annoying. There is no InvalidOperationException error in the log you've posted, I see only the other error (Patch Prefix NullReferenceException) and I need to check what is going on there

Kexik-png-jpeg-negr commented 3 years ago

I got both files. The new log, and the new TMPE.log I also found out that when I try to draw lanes, the error appears. However, I'm not sure if it is the same one or not. (Video)

Game log: https://ufile.io/92wr1up1 TMPE log: https://ufile.io/ycgyuj8i

krzychu124 commented 3 years ago

Thanks, investigating

BTW, you can also drag&drop log/mp4 files to the message (like the hint suggests)

Kexik-png-jpeg-negr commented 3 years ago

Thanks for the tip. I will also try to do some troubleshooting.

krzychu124 commented 3 years ago

Remove that segment:

image

zoomed out:

image

I'll try to find out why that particular segment is broken

Kexik-png-jpeg-negr commented 3 years ago

Oh my god... Thank you so much. I'm not sure how that junction broke overnight.