Mutagen-Modding / Spriggit

A tool to facilitate converting Bethesda plugin files to a text based format that can be stored in Git
GNU General Public License v3.0
93 stars 11 forks source link

Spriggit 0.18 suddenly stopped working with strange exception #58

Closed JMPZ11 closed 6 months ago

JMPZ11 commented 6 months ago

Two days ago everthing was fine, and today I can't serializing anything with the same error: System.ArgumentException: Object of type 'Mutagen.Bethesda.Plugins.ModPath' cannot be converted to type 'Mutagen.Bethesda.Plugins.ModPath'.

Looking at the logs, it seems it is pulling a nuget package at runtime (doesn't sound typical) with mismatched version numbers - could that be the cause? I see no configuration option in the json or xml I could use to fix this... so I'm kinda blocked at the moment.

2024-05-21 00:14:13.526 -04:00 [INF] ================================================================
2024-05-21 00:14:13.530 -04:00 [INF] ============== Opening Spriggit v0.18.0+5a68a8cad ==============
2024-05-21 00:14:13.530 -04:00 [INF] ================================================================
2024-05-21 00:14:13.530 -04:00 [INF] 05/21/2024 00:14:13
2024-05-21 00:14:13.530 -04:00 [INF] Start Path: C:\Users\user\Downloads\Spriggit1\Spriggit.exe
2024-05-21 00:14:13.530 -04:00 [INF] Args: 
2024-05-21 00:14:13.533 -04:00 [INF] Loading settings
2024-05-21 00:14:13.534 -04:00 [INF] Loaded settings
2024-05-21 00:14:13.543 -04:00 [INF] Setting Main VM
2024-05-21 00:14:13.543 -04:00 [INF] Set Main VM
2024-05-21 00:14:13.543 -04:00 [INF] Initializing Main VM
2024-05-21 00:14:13.543 -04:00 [INF] Initialized Main VM
2024-05-21 00:15:31.328 -04:00 [INF]   CACHE https://api.nuget.org/v3-flatcontainer/spriggit.yaml.starfield/index.json
2024-05-21 00:15:31.358 -04:00 [INF] Getting first identity for SpriggitMeta { Source = Spriggit.Yaml.Starfield.0.19.0, Release = Starfield }
2024-05-21 00:15:31.362 -04:00 [INF] Cached first identity for SpriggitMeta { Source = Spriggit.Yaml.Starfield.0.19.0, Release = Starfield }: Spriggit.Yaml.Starfield.0.19.0
2024-05-21 00:15:31.364 -04:00 [INF] Constructing entry point for Spriggit.Yaml.Starfield.0.19.0
2024-05-21 00:15:31.365 -04:00 [INF] Finding target framework for C:\Users\user\AppData\Local\Temp\Spriggit\Sources\Spriggit.Yaml.Starfield.0.19.0\Spriggit.Yaml.Starfield.0.19.0\lib
2024-05-21 00:15:31.367 -04:00 [INF] Getting target framework directory for C:\Users\user\AppData\Local\Temp\Spriggit\Sources\Spriggit.Yaml.Starfield.0.19.0\Spriggit.Yaml.Starfield.0.19.0
2024-05-21 00:15:31.367 -04:00 [INF] Framework directory located: C:\Users\user\AppData\Local\Temp\Spriggit\Sources\Spriggit.Yaml.Starfield.0.19.0\Spriggit.Yaml.Starfield.0.19.0\lib\net7.0
2024-05-21 00:15:31.368 -04:00 [INF] Loading plugin: C:\Users\user\AppData\Local\Temp\Spriggit\Sources\Spriggit.Yaml.Starfield.0.19.0\Spriggit.Yaml.Starfield.0.19.0\lib\net7.0\Spriggit.Yaml.Starfield.dll
2024-05-21 00:15:31.376 -04:00 [INF] Retrieving default assembly
2024-05-21 00:15:31.380 -04:00 [INF] Trying to create entry point object
2024-05-21 00:15:31.380 -04:00 [INF] Finding entry point type
2024-05-21 00:15:31.380 -04:00 [INF] Looking for typically named entry point classes
2024-05-21 00:15:31.382 -04:00 [INF] Trying to create simplistic entry point object
2024-05-21 00:15:31.382 -04:00 [INF] Finding simplistic entry point type
2024-05-21 00:15:31.383 -04:00 [INF] Looking for typically named simplistic entry point classes
2024-05-21 00:15:31.383 -04:00 [INF] Cached entry point for Spriggit.Yaml.Starfield.0.19.0
2024-05-21 00:15:35.824 -04:00 [INF] Syncing from Mod to Git. C:\Program Files (x86)\Steam\steamapps\common\Starfield\Data\example.esm -> C:\mods\example
2024-05-21 00:15:35.825 -04:00 [INF] Spriggit version 0.18.0+5a68a8cad
2024-05-21 00:15:35.825 -04:00 [INF] Getting entry point for SpriggitMeta { Source = Spriggit.Yaml.Starfield.0.19.0, Release = Starfield }
2024-05-21 00:15:35.826 -04:00 [INF] Starting to serialize from C:\Program Files (x86)\Steam\steamapps\common\Starfield\Data\example.esm to C:\mods\example.testing with SpriggitMeta { Source = Spriggit.Yaml.Starfield.0.19.0, Release = Starfield }
2024-05-21 00:15:35.851 -04:00 [ERR] Error syncing to Git
System.ArgumentException: Object of type 'Mutagen.Bethesda.Plugins.ModPath' cannot be converted to type 'Mutagen.Bethesda.Plugins.ModPath'.
   at System.RuntimeType.CheckValue(Object& value, ParameterCopyBackAction& copyBack, Binder binder, CultureInfo culture, BindingFlags invokeAttr)
   at System.Reflection.MethodBase.CheckArguments(Span`1 copyOfParameters, IntPtr* byrefParameters, Span`1 shouldCopyBack, ReadOnlySpan`1 parameters, RuntimeType[] sigTypes, Binder binder, CultureInfo culture, BindingFlags invokeAttr)
   at System.Reflection.RuntimeMethodInfo.InvokeWithManyArguments(RuntimeMethodInfo mi, Int32 argCount, Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Spriggit.Core.DynamicEntryPoint.Serialize(ModPath modPath, DirectoryPath outputDir, GameRelease release, IWorkDropoff workDropoff, IFileSystem fileSystem, ICreateStream streamCreator, SpriggitSource meta, CancellationToken cancel) in D:\a\Spriggit\Spriggit\Spriggit.Core\DynamicEntryPoint.cs:line 29
   at Spriggit.Engine.AssemblyLoadedEntryPoint.Serialize(ModPath modPath, DirectoryPath outputDir, GameRelease release, IWorkDropoff workDropoff, IFileSystem fileSystem, ICreateStream streamCreator, SpriggitSource meta, CancellationToken cancel) in D:\a\Spriggit\Spriggit\Spriggit.Engine\AssemblyLoadedEntryPoint.cs:line 33
   at Spriggit.Engine.SpriggitEngine.Serialize(FilePath bethesdaPluginPath, DirectoryPath outputFolder, SpriggitMeta meta, CancellationToken cancel) in D:\a\Spriggit\Spriggit\Spriggit.Engine\SpriggetEngine.cs:line 43
   at Spriggit.UI.ViewModels.Transient.LinkVm.SyncToGit(CancellationToken cancel) in D:\a\Spriggit\Spriggit\Spriggit.UI\ViewModels\Transient\LinkVm.cs:line 211
2024-05-21 00:15:51.671 -04:00 [INF] Disposing container
JMPZ11 commented 6 months ago

I was able to get around this by using the custom export type,"Spriggit.Yaml.Starfield" as package name, "0.18.0" as version.

the case has to match or you get a strange error

JMPZ11 commented 6 months ago

Update: yaml to esm doesn't work at all if the custom provider is used (or non-latest version is selected) - in both 0.18 and 0.19 codebase, however both versions can read the yaml correctly with no special options applied. so, looks like I cna use 0.19, but will need two separate entries (since the 0.19 starfield model is nerfed)

Noggog commented 6 months ago

Opening Spriggit v0.18.0+5a68a8cad

Until spriggit stabilizes on 1.0, I'd recommend updating the UI/CLI exe itself to the newest versions when possible. See if it does better. Still a few improvements to be made so that the UI/CLI doesn't need to be so aggressively updated on every release

JMPZ11 commented 6 months ago

Once I figure out how to get it to build I should be able to stop bugging you so much - VS2022 gives one error, vscode gives a different one altogether lol.

JMPZ11 commented 6 months ago

Upgraded to spriggit 0.19.0 UI and changed to use 0.18.0 model; problems solved. Thanks!

JMPZ11 commented 6 months ago

FYI - 0.19.0 is now working fine with the latest model. Thanks!

DJLegends1011 commented 5 months ago

hmm gotten this same issue but for 0.24 any help would be great