Quistar-LAB / TreeAnarchy

Tree Anarchy. This is a rewrite of the original Unlimited Trees mod in order for tree snapping to function
MIT License
3 stars 1 forks source link

Exception thrown on startup #12

Closed originalfoo closed 2 years ago

originalfoo commented 2 years ago

Note: This only started happening after update on 5th Dec 2021.

When the mod is loaded it's throwning an exception which is breifly visible on the main menu screen but then disappears as soon as city loading screen appears.

ArgumentException: Label not marked
  at System.Reflection.Emit.ILGenerator.label_fixup () [0x00000] in <filename unknown>:0 
  at System.Reflection.Emit.DynamicMethod.CreateDynMethod () [0x00000] in <filename unknown>: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 <filename unknown>: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 <filename unknown>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at MonoMod.RuntimeDetour.Platforms.DetourRuntimeMonoPlatform.GetMethodHandle (System.Reflection.MethodBase method) [0x00000] in <filename unknown>:0 
  at MonoMod.RuntimeDetour.Platforms.DetourRuntimeILPlatform.Pin (System.Reflection.MethodBase method) [0x00000] in <filename unknown>:0 
  at MonoMod.RuntimeDetour.DetourHelper.Pin[MethodInfo] (System.Reflection.MethodInfo method) [0x00000] in <filename unknown>:0 
  at HarmonyLib.MethodPatcher.CreateReplacement (System.Collections.Generic.Dictionary`2& finalInstructions) [0x00000] in <filename unknown>:0 
  at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00000] in <filename unknown>:0 
  at HarmonyLib.PatchProcessor.Patch () [0x00000] in <filename unknown>:0 
  at HarmonyLib.Harmony.Patch (System.Reflection.MethodBase original, HarmonyLib.HarmonyMethod prefix, HarmonyLib.HarmonyMethod postfix, HarmonyLib.HarmonyMethod transpiler, HarmonyLib.HarmonyMethod finalizer) [0x00000] in <filename unknown>:0 
  at TreeAnarchy.TAPatcher.EnableTreeInstancePatch (HarmonyLib.Harmony harmony) [0x00000] in <filename unknown>:0 
  at TreeAnarchy.TAPatcher.EnableCore () [0x00000] in <filename unknown>:0 
  at CitiesHarmony.API.HarmonyHelper.DoOnHarmonyReady (System.Action action) [0x00000] in <filename unknown>:0 
  at TreeAnarchy.TAMod.OnEnabled () [0x00000] in <filename unknown>: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 <filename unknown>: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 <filename unknown>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at ColossalFramework.Plugins.PluginManager.AddPlugins (System.Collections.Generic.Dictionary`2 plugins) [0x00000] in <filename unknown>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
ColossalFramework.Plugins.PluginManager:AddPlugins(Dictionary`2)
ColossalFramework.Plugins.PluginManager:LoadPlugins()
Starter:Awake()

Will try and attach log file, but it's pretty huge...

originalfoo commented 2 years ago

output_log.zip

Quistar-LAB commented 2 years ago

I had a look at the error, and it’s a label fixup error that usually occurs when my tranpilers fails to patch the game. It’s a bit difficult to track this, but could you first confirm that we have the same Cities Skylines version? (1.13.3-f9)

If we’re on the same version, I’ll create another debug version for you to test with all the debug information enabled, which can help track down which transpiler caused the issue

Simon Ueng Oceanpeak Group Limited

From: @.> Sent: Monday, December 6, 2021 2:54 AM To: @.> Cc: @.***> Subject: Re: [Quistar-LAB/TreeAnarchy] Exception thrown on startup (Issue #12)

output_log.ziphttps://github.com/Quistar-LAB/TreeAnarchy/files/7656592/output_log.zip

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/Quistar-LAB/TreeAnarchy/issues/12#issuecomment-986281612, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATT6DF4F4IBEEXVLMQDECODUPOYPJANCNFSM5JNCUPJQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

originalfoo commented 2 years ago

Yes, I'm on latest f9 Steam version.

I got another error once the level loaded about Klyte's Prop Replacer mod, not sure if that's related? Posted full log in a zip in comment above.

originalfoo commented 2 years ago
System.Exception: Tree Anarchy detected incompatible mods, please remove the following mentioned mods as the same functionality is already built into this mod ---> System.Exception: 
[Prop Switcher]detected. This mod is incompatible with Tree Anarchy

  --- End of inner exception stack trace ---
Quistar-LAB commented 2 years ago

Yes Prop Switcher is incompatible

Sent from my Galaxy

-------- Original message -------- From: Aubergine @.> Date: 12/6/21 03:59 (GMT+08:00) To: Quistar-LAB/TreeAnarchy @.> Cc: Simon Ueng @.>, Comment @.> Subject: Re: [Quistar-LAB/TreeAnarchy] Exception thrown on startup (Issue #12)

Yes, I'm on latest f9 Steam version.

I got another error once the level loaded about Klyte's Prop Replacer mod, not sure if that's related? Posted full log in a zip in comment above.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Quistar-LAB/TreeAnarchy/issues/12#issuecomment-986290677, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATT6DF7CDNSR3Y7WDT4OZGDUPPABRANCNFSM5JNCUPJQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

originalfoo commented 2 years ago

Removing prop switcher mod resolved the error.