Ludeon Forums

RimWorld => Mods => Topic started by: Solarius Scorch on October 19, 2020, 09:11:47 AM

Title: Who can help with log analysis to identify a mod problem?
Post by: Solarius Scorch on October 19, 2020, 09:11:47 AM
(Not sure if this is the right place to ask, so feel free to move or delete this thread.)

Could someone please direct me to a place - like a forum thread, a Discord server, etc. - where I can find some help with solving a mod conflict?

I run around 300 mods and recently I started having problems with trading (traders don't appear on trading caravans, orbital traders have no silver an don't accept any items, same with towns). I tried analysing my mods, their load order etc., also generated and read the logs, but I couldn't find anything conclusive.

I realize people have better things to do than reading logs from other people (especially those who indulge in heavy mod use), but I think I'm out of options, so directions to someone who could have a look would be very much appreciated.

If someone is kind enough to check straight away, I'll attach my log. It was generated after a caravan arrived but there was no trader in it (I'm sure it's a trading caravan because I ordered it).
I also have another log from straight after generating an orbital trader who has some stuff to sell but no silver, I can attach it as well if I should.
Title: Re: Who can help with log analysis to identify a mod problem?
Post by: Canute on October 19, 2020, 10:12:12 AM
Hi,
since you ask for other places too, the official discord
https://discordapp.com/invite/K4wQe57

At first, you have ALOT of error on Rimworld startup.
Did you got all these errors before ?
Some are with "alienskinsecondcolorgen Class" and just today someone said HAR got updated and throw out errors, you maybe get the old alienframework from github.
But generell you should avoid to have error's on startup, they increase the chance that something bad could happen later or that a mod part didn't even work.
IMO better don't use a mod that give you error's then to loose you colony later.
Identify the mod, report it to the mod author so he can fix it. Or when you installed them manualy look for mod updates.

After you load the safegame i see alot of
Quote
Error while generating pawn. Rethrowing. Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at AlienRace.HarmonyPatches+<>c__DisplayClass48_0.<GainTraitPrefix>b__0 (AlienRace.AlienTraitEntry at) [0x00000] in <9844aa016425494e86724497589232b6>:0
Maybe it is about the new Alienrace framework or from an alienrace itself.
Title: Re: Who can help with log analysis to identify a mod problem?
Post by: Solarius Scorch on October 19, 2020, 12:16:52 PM
Many thanks for your quick and helpful response!

Thanks for the Discord link too, will go there if this thread won't suffice.

Regarding the errors and the Humanoid Alien stuff: I suspect (though I'm not 100% sure) that the reason is cause by the outdated Avali mod, which doesn't have a 1.2 version yet. I don't want to remove it, as it's pretty content heave and I have many items from it laying around my base (luckily, no pawns). If I had certainty that this mod is to blame, I'd work on that, but it's a risk I'd rather avoid. Do you think removing it is worth the risk and effort?

As for the Humanoid Alien Races, I have a GoG version of Rimworld so my mods don't update automatically. This one was downloaded on the 2nd of August (shortly after 1.2 update) and I haven't touched it since, so it's probably not that.

---- Avali and some other mods removed later ----

Hmm, still getting some of these errors (on start, loading a save obviously fails with textures not generating). Can you maybe suggest how to find the culprit?

Thanks again for the assistance!
Title: Re: Who can help with log analysis to identify a mod problem?
Post by: Canute on October 19, 2020, 02:56:57 PM
Well, the texture problems can be from an not updated mod, it got changed how the texture path/name should be at the latest rimworld version.
Many file browser (even windows file explorer) can search for strings inside a file. Just copy the texturename from the error msg. and search inside the mods folder for it, then you could find the mod.
Alternative, rebuild you modlist at small steps, then you notice early when a mod throw out error's after actiation.

So long you don't delete/overwrite the safegame, you can disable mods and try if that safegame still works fine after it. And if not you still can load the modlist from that safegame again.

And if you are looking for workshop mods, you should read the sticky here "How to download....".
RimPy + SteamCMD (without steam account) works well since the workshop is the largest source for mods.
Title: Re: Who can help with log analysis to identify a mod problem?
Post by: Solarius Scorch on October 21, 2020, 01:35:28 PM
Again, many thanks for your help.

I'll focus on clearing all "red" errors. Sorting this out will take me... days probably (including removal of associated objects from the save), I'll report on how it went.

I don't have issues with searching files, I had more trouble with determining what exactly to search for; but I think I'm getting the hang of it.

As for downloading mods, I'm using Steam Workshop Downloader (a Firefox plugin) - it's more comfortable than RimPy.

EDIT:

After a lot of experiments, it appears that pretty much the entire alien races system is broken, as even Harmony + HAL + one race mod (for example Orassans) throws errors. I updated some mods, and now I can't reload my save at all, as the game says that Rimefeller is causing errors (even though I haven't touched it this mod at all).

