question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Kexik-png-jpeg-negrcommented, Jun 12, 2021

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

0reactions
krzychu124commented, Jun 12, 2021

Remove that segment:

image

zoomed out:

image

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

A Mod caused an error [System.Exception] :: Cities
Hi, i wanted to install mods but i got this: A Mod caused an error [System.Exception] Details: System.Reflection.
Read more >
[TUTORIAL] Fix Traffic Manager President Edition in just 7 ...
I'm wondering if some people have installed it incorrectly, TMPE has broken, but they haven't noticed and reckon it's been fixed.
Read more >
TMPE/CHANGELOG.md at master · CitiesSkylinesMods/ ...
This changelog includes all versions and major variants of the mod going all the way back to March 2015, just 4 days after...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found