SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

Better Artisan Good Icons is not compat with SMAPI 3.6

ZaneYork opened this issue ยท 3 comments

commented

This bug might be caused by rewrite logic not compat with generic type such as Traverse<>.

Here is the trace log:

[11:14:51 ERROR SMAPI]       - Better Artisan Good Icons 2.0.0 because its DLL couldn't be loaded.
[11:14:51 TRACE SMAPI]         (Error: System.AggregateException: One or more errors occurred. ---> System.TypeLoadException: Could not load type 'HarmonyLib.Traverse`1<!!0>' from assembly '0Harmony, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null'.
  at (wrapper managed-to-native) System.Type.internal_from_name(string,bool,bool)
  at System.Type.GetType (System.String typeName, System.Boolean throwOnError, System.Boolean ignoreCase) [0x0002b] in <d4a23bbd2f544c30a48c44dd622ce09f>:0 
  at System.Type.GetType (System.String typeName, System.Boolean throwOnError) [0x00000] in <d4a23bbd2f544c30a48c44dd622ce09f>:0 
  at StardewModdingAPI.Framework.ModLoading.Rewriters.Harmony1AssemblyRewriter.GetMappedType (Mono.Cecil.TypeReference type) [0x00057] in <da819bc19a3442c990664a9bcd5c38bb>:0 
  at StardewModdingAPI.Framework.ModLoading.Rewriters.Harmony1AssemblyRewriter.Handle (Mono.Cecil.ModuleDefinition module, Mono.Cecil.TypeReference type, System.Action`1[T] replaceWith) [0x0002f] in <da819bc19a3442c990664a9bcd5c38bb>:0 
  at StardewModdingAPI.Framework.ModLoading.AssemblyLoader+<>c__DisplayClass13_0.<RewriteAssembly>b__0 (Mono.Cecil.TypeReference type, System.Action`1[T] replaceWith) [0x00011] in <da819bc19a3442c990664a9bcd5c38bb>:0 
  at StardewModdingAPI.Framework.ModLoading.Framework.RecursiveRewriter.RewriteTypeReference (Mono.Cecil.TypeReference type, System.Action`1[T] replaceWith) [0x00028] in <da819bc19a3442c990664a9bcd5c38bb>:0 
  at StardewModdingAPI.Framework.ModLoading.Framework.RecursiveRewriter.RewriteMethodReference (Mono.Cecil.MethodReference methodRef) [0x0003c] in <da819bc19a3442c990664a9bcd5c38bb>:0 
  at StardewModdingAPI.Framework.ModLoading.Framework.RecursiveRewriter.RewriteInstruction (Mono.Cecil.Cil.Instruction instruction, Mono.Cecil.Cil.ILProcessor cil, System.Action`1[T] replaceWith) [0x0009e] in <da819bc19a3442c990664a9bcd5c38bb>:0 

commented

SMAPI 3.6 seems to load Better Artisan Good Icons 1.5 fine. I don't see a 2.0 download on its mod page?

commented

SMAPI 3.6 seems to load Better Artisan Good Icons 1.5 fine. I don't see a 2.0 download on its mod page?

I built it's develop branch for 2.0.0 version.
It is a strange thing that there is no Traverse reference,but has this type reference in assemblies.

commented

The mod uses Traverse in DrawPatch.Prefix.

Since it's in unreleased code, I don't think we need to add rewriting for it; SMAPI 3.6 will probably release before that code goes live, in which case it's not really an issue. The rewriting is only meant to prevent released mods from breaking, it's not meant to rewrite all possible Harmony code.