Synthesis-Collective / SynthEBD

Port of zEBD to Mutagen
31 stars 7 forks source link

Patcher crash when patching custom races #57

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hi, another day, another bug!

I'm testing head parts distribution now, for custom races NPCs. Patcher crashes with following error if I add any custom race to "patchable races" in General Settings:

SynthEBD has crashed with the following error:
An object implementing IHandleObservableErrors (often a ReactiveCommand or ObservableAsPropertyHelper) has errored, thereby breaking its observable pipeline. To prevent this, ensure the pipeline does not error, or Subscribe to the ThrownExceptions property of the object in question to handle the erroneous case.
   at ReactiveUI.RxApp.<>c__DisplayClass9_0.<.cctor>b__2() in /_/src/ReactiveUI/RxApp.cs:line 109
   at System.Reactive.Concurrency.Scheduler.Invoke(Action action) in /_/Rx.NET/Source/src/System.Reactive/Concurrency/Scheduler.Simple.cs:line 253
   at System.Reactive.Concurrency.Scheduler.<>c.<Schedule>b__74_0(IScheduler _, Action a) in /_/Rx.NET/Source/src/System.Reactive/Concurrency/Scheduler.Simple.cs:line 37
   at System.Reactive.Concurrency.DispatcherScheduler.<>c__DisplayClass12_0`1.<Schedule>b__0() in /_/src/ReactiveUI.Uwp/Rx/Concurrency/DispatcherScheduler.cs:line 96
   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)

Object reference not set to an instance of an object.
   at SynthEBD.HeightPatcher.AssignRacialHeight(HeightConfig heightConfig, SkyrimMod outputMod) in D:\a\SynthEBD\SynthEBD\SynthEBD\Patcher\Height Patching\HeightPatcher.cs:line 0
   at SynthEBD.Patcher.RunPatcher() in D:\a\SynthEBD\SynthEBD\SynthEBD\Patcher\Patcher.cs:line 132
   at SynthEBD.VM_RunButton.<>c__DisplayClass2_0.<<-ctor>b__0>d.MoveNext() in D:\a\SynthEBD\SynthEBD\SynthEBD\RunButton\VM_RunButton.cs:line 49

I tried creating a new Height Group for the custom race, but it seems that only Core races + Creation Content races are considered for loading...

Edit.: Forgot to say that patcher runs fine with custom races if "Apply Height Changes" is disabled.

Piranha91 commented 2 years ago

I think is is the same as the other recently reported issue. I think I have a fix on my end - will need a day or two to turn it into a release.

Piranha91 commented 2 years ago

Sorry for the week and a half delay - working 2 jobs IRL and it's kicking my butt. Should be fixed in 0.8.3 - please let me know if you still have the issue.

ghost commented 2 years ago

No problem man, take it easy!

The patcher does not crash anymore when running with Apply Height Changes enabled 👍

However, I was checking logs and SSEEdit and noticed two things by chance that are worth mentioning:

  1. NPC logger mentions Height conf being applied, but doesn't mention the actual height value used... It would be nice to have it log the height value too.
  2. Height value in SSEEdit is not what I expected... I have set base female height value for Breton races to be smaller than usual (Base: 0,94 with +- 0,03 and "uniform" distribution mode), and found a Breton NPC with a height of "1.015493". Max height shouldn't have been 0,97? This same NPC also has a specific npc assignment entry, but its height value there is empty.
Piranha91 commented 2 years ago

1) sure, I can add height to the log. No problem.

2) there’s actually 2 places where height is set. Each race has a male and female height that lives in the RACE record. That’s where your global racial heights from SynthEBD go. Then there’s the NPC height that lives in the NPC_ record. I believe the final NPC height in game is the product of the two, so your female Breton should be 0.94 * 1.015.

ghost commented 2 years ago

Ah, thanks for clarifying!

Piranha91 commented 2 years ago

Added height to the log in 0.8.3.3. https://github.com/Synthesis-Collective/SynthEBD/releases/tag/v0.8.3.3. Will close the issue (feel free to reopen if I misunderstood the request).