Cities: Skylines

Cities: Skylines

Crossings
i get this message now, after your work with harmony
I load my old map (with no crossings placed on it with this mod. I started this town two days ago and get this message:

The Mod G:\Steam\steamapps\workshop\content\255710\427258853 [0Harmony.dll, Crossings.dll] has caused an error [ModException]

Details:
HarmonyLib.HarmonyException: Patching exception in method System.Void NetNode::CalculateNode(System.UInt16 nodeID) ---> System.InvalidCastException: Cannot cast from source type to destination type.
at HarmonyLib.PatchInfoSerialization.Deserialize (System.Byte[] bytes) [0x00000] in <filename unknown>:0
at HarmonyLib.HarmonySharedState.GetPatchInfo (System.Reflection.MethodBase method) [0x00000] in <filename unknown>:0
at HarmonyLib.PatchClassProcessor.ProcessPatchJob (HarmonyLib.Job job) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x00000] in <filename unknown>:0
at HarmonyLib.PatchClassProcessor.ProcessPatchJob (HarmonyLib.Job job) [0x00000] in <filename unknown>:0
at HarmonyLib.PatchClassProcessor.PatchWithAttributes (System.Reflection.MethodBase

I save my map and reload it and get this message:

HarmonyLib.HarmonyException: Patching exception in method System.Void NetNode::CalculateNode(System.UInt16 nodeID) ---> System.TypeLoadException: Could not load type 'Harmony.Patch[]'.
at (wrapper managed-to-native) System.Reflection.Assembly:InternalGetType (System.Reflection.Module,string,bool,bool)
at System.Reflection.Assembly.GetType (System.String name, Boolean throwOnError, Boolean ignoreCase) [0x00000] in <filename unknown>:0
at System.Reflection.Assembly.GetType (System.String name, Boolean throwOnError) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetDeserializationType (Int64 assemblyId, System.String className) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadType (System.IO.BinaryReader reader, TypeTag code) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadTypeMetadata (System.IO.BinaryReader reader, Boolean isRuntimeObject, Boolean hasTypeInfo) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectInstance (System.IO.BinaryReader reader, Boolean isRuntimeObject, Boolean hasTypeInfo, System.Int64

If i want place crossings then the game will build roads.
Sorry for my bad english.
< >
Showing 1-8 of 8 comments
Spectra  [developer] 8 Mar, 2020 @ 1:57am 
Thanks for the report - I'll take a look
vernmcc 8 Mar, 2020 @ 3:03am 
I have gotten identical errors to Wasnhierlos

Originally posted by wasnhierlos:

The Mod G:\Steam\steamapps\workshop\content\255710\427258853 [0Harmony.dll, Crossings.dll] has caused an error [ModException]

Details:
HarmonyLib.HarmonyException: Patching exception in method System.Void NetNode::CalculateNode(System.UInt16 nodeID) ---> System.InvalidCastException: Cannot cast from source type to destination type.


HarmonyLib.HarmonyException: Patching exception in method System.Void NetNode::CalculateNode(System.UInt16 nodeID) ---> System.TypeLoadException: Could not load type 'Harmony.Patch[]'.
vernmcc 8 Mar, 2020 @ 3:09am 
Just looking at all the different 0Harmony.dll files in different mods, and the others are all 111-122KB, but the one in yours is 700KB.
Spectra  [developer] 8 Mar, 2020 @ 3:19am 
Oh yeah, I probably pushed the debug one. It shouldn't make a huge difference, but let me push a release version and see how we get on
Spectra  [developer] 8 Mar, 2020 @ 3:23am 
Okay, no, that's not it. My guess is that those mods are just using Harmony 1.2 rather than 2.0 - you can check in the Properties tab of the DLL, but the size of the earlier versions is about what you're seeing.
vernmcc 8 Mar, 2020 @ 3:34am 
I have a mix of v2 and v1, the one with yours is the latest, 2.0.0.8 (700KB), a couple of 2.0.0.0 (122KB), and then a couple of 1.2.0.1(111KB) and a 1.2.0.2(119KB)
I have 18 other mods with a version of 0Harmony.dll.
Spectra  [developer] 8 Mar, 2020 @ 4:12pm 
@vernmcc Interesting - could you give me the names of an example of each? If you're already running multiple versions maybe I can still get it going.
Jccali1214 15 May, 2021 @ 7:12pm 
Not sure how to ask for help but this is the error message I got a few weeks ago. Seemed to have been working. But when I click on the button, it still acts like I'm trying to build whichever road I had last selected. Not sure how to decphier this but maybe this will be helpful to resolving the issue I've been having?

The Mod C:\Program Files (x86)\Steam\steamapps\workshop\content\255710\427258853 [CitiesHarmony.API.dll, Crossings.dll] has caused an error [ModException]

Details:
HarmonyLib.HarmonyException: Patching exception in method System.Void NetNode::CalculateNode(System.UInt16 nodeID) ---> System.Runtime.Serialization.SerializationException: Field "methodToken" not found in class HarmonyLib.Patch
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadTypeMetadata (System.IO.BinaryReader reader, Boolean isRuntimeObject, Boolean hasTypeInfo) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectInstance (System.IO.BinaryReader reader, Boolean isRuntimeObject, Boolean hasTypeInfo, System.Int64
< >
Showing 1-8 of 8 comments
Per page: 1530 50