At this point I'm considering completely rebuilding my mod collection from scratch, but I don't want to start a new colony - the entire point is following the life of my Little House on The Swamp. Perhaps I should wait a few months until the modders sort out any issues and then try again... Maybe somehow transplant my colonists into a new save, since I don't care about their possessions that much.
Title: Re: Who can help with log analysis to identify a mod problem?
Post by: Canute on October 21, 2020, 01:42:22 PM
About these Alien errors.
Try out to get the old HAR version from github that should remove these errors until the race mod author update their mods.
But erdelf the author of HAR wrote
Quoteerdelf  [Autor] 20. Okt. um 16:54 Uhr
For both of yours, please report that to the race authors.

The only recent changes in this framework is actually letting those errors appear. They were there all along. By themselves they don't cause problems, so you can continue playing.
So these error shouldn't have any further effect.



Title: Re: Who can help with log analysis to identify a mod problem?
Post by: Solarius Scorch on November 17, 2020, 07:45:10 AM
Yeah I know, experimented with this too. But seeing as my save is inexplicably broken due to Rimefeller, I don't think I can do much. Perhaps editing all Rimefeller stuff out from the save will help. If not, I'll wait for a while until the crashing waves subside on the modding front and then transplant my people to a new save/planet.

I just wanted to trade, dammit!

Many thanks for listening to my issues, I really appreciate that.

---- EDIT ---

Well, it's me again. Sorry to be such a bother, but I hope to get more help on pretty much the same issue.

To resolve the problem, I:
Reorganized my mods according to Trisscar's guide (https://rwom.fandom.com/wiki/Mod_Order_Guide).
* Removed several mods which were either outdated or known to cause issues, like Nature Is Pretty Sweet. (Hand-edited the save to remove any references to them.)
* Worked on resolving any red errors. I did not succeed completely, because I am left with:
  - Some warnings regarding to Humanoid Alien Races (probably due to the recent changes in HAR),
  - Some issues with seeds I don't understand,
  - References to (I presume) Real Ruins stuff which is no longer present in my game, due to uninstalled mods.

I don't think any of these should mess with traders. Yet I am still having the same problem: when a caravan arrives, there is no trader among them.
On a side note (probably related), I'm not getting any guests from Orion's Hospitality mod. I do occasionally get passer-bys, though.

Here's a log generated right after a trading caravan arrives. I would really appreciate it if I could get some advice: https://gist.github.com/HugsLibRecordKeeper/9075d7f447f5e831091f63834805bff9

Title: Re: Who can help with log analysis to identify a mod problem?
Post by: RawCode on November 17, 2020, 08:32:03 AM
spawn trader with debug tools and check log and spawned group
also you need to enable verbose logging
Title: Re: Who can help with log analysis to identify a mod problem?
Post by: Canute on November 17, 2020, 10:58:36 AM
Solarius Scorch,
another thing is you should throw out mods that cause errors at rimworld startup/mod activation.
They mosttimes don't work correct or missing function/items.
When you got these XML errors at example you could take a string from the msg. like "RGBA(0.18,0.27,0.10,1)" and search inside the Mods folder for it.
Title: Re: Who can help with log analysis to identify a mod problem?
Post by: Solarius Scorch on November 18, 2020, 09:20:50 AM
Quote from: Canute on November 17, 2020, 10:58:36 AM
Solarius Scorch,
another thing is you should throw out mods that cause errors at rimworld startup/mod activation.
They mosttimes don't work correct or missing function/items.
When you got these XML errors at example you could take a string from the msg. like "RGBA(0.18,0.27,0.10,1)" and search inside the Mods folder for it.

