CitiesSkylinesMods / TMPE

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

FileNotFoundException: Could not load file or assembly 'TrafficManager #90

Closed originalfoo closed 5 years ago

originalfoo commented 5 years ago

Report from Sp3ctre18 on Steam workshop page.

I should add that when I tried I got an un-passable error of "could not load file or assembly 'TrafficManager."

Log file: https://www.pastefs.com/pid/101223

Log file with all mods enabled: https://www.pastefs.com/pid/101224

Another log file (Bulldoze It! and Nursing Home Mod were disabled for this one): https://www.pastefs.com/pid/101225

Related forum post with list of mods, etc: https://forum.paradoxplaza.com/forum/index.php?threads/cities-skylines-steam-cant-find-culprit-of-array-index-is-out-of-range.1153131/

Apparently the error occurred after disabling TMPE and then loading a save in which TMPE had been active.

This could be relate to #82, still investigating.

Solution

The error is caused by AdvancedJunctionRule mod. See this Troubleshooting Guide for fix.

originalfoo commented 5 years ago

User has multiple Incompatible Mods installed. Also, many old mods and mods with overlapping functionality (see: Recommended Mod Substitutions).

originalfoo commented 5 years ago

⚠️ Central Services Dispatcher mod has been added to incompatible mods list

It states it's incompatible on their website.

originalfoo commented 5 years ago

In first log file (101223 in url above), this is the error:

FileNotFoundException: Could not load file or assembly 'TrafficManager, Version=1.0.6980.25068, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
  at AdvancedJunctionRule.RoadUI.Start () [0x00000] in <filename unknown>:0
(Filename:  Line: -1)
Simulation error: Could not load file or assembly 'TrafficManager, Version=1.0.6980.25068, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
  at ThreadingWrapper.OnBeforeSimulationFrame () [0x00000] in <filename unknown>:0
  at SimulationManager.SimulationStep () [0x00000] in <filename unknown>:0
  at SimulationManager.SimulationThread () [0x00000] in <filename unknown>:0   [Core]
krzychu124 commented 5 years ago

Yup, I can see this...

originalfoo commented 5 years ago

Updated some broken links in OP.

Basically his mods are a mess, I think. Although that error posted in my last comment leads me to believe there is something wrong with the recently added "Turn on Red" feature.

krzychu124 commented 5 years ago

Haha, look inside your output_log 😉

originalfoo commented 5 years ago

Haha, look inside your output_log 😉

With over 100 mods active, I have two errors in my log. One from District Service Limit 3, and one from TM:PE...

Colossal Handler caught: 
  at (wrapper managed-to-native) UnityEngine.Component:GetComponentFastPath (System.Type,intptr)
  at UnityEngine.Component.GetComponent[CustomKeyHandler] () [0x00000] in <filename unknown>:0 
  at TrafficManager.UI.UIBase.Finalize () [0x00000] in <filename unknown>:0 
krzychu124 commented 5 years ago

Ok, good to know. Mine warning seems to be different because I use own build which I copy to AppData

Non platform assembly: data-000000001AE54040 (this message is harmless)
Fallback handler could not load library D:/steamapps/steamapps/common/Cities_Skylines/Cities_Data/Mono/data-000000001AE54040.dll
Assembly TrafficManager, Version=1.0.6986.3487, Culture=neutral, PublicKeyToken=null loaded.  [Mods - Internal]

Oh.. now I see... Your error come from new Esc key handler (Interesting, I will check later why it's happening but as you can see game caught that error without throwing popup or crash)

originalfoo commented 5 years ago

I'll create new issue to track my error

krzychu124 commented 5 years ago

What is AdvancedJunctionRule?? Mod? I can't find this text neither in base game and our mod.

originalfoo commented 5 years ago

What is AdvancedJunctionRule?

It's the mod by pcfantasy: https://steamcommunity.com/sharedfiles/filedetails/?id=1647686914

The one with the vehicles driving into junction and waiting for gap in traffic.

krzychu124 commented 5 years ago

Line 56267 and more (around 10k 😄 ) FileNotFoundException: Could not load file or assembly 'TrafficManager, Version=1.0.6980.25068, Culture=neutral, PublicKeyToken=null' or one of its dependencies. at AdvancedJunctionRule.RoadUI.Start () [0x00000] in <filename unknown>:0

krzychu124 commented 5 years ago

Ok I know what is going on with this error above. That error was from log when user unsubscribed TrafficManager which is one of dependencies of AdvancedJunctionRule @pcfantasy should add run-time check that user has subscribed and enabled TrafficManager

Btw this log seems to be from older version of this mod (before 10 Feb update) Current version on Steam is TrafficManager, Version=1.0.6980.35728

pcfantasy commented 5 years ago

@krzychu124

OK, I will add this.

originalfoo commented 5 years ago

Oh,,,, Hang on, so the AdvancedJunctionRule mod requires TMPE?

I thought it was incompatible.

@pcfantasy can you confirm which is the case?

Doh! Updating the incompatible mods list...

originalfoo commented 5 years ago

@pcfantasy Did you make that update to your mod yet (to check if TMPE is subscribed and enabled)?

pcfantasy commented 5 years ago

@aubergine10 No, I will finish this soon when I have time :)

pcfantasy commented 5 years ago

I update my Github now to check oldTMPE and newTMPE, I will update to stream after a few test soon. https://github.com/pcfantasy/AdvancedJunctionRule

    public void CheckTMPE()
     {
         if (IsSteamWorkshopItemSubscribed(583429740))
         {
             UIView.library.ShowModal<ExceptionPanel>("ExceptionPanel").SetMessage("Incompatibility Issue", "Found original version of TM:PE steamID:583429740, We only support New version of TM:PE steamID:1637663252", true);
         }

          if (!this.Check3rdPartyModLoaded("TrafficManager", true))
         {
             UIView.library.ShowModal<ExceptionPanel>("ExceptionPanel").SetMessage("Incompatibility Issue", "Require New version of TM:PE steamID:1637663252", true);
         }
     }
originalfoo commented 5 years ago

Looks like the mod was updated with new code - @pcfantasy can this issue be closed?

originalfoo commented 5 years ago

no response, closing