KongMD-Steam / QuestionableEthicsEnhanced

The source code of the Questionable Ethics Enhanced mod for RimWorld.
MIT License
12 stars 7 forks source link

Cannot extract clone from vat #115

Closed gdunstone closed 4 years ago

gdunstone commented 4 years ago

Describe the bug I cannot extract a finished human clone from a vat. I have a sample size of 1 for this bug right now, but I will try again after posting this issue and will update in a comment.

Expected behavior Clone to be successfully extracted from vat.

To Reproduce Make a clone. Try to extract

This is the exception:

Error while generating pawn. Rethrowing. Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.PawnApparelGenerator+PossibleApparelSet.Add (RimWorld.ThingStuffPair pair) [0x00065] in <007078bc0b7949ab9a6f7005650e4005>:0 
  at RimWorld.PawnApparelGenerator.GenerateWorkingPossibleApparelSetFor (Verse.Pawn pawn, System.Single money, System.Collections.Generic.List`1[T] apparelCandidates) [0x000a6] in <007078bc0b7949ab9a6f7005650e4005>:0 
  at RimWorld.PawnApparelGenerator.GenerateStartingApparelFor (Verse.Pawn pawn, Verse.PawnGenerationRequest request) [0x00148] in <007078bc0b7949ab9a6f7005650e4005>:0 
  at Verse.PawnGenerator.GenerateGearFor (Verse.Pawn pawn, Verse.PawnGenerationRequest request) [0x00000] in <007078bc0b7949ab9a6f7005650e4005>:0 
  at Verse.PawnGenerator.TryGenerateNewPawnInternal (Verse.PawnGenerationRequest& request, System.String& error, System.Boolean ignoreScenarioRequirements, System.Boolean ignoreValidator) [0x0065f] in <007078bc0b7949ab9a6f7005650e4005>:0 
  at Verse.PawnGenerator.GenerateNewPawnInternal (Verse.PawnGenerationRequest& request) [0x00096] in <007078bc0b7949ab9a6f7005650e4005>:0 
  at Verse.PawnGenerator.GenerateOrRedressPawnInternal (Verse.PawnGenerationRequest request) [0x00183] in <007078bc0b7949ab9a6f7005650e4005>:0 
  at Verse.PawnGenerator.GeneratePawn (Verse.PawnGenerationRequest request) [0x00000] in <007078bc0b7949ab9a6f7005650e4005>:0 
Verse.Log:Error(String, Boolean)
Verse.PawnGenerator:GeneratePawn(PawnGenerationRequest)
QEthics.GenomeUtility:MakePawnFromGenomeSequence(GenomeSequence, Thing)
QEthics.Building_PawnVatGrower:TryMakeClone()
QEthics.Building_PawnVatGrower:Tick_Crafting()
QEthics.Building_GrowerBase:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

And another always appears after:

RandomElementByWeight with totalWeight=0 - use TryRandomElementByWeight.
Verse.Log:Error(String, Boolean)
Verse.GenCollection:RandomElementByWeight(IEnumerable`1, Func`2)
RimWorld.PawnApparelGenerator:GenerateWorkingPossibleApparelSetFor(Pawn, Single, List`1)
RimWorld.PawnApparelGenerator:GenerateStartingApparelFor(Pawn, PawnGenerationRequest)
Verse.PawnGenerator:GenerateGearFor(Pawn, PawnGenerationRequest)
Verse.PawnGenerator:TryGenerateNewPawnInternal(PawnGenerationRequest&, String&, Boolean, Boolean)
Verse.PawnGenerator:GenerateNewPawnInternal(PawnGenerationRequest&)
Verse.PawnGenerator:GenerateOrRedressPawnInternal(PawnGenerationRequest)
Verse.PawnGenerator:GeneratePawn(PawnGenerationRequest)
QEthics.GenomeUtility:MakePawnFromGenomeSequence(GenomeSequence, Thing)
QEthics.Building_PawnVatGrower:TryMakeClone()
QEthics.Building_PawnVatGrower:Tick_Crafting()
QEthics.Building_GrowerBase:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()
gdunstone commented 4 years ago

I tried to grow another clone and this one worked. Seems like something to do with upgrading the game or the mod while a clone was growing.