Yeah, that's what I meant by HAR issues.
Sure I could do that, but all my saves are rife with non-humans, so removing them would not be a solution - there is little point having a 0100% functional game which I can't really play anyway.
If we were 100% sure that all alien mods are bad (because honestly that's how it looks like; for example Orassans were update recently, should be fully compatible with HAR, yet still throw such errors - I tested with Orassans and HAR only), then okay, I could start over with only humans, I guess... But I really don't believe it's the case, since legions of people play with aliens with no trader issues.

EDIT: huh, Orassans don't throw any errors now. OK, I'll go through the damn list again...

(https://i.kym-cdn.com/photos/images/newsfeed/001/867/835/1f3.jpg)
Title: Re: Who can help with log analysis to identify a mod problem?
Post by: Canute on November 18, 2020, 11:42:00 AM
I didn't speak about HAR issue's they came with the latest HAR update.
Most races mod author allready update their mods.

XML error's you could take a part of error msg. and search for it inside the Mods folder like "<plant>SRV_HydroJute</plant>" if you arn't allready know which mod could add Jute.

Cross reference similar "FertilitySource"

The annoying part comes when you don't have a string you could search for.
Title: Re: Who can help with log analysis to identify a mod problem?
Post by: Solarius Scorch on November 20, 2020, 05:33:29 AM
Gotcha, thanks.
I think I resolved that issue with HAR, as well as with FertilitySource (found a solution somewhere on Steam).

Yet.. the story continues! I got a mechanoid psychic ship, and before I resolved it, I got a message that visitors are afraid to enter due to that, and I told them to come... yet nobody came. Therefore it appears that the issue is not resolved.

The current log is here (https://gist.github.com/HugsLibRecordKeeper/bde8ea29d89d0f474e6fe9905e81a967), and I'll appreciate yet another attempt at assistance. This time I get two red errors (except for missing Real Ruins stuff):

"Could not resolve cross-reference: No RimWorld.StatDef named SmithingSpeed found to give to Verse.RecipeMakerProperties Verse.RecipeMakerProperties"
"Could not resolve cross-reference: No RimWorld.StatDef named Radiation found to give to RimWorld.StatModifier (null stat)"

Both SmithingSpeed and Radiation are present in tons of mods, some of them very new, so I don 't think it's inherently wrong. But I don't know any more...
Title: Re: Who can help with log analysis to identify a mod problem?
Post by: Canute on November 20, 2020, 07:20:30 AM
Yep when you can't identify the mod with the search, then you need to go the hard way.
You need to deactivate mod until the error is gone to identify it.
I suggest that you use the 50% methode. Deactivate the lower half of your mods.
When the error is still there, just the next 50% of your mods.
Otherside, reactivate 50% of the deactivated mods .....

Or when you think it is maybe faster because of the faster loading times. Deactivate all beside the nessesary libaries (Harmony,hugslib,jecstools,HAR,toolbox) and activate just a few mods.

Don't you got an error msg. for the missing visitors ? I think that is a different thing, maybe a wrong defined race, faction or item that the visitor could equip.
Title: Re: Who can help with log analysis to identify a mod problem?
Post by: Solarius Scorch on November 24, 2020, 06:48:32 AM
Well it was a busy Saturday, and I managed to locate the culprit. To my surprise, it was Vanilla Apparel Expanded...

I'm testing the game without it now, hopefully the trader issue will disappear.

EDIT:
WHAT THE ACTUAL F*CK.

As mentioned before, I removed Vanilla Apparel Expanded, and all the red errors disappeared (apart from a long list of missing defs of things from that mod). I tested, it worked okay, played for a few hours but no visitors came. So I wanted to play again, I launched the game, and lo and behold, all red messages are there again (and the missing VAE defs no longer show up). Yes, the mod I disabled is still disabled. Proof here (https://gist.github.com/4ba8465db93b7cce40cf0aff466fa2b1).

At this point I feel like some malicious AI is trolling me, because this doesn't make any sense. I just want my fucking traders, and visitors!

EDIT:
Spent the last few days building all my mod list from ground up, one by one. Now it's pristine and no log appears at all at game start. Hopefully this will be enough to solve all the issues.
Many thanks, Canute, for responding to my ramblings. I really appreciate it!
Title: Re: Who can help with log analysis to identify a mod problem?
Post by: Canute on November 24, 2020, 07:05:01 AM
Good luck ! :-)
Too bad there isn't a quality control for mods, so some of these 5000 1.2 mods don't work so well (alone or with other mods).
But most mod author try to fix the problems.
Title: Re: Who can help with log analysis to identify a mod problem?
Post by: Solarius Scorch on November 29, 2020, 06:22:22 AM
I may get no errors, but I'm still not getting any guests... :-\

I just happened to have a mechanoid problem and I got a message that guests are afraid to enter due to that; when I said yes, they still were not generated. Here's what the log says:

Hospitality: Something failed when setting up visitors from faction Pond Cryptodome League (luminous aurora):
System.NullReferenceException: Object reference not set to an instance of an object
  at Hospitality.SpawnGroupUtility.ValidGuest (Verse.Pawn pawn, RimWorld.Faction faction) [0x00008] in <e43536b7e9794111ae228f0955444338>:0
  at Hospitality.SpawnGroupUtility+<>c__DisplayClass9_0.<GetKnownPawns>b__0 (Verse.Pawn pawn) [0x00000] in <e43536b7e9794111ae228f0955444338>:0
  at System.Linq.Enumerable+WhereListIterator`1[TSource].MoveNext () [0x00037] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at Hospitality.SpawnGroupUtility+<RandomlyUsingTitleAsChance>d__11.MoveNext () [0x000ca] in <e43536b7e9794111ae228f0955444338>:0
  at System.Collections.Generic.List`1[T]..ctor (System.Collections.Generic.IEnumerable`1[T] collection) [0x00077] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00018] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at Verse.GenCollection+<InRandomOrder>d__4`1[T].MoveNext () [0x00035] in <6326ac03f61f45efb3178f3bfd084139>:0
  at System.Linq.Enumerable+EnumerablePartition`1[TSource].ToList () [0x0001b] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0001f] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at Hospitality.IncidentWorker_VisitorGroup.GetPawnsToSpawn (RimWorld.IncidentParms parms) [0x0002d] in <e43536b7e9794111ae228f0955444338>:0
  at Hospitality.IncidentWorker_VisitorGroup.SpawnPawns (RimWorld.IncidentParms parms, System.Collections.Generic.List`1[T] spawned) [0x0000c] in <e43536b7e9794111ae228f0955444338>:0
  at Hospitality.IncidentWorker_VisitorGroup.SpawnGroup (RimWorld.IncidentParms parms, Verse.Map map) [0x00006] in <e43536b7e9794111ae228f0955444338>:0
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)


I assume the problem happens all the time, but usually there's no warning.

The entire log can be found here: https://gist.github.com/HugsLibRecordKeeper/e44869d96efb9614eab5d539fe33236f
Title: Re: Who can help with log analysis to identify a mod problem?
Post by: Canute on November 29, 2020, 06:59:20 AM
Try at first to move Hospitality at the end of the modlist and at the beginning after the libaries. Maybe that allready helps.

You should try with the dev tools to spawn more visitors, just to check the error if only that faction give error's or all.
Enable Developer mode at the options
Debug action (Icon top), Do incident (map), Visitorgroup.
When it is only these faction, you need to identify the mod which add that faction, and ask the mod author for help/fix.

I don't think it is because their equipment, the error looks different.

You have plenty of error's afrer loading the safegame, did you remove some mods ?

Try to give Petaxai a new drug policy.
Title: Re: Who can help with log analysis to identify a mod problem?
Post by: RawCode on December 03, 2020, 02:14:25 AM
run game under debugger and check extended info about error
https://github.com/dnSpy/dnSpy/wiki/Debugging-Unity-Games

perfectly sure that issue actually rise inside RandomlyUsingTitleAsChance and related to outdated mod related to royalty titles that cause pawn lookup to fail.

remove all mods related to royal titles and try again
Title: Re: Who can help with log analysis to identify a mod problem?
Post by: Solarius Scorch on December 09, 2020, 09:57:34 AM
Many thanks, guys.
To be honest I dropped the game for now, having exhausted my patience to deal with this... But thanks to you, I've decided to give it another try.
I searched the Mods folder for RandomlyUsingTitleAsChance and the only instance I found was in the, well, Hospitality mod. So I disabled it and tried to spawn a trader caravan. And I got this: https://gist.github.com/1009f0ab795cc737177af72846ed57d3

The relevant part is probably this:

Error while generating pawn. Rethrowing. Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.Planet.WorldPawns.GetSituation (Verse.Pawn p) [0x0000b] in <6326ac03f61f45efb3178f3bfd084139>:0
  at RimWorld.Planet.WorldPawns+<>c__DisplayClass27_0.<GetPawnsBySituation>b__0 (Verse.Pawn x) [0x00000] in <6326ac03f61f45efb3178f3bfd084139>:0
  at System.Linq.Utilities+<>c__DisplayClass1_0`1[TSource].<CombinePredicates>b__0 (TSource x) [0x00000] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at System.Linq.Enumerable+WhereListIterator`1[TSource].MoveNext () [0x00037] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at Verse.GenCollection.TryRandomElementByWeight[T] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] weightSelector, T& result) [0x00186] in <6326ac03f61f45efb3178f3bfd084139>:0
  at Verse.PawnGenerator.GenerateOrRedressPawnInternal (Verse.PawnGenerationRequest request) [0x00144] in <6326ac03f61f45efb3178f3bfd084139>:0
  at (wrapper dynamic-method) Verse.PawnGenerator.Verse.PawnGenerator.GeneratePawn_Patch4(Verse.PawnGenerationRequest)
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

