SineSwiper / RimWorld-XenobionicPatcher

Fix surgical operations to work with all of your bionics, implants, animals, humans, aliens
Artistic License 2.0
4 stars 3 forks source link

Null Reference Exception during surgery cleanup #4

Closed GaryShem closed 3 years ago

GaryShem commented 4 years ago

Logs: https://gist.github.com/ee1132c185069cdaa15e4b88eec4f3d7 Mods: https://pastebin.com/AGFTn4ND

Relevant error message: [HugsLib][ERR] XenobionicPatcher caused an exception during OnDefsLoaded: System.NullReferenceException: Object reference not set to an instance of an object at XenobionicPatcher.DefInjectors+<>c__DisplayClass3_0.b__2 (Verse.ThingDef t) [0x00000] in <16fe538dc8364748b470ab7ec3fa388f>:0 at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable1[T] source, System.Func2[T,TResult] predicate) [0x0002c] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at XenobionicPatcher.DefInjectors.CleanupSurgeryRecipes (System.Collections.Generic.List1[T] surgeryList, System.Collections.Generic.List1[T] pawnList) [0x00111] in <16fe538dc8364748b470ab7ec3fa388f>:0 at XenobionicPatcher.Base.DefsLoaded () [0x00f29] in <16fe538dc8364748b470ab7ec3fa388f>:0 at HugsLib.HugsLibController.OnDefsLoaded () [0x0001a] in <16781bf8b2ce4f1e84cb63572631a10b>:0

SineSwiper commented 3 years ago

I might have a fix for the NullReferenceException, though I'm not sure which mod would cause it. If this is still a problem, we could try out a new DLL to see if it works.

SineSwiper commented 3 years ago

There is a new DLL if you want to try it out:

https://github.com/SineSwiper/RimWorld-XenobionicPatcher/blob/master/1.2/Assemblies/XenobionicPatcher.dll

SineSwiper commented 3 years ago

Fixed in 1.1.9.

GaryShem commented 3 years ago

I'll give it a try in a few days, though I'm not sure I'll be able to duplicate my mod setup from when I had it last.