Ludeon Forums

RimWorld => Mods => Topic started by: Bombcat2015 on December 09, 2020, 11:10:04 AM

Title: Melanin? A strange error involving pawn generation and events - HELP! :)
Post by: Bombcat2015 on December 09, 2020, 11:10:04 AM
I have an error.  Everything works fine 45% of the time.  Any group involving a pawn (ie raid, caravan, visitor group etc) has the chance of spawning a smaller group than requested or not spawning any pawns at all...occasionally there will be no associated error.  I have been driving myself nuts trying to figure this out...I hope someone can help!  Thank you in advance.

HUGSLIB LOG:
https://gist.github.com/HugsLibRecordKeeper/9e9ae3fe4105ce0fa57f6bf861a15007

Error itself:
Error while generating pawn. Rethrowing. Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.ChildRelationUtility.GetMelanin (Verse.Pawn pawn, System.Nullable`1[T] request) [0x0001c] in <6326ac03f61f45efb3178f3bfd084139>:0
  at RimWorld.ChildRelationUtility.ChanceOfBecomingChildOf (Verse.Pawn child, Verse.Pawn father, Verse.Pawn mother, System.Nullable`1[T] childGenerationRequest, System.Nullable`1[T] fatherGenerationRequest, System.Nullable`1[T] motherGenerationRequest) [0x000bd] in <6326ac03f61f45efb3178f3bfd084139>:0
  at RimWorld.PawnRelationWorker_Sibling.GenerationChance (Verse.Pawn generated, Verse.Pawn other, Verse.PawnGenerationRequest request) [0x0002f] in <6326ac03f61f45efb3178f3bfd084139>:0
  at Verse.PawnGenerator+<>c__DisplayClass34_0.<GeneratePawnRelations>b__1 (Verse.Pair`2[T1,T2] x) [0x00025] in <6326ac03f61f45efb3178f3bfd084139>:0
  at Verse.GenCollection.RandomElementByWeightWithDefault[T] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] weightSelector, System.Single defaultValueWeight) [0x00030] in <6326ac03f61f45efb3178f3bfd084139>:0
  at Verse.PawnGenerator.GeneratePawnRelations (Verse.Pawn pawn, Verse.PawnGenerationRequest& request) [0x000e7] in <6326ac03f61f45efb3178f3bfd084139>:0
  at (wrapper dynamic-method) Verse.PawnGenerator.Verse.PawnGenerator.TryGenerateNewPawnInternal_Patch0(Verse.PawnGenerationRequest&,string&,bool,bool)
  at Verse.PawnGenerator.GenerateNewPawnInternal (Verse.PawnGenerationRequest& request) [0x00096] in <6326ac03f61f45efb3178f3bfd084139>:0
  at Verse.PawnGenerator.GenerateOrRedressPawnInternal (Verse.PawnGenerationRequest request) [0x00183] in <6326ac03f61f45efb3178f3bfd084139>:0
  at (wrapper dynamic-method) Verse.PawnGenerator.Verse.PawnGenerator.GeneratePawn_Patch3(Verse.PawnGenerationRequest)
Verse.Log:Error(String, Boolean)
Verse.PawnGenerator:Verse.PawnGenerator.GeneratePawn_Patch3(PawnGenerationRequest)
RimWorld.PawnGroupKindWorker_Trader:RimWorld.PawnGroupKindWorker_Trader.GenerateGuards_Patch1(PawnGroupKindWorker_Trader, PawnGroupMakerParms, PawnGroupMaker, Pawn, List`1, List`1)
RimWorld.PawnGroupKindWorker_Trader:GeneratePawns(PawnGroupMakerParms, PawnGroupMaker, List`1, Boolean)
RimWorld.PawnGroupKindWorker:RimWorld.PawnGroupKindWorker.GeneratePawns_Patch1(PawnGroupKindWorker, PawnGroupMakerParms, PawnGroupMaker, Boolean)
RimWorld.PawnGroupMaker:GeneratePawns(PawnGroupMakerParms, Boolean)
RimWorld.<GeneratePawns>d__1:MoveNext()
System.Collections.Generic.List`1:.ctor(IEnumerable`1)
System.Linq.Enumerable:ToList(IEnumerable`1)
RimWorld.IncidentWorker_NeutralGroup:SpawnPawns(IncidentParms)
RimWorld.IncidentWorker_TraderCaravanArrival:TryExecuteWorker(IncidentParms)
RimWorld.IncidentWorker:RimWorld.IncidentWorker.TryExecute_Patch1(IncidentWorker, IncidentParms)
Verse.<>c__DisplayClass7_1:<DoIncidentDebugAction>b__2()
Verse.Dialog_DebugOptionLister:DebugAction_NewTmp(String, Action, Boolean)
Verse.Dialog_DebugOptionListLister:DoListingItems()
Verse.Dialog_OptionLister:DoWindowContents(Rect)
Verse.Window:InnerWindowOnGUI(Int32)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle)


If anyone knows what mod this is related to, please forward me some information.  Thank you.

Bombcat -



Title: Re: Melanin? A strange error involving pawn generation and events - HELP! :)
Post by: Bombcat2015 on December 10, 2020, 10:05:48 AM
Bump on this, it's driving me insane.  I can't figure out what "Melanin" is related to?  Hair generation?  Skin color?  I am at a loss.  Someone please give me a bone.
Title: Re: Melanin? A strange error involving pawn generation and events - HELP! :)
Post by: Canute on December 10, 2020, 02:22:53 PM
- update all mods you use, More floors at example got a 1.2 version

- Rebuild your modlist at small steps, so you notice early when a mod throw out errors.

QuoteType <FluffyUI.TextureChooser> from <fluffy.worktab>'s <FluffyUI> probably needs a StaticConstructorOnStartup attribute, because it has a field <LeftArrow> of type <UnityEngine.Texture2D>. All assets must be loaded in the main thread.
This is an untypical error, WorkTab don't give out error's so it must be a corrupt version or some other mod interfere with it.

- Permadeath is a VERY bad idea with Mods. You never know if some conflict happen later during gameplay, which is mosttimes the case with larger modlists.

Title: Re: Melanin? A strange error involving pawn generation and events - HELP! :)
Post by: Bombcat2015 on December 10, 2020, 02:27:47 PM
I cheat permadeath in instances like this by copying my save file as another .rws entirely.  I've already reloaded and restructured.  More Floors is the newest version I just pieced it together so fluffy's floor mod wouldn't overwrite barn wood floors.  I was hoping someone could tell me where and what melanin is.  The only things I've found were hair mods and that Rimworld uses Melanin as a color spectrum for hair generation.  I wouldn't think floors would effect pawn generation in groups 40% of the time but I will acquiesce and update that accordingly.  It's odd because a new save doesn't have the same errors...it can generate 10x caravans in dev mode without losing a group or throwing an error.  Thanks for taking the time to respond, I really appreciate the input.
Title: Re: Melanin? A strange error involving pawn generation and events - HELP! :)
Post by: Canute on December 10, 2020, 02:30:11 PM
If you just look for melanin, just goto the Mods folder and then use the search function and search for "melanin".
You should get results of files which include "melanin" inside.
Title: Re: Melanin? A strange error involving pawn generation and events - HELP! :)
Post by: Bombcat2015 on December 10, 2020, 03:49:03 PM
Already did that...nothing comes up.  Did that in the base game folder as well.  Good thinking, however.  It only appears in an assembly I would assume and nothing windows search can read.
Title: Re: Melanin? A strange error involving pawn generation and events - HELP! :)
Post by: Canute on December 10, 2020, 04:24:47 PM
Maybe, melanin i didn't encounter at rimworld myself, so i can't give you any hint.
Title: Re: Melanin? A strange error involving pawn generation and events - HELP! :)
Post by: Bombcat2015 on December 11, 2020, 12:06:09 AM
I found a reference to it in a hugslib log randomly on the internet from a couple months ago.  It's a lot like Michael Jackson...a case of lost melanin.
Title: Re: Melanin? A strange error involving pawn generation and events - HELP! :)
Post by: Bombcat2015 on December 19, 2020, 04:42:35 PM
For anyone curious, removing RuntimeGC resolve the melanin problem and resolved an issue with Tenants not being able to generate new tenancy (the mlie redo).  Apparently garbage collection rewrite with RuntimeGC interferes with pawn generation and enumeration majorly.
Title: Re: Melanin? A strange error involving pawn generation and events - HELP! :)
Post by: Canute on December 19, 2020, 05:08:22 PM
I wouldn't expected that.
Title: Re: Melanin? A strange error involving pawn generation and events - HELP! :)
Post by: RawCode on December 19, 2020, 09:57:46 PM
mod knows "better" then game's developer how to manage memory obviously can't cause issues, it's absolutely impossible.