Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
A Mod caused an error [System.Exception]
Details:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeLoadException: Could not load type 'CitiesHarmony.API.HarmonyHelper' from assembly 'BetterRoadToolbar'.
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception
This report looks to me like a smoking gun, telling that the mod suffers from the documented issue CitiesHarmony.API misuse[github.com] (issue #8 on Harmony Redesigned tracker) and/or HarmonyLib public types[github.com] (issue #9 on Harmony Redesigned tracker)
Will this mod load if subscribed after Harmony Redesigned? Ie, would it benefit from the same workaround as the other mod on the Known Issues post? It certainly look like it belongs on the "Affected Mods" list in that post.
These two issues, logged and tracked as #8 and #9 are the most common problems plagueing mods that use Harmony, and they happen because the old harmony documentation, which most mod authors use, is quite poorly written.
Thank you for the report, and I'd appreciate your feedback.
at int.Parse (string) <0x00061>
at BetterRoadToolbar.SpawnButtonEntryPatch.Postfix (ColossalFramework.UI.UITabstrip,string,string,bool,string,string,string,bool,bool,ColossalFramework.UI.UIButton&) <0x00105>
at (wrapper dynamic-method) GeneratedGroupPanel.GeneratedGroupPanel.SpawnButtonEntry_Patch1 (GeneratedGroupPanel,ColossalFramework.UI.UITabstrip,string,string,bool,string,string,string,bool,bool) <0x006fa>
at GeneratedGroupPanel.CreateGroupItem (GeneratedGroupPanel/GroupInfo,string) <0x000fb>
at GeneratedGroupPanel.PopulateGroups (GeneratedGroupPanel/GroupFilter,System.Comparison`1<GeneratedGroupPanel/GroupInfo>) <0x0008e>
at GeneratedGroupPanel.RefreshPanel () <0x0009a>
at MainToolbar.SpawnSubEntry (ColossalFramework.UI.UITabstrip,string,string,string,string,bool) <0x003d5>
at GameMainToolbar.RefreshPanel () <0x0074b>
at MainToolbar.OnLevelLoaded (SimulationManager/UpdateMode) <0x0001b>
at (wrapper delegate-invoke) LoadingManager/LevelLoadedHandler.invoke_void__this___SimulationManager/UpdateMode (SimulationManager/UpdateMode) <0x0004f>
at (wrapper delegate-invoke) LoadingManager/LevelLoadedHandler.invoke_void__this___SimulationManager/UpdateMode (SimulationManager/UpdateMode) <0x00083>
at (wrapper delegate-invoke) LoadingManager/LevelLoadedHandler.invoke_void__this___SimulationManager/UpdateMode (SimulationManager/UpdateMode) <0x00083>
at (wrapper delegate-invoke) LoadingManager/LevelLoadedHandler.invoke_void__this___SimulationManager/UpdateMode (SimulationManager/UpdateMode) <0x00083>
at LoadingManager/<LoadLevelComplete>c__Iterator9.MoveNext () <0x000ac>
at LoadingManager.Update () <0x0010a>
This looks to me like the type of error an untested mod would throw when iit encounters unexpected input (which it should have expected).
Your Harmony Report probably contains some exception summaries for this mod that its author might find useful while debugging.
As I see it, this is just a new mod with new mod bugs.
Stupid question, but what does this mean now?
Can you fix it? Do you fix it?
I'm afraid, that the mod author won't fix as long as it is working with Boformers harmony...
(Saying like: Use Boformers or f**k off!)
If I understand the bugs correctly, none of them can be fixed by either myself or boformer, and occur equally with either harmony.
There are 2 bugs, or more.
If I misunderstood what is happening, please add more detail. The only detail I have seen so far is YuLun's description "mod would break harmony once subscribed", and a couple of complaints on the mods own comments thread.
This is a brand new mod and it hasn't been completely birthed quite yet.
Okay, trying to update you with some more information.
I'm experiencing the following situation:
1. Better Road Toolbar and Harmony redesigned:
Harmony breaks. It shows as "FAILURE" in content manager. There's no report button anymore.
The toolbar is loaded and works, though, but other mods which need harmony stop working (in my case the Moving Bridges Mod, maybe others too)
2. Better Road Toolbar and Boformers Harmony:
Everything seems to work fine.
In both cases, load order is enforced by installing Harmony locally.
I can provide output_log later some time
Aha! Thank you for this more clear description. The problem is that Better Road Toolbar includes the file "CitiesHarmony.Harmony.dll" and it should not, since this is the Harmony library and is supplied by either of the two harmony mods.
Delete the file:
steamapps\workshop\content\255710\2502526929\CitiesHarmony.Harmony.dll
Since the file 2502526929\CitiesHarmony.Harmony.dll is identical to 2040656402\CitiesHarmony.Harmony.dll, there is apparently no conflict.
Since the file 2502526929\CitiesHarmony.Harmony.dll is different from 2399343344\CitiesHarmony.Harmony.dll, the breakage is apparent.
It also breaks Felix's, but latently - ie, the breakage will only be noticed in the future, should Felix update his Harmony. At that time, this mod will also break all mods that require any Harmony, since the game will load the mod's copy of 2502526929\CitiesHarmony.Harmony.dll rather than the updated 2040656402\CitiesHarmony.Harmony.dll
The game loads assembly files from wherever it's able to find them, preferring workshop versions where an assembly exists both locally and in the workshop.
After all assemblies are loaded into memory, each mod is "OnEnable()", ie, started in a defined order: built-in mods first (alphabetical), then local mods (alphabetical order), and finally workshop mods (subscription order).
It doesn't matter that local mods are "OnEnable()"'d first, if the wrong assembly files are used (ie, the workshop assemblies).
The whole mess works most of the time if none of the mods contain files with conflicting names. As soon as the first mod appears that brings a conflicting filename, the ecosystem starts failing. If the behaviour of the conflicting file is similar to that of the intended file, the failure might be subtle at first.
Harmony Redesigned checks that its loaded assemblies are positively the expected versions, and when it is loaded wrong, it detects this and fails unambiguosly, even flagging the failure in the description with capital "FAILURE" text, to prevent whatever the problem is, to linger and propagate.
While this "FAILURE" may be inconvenient to the early adopters of buggy mods, it helps clean up the malaise quicker, thus cleaning up the ecosystem for the benefit of the community.
The old harmony and also the game is oblivious to bugs, which is why much of the community must be bothered with endless, seemingly random, unexplained errors.