rtxyd / RealFactionGuest

MIT License
0 stars 0 forks source link

Factionfilter sometimes null object exception #6

Closed rtxyd closed 3 weeks ago

rtxyd commented 3 weeks ago
rror while generating pawn. Rethrowing. Exception: System.TypeInitializationException: The type initializer for 'EventController_rQP.FactionFilter_Init' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object
[Ref B2635F87]
 at <0x14729698ed0 + 0x00d76> <unknown method>
   --- End of inner exception stack trace ---
[Ref 7C39BE0D]
 at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
 at EventController_rQP.FactionFilter_Work.FactionFilter (Verse.Pawn& pawn, RimWorld.FactionDef& factionType) [0x000a4] in <6469cd661ee541beb844981b0293c78e>:0 
 at EventController_rQP.EventController_Work.Prefix_GiveAppropriateBioAndNameTo (Verse.Pawn& pawn, RimWorld.FactionDef& factionType) [0x00001] in <6469cd661ee541beb844981b0293c78e>:0 
 at RimWorld.PawnBioAndNameGenerator.GiveAppropriateBioAndNameTo (Verse.Pawn pawn, RimWorld.FactionDef factionType, Verse.PawnGenerationRequest request, RimWorld.XenotypeDef xenotype) [0x0001c] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0 
     - PREFIX EventController_rQP: Void EventController_rQP.EventController_Work:Prefix_GiveAppropriateBioAndNameTo(Pawn& pawn, FactionDef& factionType)
     - POSTFIX EventController_rQP: Void EventController_rQP.EventController_Work:Postfix_GiveAppropriateBioAndNameTo()
 at Verse.PawnGenerator.TryGenerateNewPawnInternal (Verse.PawnGenerationRequest& request, System.String& error, System.Boolean ignoreScenarioRequirements, System.Boolean ignoreValidator) [0x00423] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0 
     - TRANSPILER rimworld.erdelf.alien_race.main: IEnumerable`1 AlienRace.HarmonyPatches:TryGenerateNewPawnInternalTranspiler(IEnumerable`1 instructions)
     - PREFIX rimworld.erdelf.alien_race.main: Void AlienRace.HarmonyPatches:TryGenerateNewPawnInternalPrefix(PawnGenerationRequest& request)
     - PREFIX SineSwiper.FactionBlender: Void FactionBlender.HarmonyPatches:TryGenerateNewPawnInternal_Patch(PawnGenerationRequest& request)
     - POSTFIX com.NewRatkin.rimworld.mod: Void NewRatkin.PawnGeneratorPatch:Postfix(Pawn __result)
     - POSTFIX RH_PawnKindSkills: Void RH_PawnKindSkills.PawnGenerator_TryGenerateNewPawnInternal_Patch:Postfix(Pawn __result)
 at Verse.PawnGenerator.GenerateNewPawnInternal (Verse.PawnGenerationRequest& request) [0x000c1] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0 
     - PREFIX EventController_rQP: Void EventController_rQP.EventController_Work:Prefix_GenerateNewPawnInternal(PawnGenerationRequest& request)
     - POSTFIX OskarPotocki.VFECore: Void VFECore.Abilities.PawnGen_Patch:Postfix(Pawn __result)
     - POSTFIX OskarPotocki.VanillaPsycastsExpanded: Void VanillaPsycastsExpanded.PawnGen_Patch:Postfix(Pawn __result, PawnGenerationRequest request)
     - POSTFIX EventController_rQP: Void EventController_rQP.EventController_Work:Postfix_GenerateNewPawnInternal()
 at Verse.PawnGenerator.GenerateOrRedressPawnInternal (Verse.PawnGenerationRequest request) [0x00194] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0 
     - PREFIX EventController_rQP: Void EventController_rQP.EventController_Work:Prefix_GenerateOrRedressPawnInternal(PawnGenerationRequest& request)
 at Verse.PawnGenerator.GeneratePawn (Verse.PawnGenerationRequest request) [0x00070] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0 
     - PREFIX raceQuestPawn: Void raceQuestPawn.patch_PawnGenerator_GeneratePawn:Prefix(PawnGenerationRequest& request)
     - PREFIX rimworld.gguake.rpef: Boolean RPEF.HarmonyPatches:PawnGenerator_GeneratePawn_Prefix(PawnGenerationRequest& request)
     - PREFIX SmashPhil.VehicleFramework: Boolean Vehicles.Construction:GenerateVehiclePawn(PawnGenerationRequest request, Pawn& __result)
     - PREFIX rimworld.erdelf.alien_race.main: Void AlienRace.HarmonyPatches:GeneratePawnPrefix(PawnGenerationRequest& request)
     - POSTFIX rimworld.erdelf.alien_race.main: Void AlienRace.HarmonyPatches:GeneratePawnPostfix(Pawn __result)
     - POSTFIX VFEPirates.Mod: Void VFEPirates.PawnGenerator_GeneratePawn_Patch:Postfix(Pawn __result)
     - POSTFIX Cabbage.RimCities: Void Cities.PawnGenerator_GeneratePawn:Postfix(Pawn& __result)
     - POSTFIX fxz.glitterworldDestroyer: Void MechFusion.PawnGenerator_Patch:AddHediffIfConditionMet(Pawn& __result, PawnGenerationRequest request)
     - POSTFIX Ancot.MiliraRaceHarmonyPatch: Void Milira.Milira_MilianPawnGenerator_Patch:Postfix(Pawn& __result, PawnGenerationRequest request)
     - POSTFIX rimworld.mod.HellsingArmsUltimate: Void HellsingArmsUltimate.HarmonyPatches.HSAU_PawnGenerationRequest_Postfix:Postfix(PawnGenerationRequest request, Pawn __result)
     - POSTFIX AOBA.TheDeadManSwitch: Void DMS.Patch_GeneratePawnTitle:Postfix(Pawn& __result) 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)
rtxyd commented 3 weeks ago

now not compatible with Vanilla Factions Expanded - Insectoids 2 , I am trying to figure out what happened.

rtxyd commented 3 weeks ago

Add null check when traverse vanilla factions see f13f78003e1b9a366395410125a43c6a4fb78726