Synthesis-Collective / SynthEBD

Port of zEBD to Mutagen
31 stars 7 forks source link

Crash when BodySlide assignments are changed #105

Closed Gawdzila closed 1 year ago

Gawdzila commented 1 year ago

Having a crash in 0.9.7.

I have run the patcher just fine several times, but I got a crash when I went to change the specific BodySlide assignment of the NPC Gerdur. The crash log is below. The last line of the log window when it crashed said that the verbose log for Gerdur would not be written because it was blank. I then tried to change the BodySlide assignment for Ysolda and got another crash. Ditto for Olfina. So it seems like I can have BodySlide assignments, but I can no longer change them.

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 98
   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)

Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at SynthEBD.AssetSelector.GenerateCombination(NPCInfo npcInfo, AssignmentIteration iterationInfo) in D:\a\SynthEBD\SynthEBD\SynthEBD\Patcher\Asset Patching\AssetSelector.cs:line 360
   at SynthEBD.AssetAndBodyShapeSelector.GenerateCombinationWithBodyShape(HashSet`1 availableAssetPacks, BodyGenConfigs bodyGenConfigs, Settings_OBody oBodySettings, NPCInfo npcInfo, AssetPackAssignmentMode mode, List`1 previousAssignments) in D:\a\SynthEBD\SynthEBD\SynthEBD\Patcher\Shared\AssetAndBodyShapeSelector.cs:line 179
   at SynthEBD.AssetAndBodyShapeSelector.ChooseCombinationAndBodyShape(Boolean& assetsAssigned, Boolean& bodyShapeAssigned, HashSet`1 availableAssetPacks, BodyGenConfigs bodyGenConfigs, Settings_OBody oBodySettings, NPCInfo npcInfo, AssetPackAssignmentMode mode, List`1 previousAssignments) in D:\a\SynthEBD\SynthEBD\SynthEBD\Patcher\Shared\AssetAndBodyShapeSelector.cs:line 133
   at SynthEBD.Patcher.MainLoop(IEnumerable`1 npcCollection, Boolean skipLinkedSecondaryNPCs, ISkyrimMod outputMod, CategorizedFlattenedAssetPacks sortedAssetPacks, BodyGenConfigs bodyGenConfigs, Settings_OBody oBodySettings, HeightConfig currentHeightConfig, Settings_Headparts headPartSettings, HashSet`1 generatedLinkGroups, HashSet`1 skippedLinkedNPCs, Keyword synthEBDFaceKW, Keyword EBDFaceKW, Keyword EBDScriptKW, FacePartCompliance facePartComplianceMaintainer, HashSet`1 headPartNPCs) in D:\a\SynthEBD\SynthEBD\SynthEBD\Patcher\Patcher.cs:line 516
   at SynthEBD.Patcher.RunPatcher() in D:\a\SynthEBD\SynthEBD\SynthEBD\Patcher\Patcher.cs:line 296
   at SynthEBD.VM_RunButton.<>c__DisplayClass7_0.<<-ctor>b__0>d.MoveNext() in D:\a\SynthEBD\SynthEBD\SynthEBD\RunButton\VM_RunButton.cs:line 76

SynthEBD Version: 0.9.7

Run Mode: Standalone

Patcher Settings Creation Log:
Found settings source path at I:\Game Mods\Skyrim SE Mods\Tools\SynthEBD\Settings\SettingsSource.json
Source Settings: 
Load Settings from Portable Folder: False
Portable Folder Location: 

Patcher Environment Creation Log:
Found environment source path at I:\Game Mods\Skyrim SE Mods\Tools\SynthEBD\Settings\EnvironmentSource.json
Source Settings: 
Skyrim Version: SkyrimVR
Game Environment Directory: D:\Bethesda\Skyrim VR\Data

Patcher State:
Main Settings:
Validation Disabled: False
Apply Assets: True
Apply BodyShapes via: BodySlide
Apply BodySlides via: AutoBody
Apply Height: True
Apply Head Parts: False
Use Consistency: True
Mod Manager Type: ModOrganizer2
MO2 Path exists
Mod Folder exists
Primary Config Files
    ALT2 CBBE 4K Compressed
    Bijin Skins 4K CBBE
    Bits n Pieces Skin (F)
    Demoniac 4K CBBE
    FA Dibellan 4K
    Mature Skin CBBE HD
    Realore Skin Ultima V2.1.1
    Tempered Skins for Females CBBE
    Tempered Skins for Males - SOS
    True Daughters of Skyrim
    Vitruvia Skins SOS 2K
MixIn Config Files
    Tempered Subsurface Maps
    Toned & Shapely Body for CBBE and 3BA
Male BodyGen Configs
Female BodyGen Configs
Male BodySlides: 21 (14) annotated
Female BodySlides: 158 (124) annotated
Height Configs: 1
Eyebrows: 0 HeadParts
Eyes: 0 HeadParts
Face: 0 HeadParts
FacialHair: 0 HeadParts
Hair: 0 HeadParts
Misc: 0 HeadParts
Scars: 0 HeadParts

Current NPC: Gerdur | Gerdur | 01347C:Skyrim.esm
Piranha91 commented 1 year ago

Just to clarify, the actual crash happened when you ran the patcher, not when you changed the bodyslide assignment, correct? Also, is the crash reproducible? If you run the patcher again, does it crash on Gerdur again? If yes, can you add Gerdur to the Verbose Mode for Specific NPCs list in the General Settings menu, run the patcher again, and upload her verbose log after the crash?

Gawdzila commented 1 year ago

Correct, it crashes when the patcher is run, and yes, it crashes every time on whichever NPC I change BodySlides for (or at least the three that I tried).

Here is the verbose log:

Gerdur Gerdur 01347C_Skyrim.esm.txt

Gawdzila commented 1 year ago

Also, in retrospect this seems perhaps like an obvious workaround, but I've found that if I clear the consistency entry for the NPC then it will patch without crashing.

Piranha91 commented 1 year ago

Thanks! Caught two bugs for the price of one bug report. Should be fixed in 0.9.7.1. Oddly enough, I had a hard time figuring this one out because your stack trace points to the wrong line causing the crash. I was puzzling over it for quite a while before trying to replicate what you did and crashing myself, this time with the stack trace pointing to the correct culprit. No idea why it behaved like that.

Gawdzila commented 1 year ago

Great work, it appears to be fixed for me! Happy to help! 😁