Exception while generating thing set: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.Planet.WorldPawns.GetSituation (Verse.Pawn p) [0x0000b] in <6326ac03f61f45efb3178f3bfd084139>:0
  at RimWorld.Planet.WorldPawns+<>c__DisplayClass27_0.<GetPawnsBySituation>b__0 (Verse.Pawn x) [0x00000] in <6326ac03f61f45efb3178f3bfd084139>:0
  at System.Linq.Utilities+<>c__DisplayClass1_0`1[TSource].<CombinePredicates>b__0 (TSource x) [0x00000] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at System.Linq.Enumerable+WhereListIterator`1[TSource].MoveNext () [0x00037] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at Verse.GenCollection.TryRandomElementByWeight[T] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] weightSelector, T& result) [0x00186] in <6326ac03f61f45efb3178f3bfd084139>:0
  at Verse.PawnGenerator.GenerateOrRedressPawnInternal (Verse.PawnGenerationRequest request) [0x00144] in <6326ac03f61f45efb3178f3bfd084139>:0
  at (wrapper dynamic-method) Verse.PawnGenerator.Verse.PawnGenerator.GeneratePawn_Patch4(Verse.PawnGenerationRequest)
  at RimWorld.StockGenerator_Animals+<GenerateThings>d__7.MoveNext () [0x001a1] in <6326ac03f61f45efb3178f3bfd084139>:0
  at RimWorld.ThingSetMaker_TraderStock.Generate (RimWorld.ThingSetMakerParams parms, System.Collections.Generic.List`1[T] outThings) [0x000e5] in <6326ac03f61f45efb3178f3bfd084139>:0
  at RimWorld.ThingSetMaker.Generate (RimWorld.ThingSetMakerParams parms) [0x00019] in <6326ac03f61f45efb3178f3bfd084139>:0
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

Error while generating pawn. Rethrowing. Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.Planet.WorldPawns.GetSituation (Verse.Pawn p) [0x0000b] in <6326ac03f61f45efb3178f3bfd084139>:0
  at RimWorld.Planet.WorldPawns+<>c__DisplayClass27_0.<GetPawnsBySituation>b__0 (Verse.Pawn x) [0x00000] in <6326ac03f61f45efb3178f3bfd084139>:0
  at System.Linq.Utilities+<>c__DisplayClass1_0`1[TSource].<CombinePredicates>b__0 (TSource x) [0x00000] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at System.Linq.Enumerable+WhereListIterator`1[TSource].MoveNext () [0x00037] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at Verse.GenCollection.TryRandomElementByWeight[T] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] weightSelector, T& result) [0x00186] in <6326ac03f61f45efb3178f3bfd084139>:0
  at Verse.PawnGenerator.GenerateOrRedressPawnInternal (Verse.PawnGenerationRequest request) [0x00144] in <6326ac03f61f45efb3178f3bfd084139>:0
  at (wrapper dynamic-method) Verse.PawnGenerator.Verse.PawnGenerator.GeneratePawn_Patch4(Verse.PawnGenerationRequest)
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

Exception while generating pawn group: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.Planet.WorldPawns.GetSituation (Verse.Pawn p) [0x0000b] in <6326ac03f61f45efb3178f3bfd084139>:0
  at RimWorld.Planet.WorldPawns+<>c__DisplayClass27_0.<GetPawnsBySituation>b__0 (Verse.Pawn x) [0x00000] in <6326ac03f61f45efb3178f3bfd084139>:0
  at System.Linq.Utilities+<>c__DisplayClass1_0`1[TSource].<CombinePredicates>b__0 (TSource x) [0x00000] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at System.Linq.Enumerable+WhereListIterator`1[TSource].MoveNext () [0x00037] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at Verse.GenCollection.TryRandomElementByWeight[T] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] weightSelector, T& result) [0x00186] in <6326ac03f61f45efb3178f3bfd084139>:0
  at Verse.PawnGenerator.GenerateOrRedressPawnInternal (Verse.PawnGenerationRequest request) [0x00144] in <6326ac03f61f45efb3178f3bfd084139>:0
  at (wrapper dynamic-method) Verse.PawnGenerator.Verse.PawnGenerator.GeneratePawn_Patch4(Verse.PawnGenerationRequest)
  at RimWorld.PawnGroupKindWorker_Trader.GenerateGuards (RimWorld.PawnGroupMakerParms parms, RimWorld.PawnGroupMaker groupMaker, Verse.Pawn trader, System.Collections.Generic.List`1[T] wares, System.Collections.Generic.List`1[T] outPawns) [0x00097] in <6326ac03f61f45efb3178f3bfd084139>:0
  at RimWorld.PawnGroupKindWorker_Trader.GeneratePawns (RimWorld.PawnGroupMakerParms parms, RimWorld.PawnGroupMaker groupMaker, System.Collections.Generic.List`1[T] outPawns, System.Boolean errorOnZeroResults) [0x00233] in <6326ac03f61f45efb3178f3bfd084139>:0
  at (wrapper dynamic-method) RimWorld.PawnGroupKindWorker.RimWorld.PawnGroupKindWorker.GeneratePawns_Patch1(RimWorld.PawnGroupKindWorker,RimWorld.PawnGroupMakerParms,RimWorld.PawnGroupMaker,bool)
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

