CitiesSkylinesMods / HideCrosswalks

MIT License
8 stars 3 forks source link

crashes because incompatible mod patches NetNode.RenderInstance #9

Closed kianzarrin closed 2 years ago

kianzarrin commented 4 years ago

@raethegit 4 hours ago Of course. Murphy's Law kicked in and I couldn't "deliberately" get the game to actually crash with both mods activated, but I managed to get a log of Hide Crossings disabled, where everything runs smooth (but doesn't look as good/desired) and one with Hide Crossings enabled, where unpausing after load changes the button but the simulation doesn't start running. Also, most UI stuff didn't work like changing lane arrows in TMPE or bulldozing anything. Log w/out Hide Crossings [ufile.io] Log with Hide Crossings [ufile.io]
raethegit 5 hours ago So, for now i deduce this said incompatibility exists and seems to be only triggered by certain circumstances like either OS, installed assets, mods, or even the hardware, or any combination of that... which will probably and hopefully be revealed by the output log. raethegit 5 hours ago @Albeo I don't have Bonjour on my Linux machine I never got any indications that Hide Crosswalks or Remove Need For Pipes was actually in any way related to those crashes, they both work(ed) just fine and as expected. I just very frequently got those ominous crashes to desktop right after loading or unpausing a game so I did some random search on the workshop to see if there might be known issues for some of the installed mods, assets, etc, and that is when I came across Duplicate Assembly Scanner which described the exact behaviour and the possible reason for that. For verification, I have now temporarily unsubscribed from Hide Crosswalks, as it is "only" for cosmetics and doesn't influence functionality. Now the game runs much more stable and is way more responsive additionally to being playable much faster after loading. To not distort the result I deliberately changed nothing else than unsubscribing from HC. I'll try to resubscribe so I can get a fresh output log later. aubergine18 6 hours ago @raethegit Share your output_log.txt so we can see what actual error is. Albreo 7 hours ago @LemonsterOG I second this. @raethegit Try to get rid of Bonjour if you have one on your computer. I'm trying to confirm if it's related to my crash. LemonsterOG 8 hours ago @raethegit -- I use both this mod and Remove Need for Pipes without issue. You must have some other mod(s) conflicting. raethegit 8 hours ago I have experienced "instant crashes" a lot lately and just now found the Duplicate Assembly Scanner in the workshop, so i gave it a shot. Turns out this mod and Remove Need For Pipes are conflicting as they use the same method from different Harmony versions (yours v2.0.0, Remove Need For Pipes v1.2.0) which is said to be a very probable cause of those crashes. Just wanted to give a heads up on this as both mods add a lot of value to gameplay for me, and did the same over at the Remove Need For Pipes mod. Still want to leave a big thanks for your work! :) player-1.log player-2.log

kianzarrin commented 4 years ago

I did not manage to reproduce the problem using remove need for pipeline and HideTMPECrosswalks mods.

This catched my attention:

@raethegit Duplicate Assembly Scanner in the workshop, so i gave it a shot. Turns out this mod and Remove Need For Pipes are conflicting as they use the same method from different Harmony versions (yours v2.0.0, Remove Need For Pipes v1.2.0) which is said to be a very probable cause of those crashes.

From theoutput log we I see NetNode.RenderInstance is having format exception only when unpatching which is what I would expect to get because of https://github.com/boformer/NetworkSkins2/blob/master/README.md

at Harmony.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, Harmony.PatchInfo patchInfo, System.String instanceID) [0x00000] in :0 at Harmony.PatchProcessor.Unpatch (System.Reflection.MethodInfo patch) [0x00000] in :0 at Harmony.HarmonyInstance.Unpatch (System.Reflection.MethodBase original, System.Reflection.MethodInfo patch) [0x00000] in :0 at Harmony.HarmonyInstance+<>c__DisplayClass11_1.b__3 (Harmony.Patch patchInfo) [0x00000] in :0 at Harmony.CollectionExtensions.Do[Patch] (IEnumerable1 sequence, System.Action1 action) [0x00000] in :0 at Harmony.CollectionExtensions.DoIf[Patch] (IEnumerable1 sequence, System.Func2 condition, System.Action`1 action) [0x00000] in :0 at Harmony.HarmonyInstance.UnpatchAll (System.String harmonyID) [0x00000] in :0 at AchieveIt.ModInfo.OnDisabled () [0x00000] in :0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0 Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in :0 at ColossalFramework.Plugins.PluginManager+PluginInfo.Unload () [0x00000] in :0 UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object) UnityEngine.DebugLogHandler:LogException(Exception, Object) UnityEngine.Logger:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) ColossalFramework.Plugins.PluginInfo:Unload() ColossalFramework.Plugins.PluginManager:OnDestroy()

(Filename: Line: -1)



I did not get this exception when I tried it my self.
kianzarrin commented 4 years ago

Turns out this mod and Remove Need For Pipes are conflicting as they use the same method from different Harmony versions (yours v2.0.0, Remove Need For Pipes v1.2.0)

Remove Need For Pipes does not patch NetNode.RenderInstance so that is not a problem.

kianzarrin commented 4 years ago

@raethegit I need you to help me hunt down this bug. I am unable to reproduce it. Can you please: