focustense / easymod

Modding for the modern age.
44 stars 2 forks source link

BOD2 type not expected on versions < 43 #86

Closed rdhughes closed 3 years ago

rdhughes commented 3 years ago

Using the SOS version from https://www.nexusmods.com/skyrimspecialedition/mods/25450

Error is System.ArgumentException: BOD2 type not expected on versions < 43

I confirmed that all form IDs in the esp are 44 as well as running the form ID xedit script against it again to double-confirm.

Full error section from log is:

2021-08-09 16:19:32.429 -05:00 [INF] Reading NPC records from male npc overahul se.esp...
2021-08-09 16:19:32.455 -05:00 [ERR] Exception was not handled
System.ArgumentException: BOD2 type not expected on versions < 43
   at Mutagen.Bethesda.Skyrim.Internals.BodyTemplateBinaryOverlay.CustomFactory(OverlayStream stream, BinaryOverlayFactoryPackage package)
   at Mutagen.Bethesda.Skyrim.Internals.ArmorAddonBinaryOverlay.GetBodyTemplateCustom()
   at Mutagen.Bethesda.Skyrim.Internals.ArmorAddonBinaryOverlay.get_BodyTemplate()
   at Focus.Apps.EasyNpc.Mutagen.MutagenAdapter.<>c.<GetWigInfo>b__42_4(IArmorAddonGetter x)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   at Focus.Apps.EasyNpc.Mutagen.MutagenAdapter.GetWigInfo(INpcGetter npc)
   at Focus.Apps.EasyNpc.Mutagen.MutagenAdapter.ReadNpcRecords(String pluginName, IDictionary`2 cache)
   at Focus.Apps.EasyNpc.Main.LoaderViewModel`1.GetNpcs()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at Focus.Apps.EasyNpc.Main.LoaderViewModel`1.ConfirmPlugins()
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__140_0(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run()
   at Focus.Apps.EasyNpc.App.Main()
focustense commented 3 years ago

I tried both the main files (SOS and non-SOS versions) and couldn't repro the error on either of them.

  1. Are you using the most recent version of the mod?
  2. Are you sure that the ESP is being provided by that mod, and not being shadowed by some patch or something in your overwrite folder?
rdhughes commented 3 years ago

I'm not using MO2.

I've uninstalled and reinstalled in Vortex from the original mod archive.

Using 0.8.8.

If I deselect this mod and ai overhaul (due to dependencies) EasyNPC loads up. Did you test with that or only a base install? Either way, I verified that AI Overhaul (1.6.6, newest) also uses form 44 as does the AI Overhaul patch for this mod.

focustense commented 3 years ago

You always want to avoid patches for NPC overhauls when working with EasyNPC and shouldn't have that AI Overhaul patch enabled anyway. But that's not the main issue, I am 100% positive that the AI Overhaul patch is irrelevant here.

The exception is happening when it tries to load an armor addon. There are only two possibilities. Either:

  1. Your version of the plugin isn't the same as the one that's on Nexus. It's been edited somehow, or possibly overridden by another mod. (Doesn't matter that you don't use MO2, Vortex still has file priorities.) OR

  2. The plugin itself isn't overridden, but some other plugin is providing record or overrides for the armors or armor addons used by the Male NPC Overhaul, and that plugin is lower in your load order. Maybe SOS, maybe something else. Not the AI Overhaul patch, I've already looked at that.

We can check to see if it's the second one if you open up your load order in xEdit, expand both the Armor and Armor Addon records for male npc overahul se.esp, and check if there are any conflicts/overrides. If you see any yellow or red rows under the Armor or Armor Addon sections for that plugin, then whatever the other plugin is could be the problem.

Otherwise, you can upload the ESP itself that's in your Skyrim data folder to the EasyNPC Discord and I can check that. It's a very small plugin. Then we could rule out the first possibility, that you're not getting the plugin you expect.

rdhughes commented 3 years ago

xedit shows nothing overrides either the ARMA or ARMO records used by this. I also tried removing the compatibility patch and the result is the same. Vortex shows that the plugin comes from the main mod archive. Then I uninstalled and deleted the archives and redownloaded everything, still without any change in the error message. So at this point I'm calling it a day and moving on. At some point, my install will eat itself and I'll have to start over. When that happens, I'll rebuild with EasyNPC, dump the various compatibility patches, and let this handle all that and see if the error pops up again. But not today.

focustense commented 3 years ago

I'm duping this for #126. Malformed plugins now (as of upcoming 0.9.5 release) won't block loading the app, although those plugins themselves will not be usable. Making the information clearly visible, and making sure it doesn't cause a crash, is pretty much all I can do for the foreseeable future. This is not a bug in the app - broken mod is the mod author's fault or possibly the fault of some patcher or user edit - but it is a usability issue and #126 fixes the poor usability.