Cities: Skylines

Cities: Skylines

Forest Brush v1.3
This topic has been locked
craigrz Feb 22, 2019 @ 4:14am
Forest Brush mod error message when exiting saved games
I Receive the following error message whenever I exit a saved game that has the mod Forest Brushloaded😊:

The Mod C:\Program Files (x86)\Steam\steamapps\workshop\content\255710\1658679290 [0Harmony.dll, ForestBrush.dll] has caused an error [ModException]

Details:
System.InvalidCastException: Cannot cast from source type to destination type.
at Harmony.PatchInfoSerialization.Deserialize (System.Byte[] bytes) [0x00000] in <filename unknown>:0
at Harmony.HarmonySharedState.GetPatchInfo (System.Reflection.MethodBase method) [0x00000] in <filename unknown>:0
at Harmony.PatchProcessor.GetPatchInfo (System.Reflection.MethodBase method) [0x00000] in <filename unknown>:0
at Harmony.HarmonyInstance.GetPatchInfo (System.Reflection.MethodBase method) [0x00000] in <filename unknown>:0
at Harmony.HarmonyInstance.UnpatchAll (System.String harmonyID) [0x00000] in <filename unknown>:0
at ForestBrush.UserMod.UninstallMod () [0x00000] in <filename unknown>:0
at ForestBrush.UserMod.OnLevelUnloading () [0x00000] in <filename unknown>:0
at LoadingWrapper.OnLevelUnloading () [0x00000] in <filename unknown>:0

I don't know hat this is telling me.

Craigrz
< >
Showing 1-12 of 12 comments
Katalepsis  [developer] Feb 22, 2019 @ 4:35am 
Thanks for reporting.
egi  [developer] Feb 22, 2019 @ 2:43pm 
@craigrz
can you go to your C:\Program Files (x86)\Steam\steamapps\workshop\content\255710 directory, search for 0harmony.dll
check the properties of all resulting files and under details give us the file version of the oldest harmony version you have? then rightclick on the oldest file and do a "open file location". which mod is it where the oldest harmony version is in?
Editfish Feb 22, 2019 @ 5:39pm 
I've got the same problem, and I'm showing three copies of 0Harmony.dll. All are 110KB in size, but with various dates.

It looks like they're used with the Building Anarchy and RealTime mods.

Thanks for looking into this! :)

craigrz Feb 23, 2019 @ 7:49am 
egi,

I am very confused at this point. I went to my 255710 directory and found the asset number for ForestBrush listed within it. When I clicked on the asset number their was a short list of items including a folder entitled Locale, a 0harmony.dll application with no folders within it (there was a bunch of strange computer symbols and several lines of text that was meaningless to me) , a ForestBrush.ddl application that did not try to open and a preview image PNG File and nothing else. Am I looking inthe wrong place?
Editfish Feb 23, 2019 @ 2:49pm 
*UPDATE*

The RealTime mod version (modified 08/14/2018 is v.1.2.0.1

The Building Anarchy version (modified 11/12/2018) is also v.1.2.0.1

They both appear to match the Forest Brush version of v.1.2.0.1

Sry, this doesn't feel helpful.

:/

egi  [developer] Feb 23, 2019 @ 4:39pm 
@Editfish
thx, exactly what i wanted. but yeah ... all harmony dlls are up to date. there was an old harmony version that caused some issues. i wanted to rule that out.
also i subbed to all three mods but can't reproduce the error. it could be a mod conflict.
can you upload a save to the steam workshop and send us the link?

@craigrz
in the 255710 directory, use the windows explorer search functionality to search for 0harmony.dll
then right click > properties > details > file version. i just need the oldest one.
my oldest is 1.1.0 in Realistic Walking Speed.
craigrz Feb 23, 2019 @ 7:20pm 
egi,

Thank you for the instructions. I am on Windows 10 and used File Explorer to highlight the 0harmoney.ddl line and right clicked on properties > details > file version and there was only one file version 1.2.0.1 and no reference to a mod name.

Craigrz
Editfish Feb 24, 2019 @ 4:01am 
So, I disabled the Forest Brush mod, restarted C:S and reenabled it and it doesn't appear to have the error. Not sure why it was acting wonky initially, but it seems to have corrected itself.

Thanks for such a great mod! :ojseagull:
Katalepsis  [developer] Feb 25, 2019 @ 3:21pm 
This error is due to the way Cities Skylines loads Assemblies and it is due to the fact that there are several Harmony assemblies packed with different mods. One way to fix this issue would be to have a central Harmony mod as a dependency for all mods but I am against this idea.

Another solution is to bundle harmony into the actual mod's namespace but this is kind of a maintenance nightmare.

MY solution is to catch the exception thrown, and forget about it. xD

The end user should no longer see this error with the next update.
craigrz Feb 25, 2019 @ 3:36pm 
TPB,

Thanks so much.

Craigrz
Katalepsis  [developer] Feb 27, 2019 @ 1:55am 
If someone can verify if this is fixed in latest version so I can close this discussion :)
craigrz Feb 27, 2019 @ 8:03am 
TPB,

After your latest version it is now fixed for me, thanks again.
< >
Showing 1-12 of 12 comments
Per page: 1530 50