(...)

Exception while generating pawn group: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.Planet.WorldPawns.GetSituation (Verse.Pawn p) [0x0000b] in <6326ac03f61f45efb3178f3bfd084139>:0
  at RimWorld.Planet.WorldPawns+<>c__DisplayClass27_0.<GetPawnsBySituation>b__0 (Verse.Pawn x) [0x00000] in <6326ac03f61f45efb3178f3bfd084139>:0
  at System.Linq.Utilities+<>c__DisplayClass1_0`1[TSource].<CombinePredicates>b__0 (TSource x) [0x00000] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at System.Linq.Enumerable+WhereListIterator`1[TSource].MoveNext () [0x00037] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at Verse.GenCollection.TryRandomElementByWeight[T] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] weightSelector, T& result) [0x00186] in <6326ac03f61f45efb3178f3bfd084139>:0
  at Verse.PawnGenerator.GenerateOrRedressPawnInternal (Verse.PawnGenerationRequest request) [0x00144] in <6326ac03f61f45efb3178f3bfd084139>:0
  at (wrapper dynamic-method) Verse.PawnGenerator.Verse.PawnGenerator.GeneratePawn_Patch4(Verse.PawnGenerationRequest)
  at RimWorld.PawnGroupKindWorker_Trader.GenerateCarriers (RimWorld.PawnGroupMakerParms parms, RimWorld.PawnGroupMaker groupMaker, Verse.Pawn trader, System.Collections.Generic.List`1[T] wares, System.Collections.Generic.List`1[T] outPawns) [0x0011e] in <6326ac03f61f45efb3178f3bfd084139>:0
  at RimWorld.PawnGroupKindWorker_Trader.GeneratePawns (RimWorld.PawnGroupMakerParms parms, RimWorld.PawnGroupMaker groupMaker, System.Collections.Generic.List`1[T] outPawns, System.Boolean errorOnZeroResults) [0x00228] in <6326ac03f61f45efb3178f3bfd084139>:0
  at (wrapper dynamic-method) RimWorld.PawnGroupKindWorker.RimWorld.PawnGroupKindWorker.GeneratePawns_Patch1(RimWorld.PawnGroupKindWorker,RimWorld.PawnGroupMakerParms,RimWorld.PawnGroupMaker,bool)
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)


However, after I tried doing the same on a new colony, everything went fine: the caravan spawned (with delay, as I'm using a mod to detect movement ahead of time), with a trader, and the trader was just fine as well.

Any ideas what can be wrong with my current campaign and how to fix it? I know it's an extremely hard question, but maybe you have some idea.
Title: Re: Who can help with log analysis to identify a mod problem?
Post by: RawCode on December 11, 2020, 06:57:28 AM
RandomlyUsingTitleAsChance is not source of error, other mod that messed with pawn data is source.

to determinate what exactly pawn record (or other data) caused pawn lookup failure, you must use debugger or make custom patches that will expose data (or make pawn lookup work in more robust way and instead of failing on some record, skip it and continue).

ever if you remove every mod that inject into pawn generation, (use "GeneratePawn" as keyword over your log and it will tell mods that add injections to this method) your save likely to fail

in your case injections are vanilla extended, alien races and some mod with meaningless name, if you removed all mods properly GeneratePawn_Patch4 in trace output will display as GeneratePawn

if this helped, enable mods one by one, if not, you will need debugger or custom patches

Title: Re: Who can help with log analysis to identify a mod problem?
Post by: Solarius Scorch on December 29, 2020, 05:59:32 AM
Sorry, I have no idea what kind of debugger you're talking about. I don't think I can remove these mods anyway, even for testing purposes, and still be able to load the game at all.

Anyway, things seem to work fine on a new save, so I guess that old one is not salvageable... Oh well.
Title: Re: Who can help with log analysis to identify a mod problem?
Post by: Canute on December 29, 2020, 06:59:03 AM
As player you don't need to use a debugger, that is basicly a developer tool.
It might could help to identify the mod who cause the problem, then you can contact the mod author so he can try fix the problem.
But you prolly need some better knowledge about XML and maybe C# to get any useful information. Unless you want to start modding at your own i think you should forget it.

But to identify a mod or mods that conflict is very hard or impossible for a player at an ongoing colony.
Like you notice self, at a new colony anything is working, but only later error's happen.
That is because later you have access to different items, guests/raiders got more point's to spawn and use advanced/expensive items.

As player you don't have much choises, mosttimes you need to life with the problems if they arn't gamebreaking or start a new colony with less/different mods.
Be sure you don't have error's after mod activation that increase the chance that you don't have problems later.
More mods = more chances for problems.
If you like to play with many mods, maybe look at some mod collection other people shared at steam.


But
Title: Re: Who can help with log analysis to identify a mod problem?
Post by: Solarius Scorch on December 31, 2020, 04:34:49 AM
Got it... Thanks for sharing, I appreciate it.
Have a good New Year!
Title: Re: Who can help with log analysis to identify a mod problem?
Post by: Asmith on February 06, 2021, 03:24:57 PM
After updating a few mods I started having this exact same issue (no hospitality visitors, all traders and towns have empty inventory)...  Did you ever have any luck figuring this out?
Title: Re: Who can help with log analysis to identify a mod problem?
Post by: Canute on February 06, 2021, 04:03:20 PM
You should look at the log window and check for errors.
If you get some luck, you can maybe see a modname, but i wouldn't bet on it.
My guess are that there are some items that cause the problems when rimworld generate the inventories.

Developer mode on at the option
Create a new colony (if you use hugslib use the quickstart feature, top right icon shift-click).
Then create an incident (map) visitor or caravan, when they got empty inventories, just disable some mod's that add stuff to the game and try it again.