Need help identifying mod(s) causing NullReferenceException

Started by BadNeighbour, March 13, 2019, 04:55:33 PM

Previous topic - Next topic

BadNeighbour

Hey,

After a while playing with a long list of mods (around two seasons in game) I get a repeating NullReferenceException error which grinds the game to a halt. I've looked through the error log, and I can't figure out from what it says what might be causing this to happen.

The log:

System.NullReferenceException: Object reference not set to an instance of an object
at RimWorld.StatWorker_MarketValue.CalculatedBaseMarketValue (Verse.BuildableDef,Verse.ThingDef) <0x002ab>
at RimWorld.StatWorker_MarketValue.GetValueUnfinalized (RimWorld.StatRequest,bool) <0x0023f>
at RimWorld.StatWorker.GetValue (RimWorld.StatRequest,bool) <0x0014a>
at RimWorld.StatWorker.GetValueAbstract (Verse.BuildableDef,Verse.ThingDef) <0x0007e>
at RimWorld.StatExtension.GetStatValueAbstract (Verse.BuildableDef,RimWorld.StatDef,Verse.ThingDef) <0x0004d>
at Verse.ThingDef.get_BaseMarketValue () <0x0002b>
at RimWorld.IncidentWorker_QuestTradeRequest/<TryFindRandomRequestedThingDef>c__AnonStorey1.<>m__0 (Verse.ThingDef) <0x0002a>
at RimWorld.IncidentWorker_QuestTradeRequest/<TryFindRandomRequestedThingDef>c__AnonStorey1.<>m__1 (Verse.ThingDef) <0x00027>
at System.Linq.Enumerable/<CreateWhereIterator>c__Iterator1D`1<Verse.ThingDef>.MoveNext () <0x0016b>
at System.Collections.Generic.List`1<Verse.ThingDef>.AddEnumerable (System.Collections.Generic.IEnumerable`1<Verse.ThingDef>) <0x000d7>
at System.Collections.Generic.List`1<Verse.ThingDef>..ctor (System.Collections.Generic.IEnumerable`1<Verse.ThingDef>) <0x000e5>
at System.Linq.Enumerable.ToList<Verse.ThingDef> (System.Collections.Generic.IEnumerable`1<Verse.ThingDef>) <0x00070>
at Verse.GenCollection.TryRandomElement<Verse.ThingDef> (System.Collections.Generic.IEnumerable`1<Verse.ThingDef>,Verse.ThingDef&) <0x000df>
at RimWorld.IncidentWorker_QuestTradeRequest.TryFindRandomRequestedThingDef (Verse.Map,Verse.ThingDef&,int&) <0x00145>
at RimWorld.IncidentWorker_QuestTradeRequest.TryGenerateTradeRequest (RimWorld.Planet.TradeRequestComp,Verse.Map) <0x00095>
at RimWorld.IncidentWorker_QuestTradeRequest.TryExecuteWorker (RimWorld.IncidentParms) <0x000df>
at RimWorld.IncidentWorker.TryExecute (RimWorld.IncidentParms) <0x00024>
at (wrapper dynamic-method) RimWorld.Storyteller.TryFire_Patch1 (object,RimWorld.FiringIncident) <0x00090>
at RimWorld.IncidentQueue.IncidentQueueTick () <0x000c4>
at RimWorld.Storyteller.StorytellerTick () <0x0002f>
at Verse.TickManager.DoSingleTick () <0x00610>

Verse.Log:Error(String, Boolean)
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

My current mod list (in this order):
Core, HugsLib, JecsTools, Humanoid Aliens, Prepare Carefully, Misc CORE, Story Framework, Mod Manager, Giddy-up! Core (plus all of Roolo's Giddy Up mods), Doors expanded, A Rimworld of Magic, Dubs Mint Menus, Rimworld search agency, More faction interaction, faction control, tribal raiders, more vanilla factions, moremonstergirls, more trait slots, expanded prosthetics, A Dog Said, LBE's A Dog Said easy patcher, RPG Style inventory, RunAndGun, Allow Tool, Alpha Aninals, Animal Collab Proj, Animal Variety Coats, Star Wars Animal Collection, QualityBuilder, Rim of Madness Bones, RimQuest, RimBees, RimHUD, Numbers, Color Coded Mood Bar, While you're up, Let's Trade!, FishIndustry, Quarry, Cupro's Stones, Cupro's Alloys, Kura's Extra Gems, Real Ruins, Herd Migration Revival, Shaggy God of Destruction, VGP (and most VGP addons aside from soylent and extra vegetation), Stack XXL, Dinosauria, Megafauna, Random Research, Various Space Ship Chunks, Wandering Caravans, Wall Light, Stackable Chunks, What the Hack?!, More Machanoids, Mechanoids Extraordinaire, RunTimeGC, Mad Skills, Sometimes Raids go Wrong, Kurin race, Dragon Mod, Genetic Rim (and applicable addons), ResearchPal, Xen's Taming Fixer, Flommel, SimeMOD, Faction discover, animal husbandry, Frilleus, Kyulen NinetailFox, Kill For Me, Turret Extensions, More Vanilla Turrets, Hospitality, Rimsenal (and all add-ons besides storytellers), Infused.

...I realise that is a lot of mods, and I've likely caused this problem by using so many. This is just how I play and if Rimworld didn't have RAM issues I would use even more. However I was wondering if someone a lot smarter than I am can pick up on something in the log above which explains what's causing the problem.
At the moment it looks like it might be either Rimquest or Let's Trade, perhaps? It looks like it's related to a trader trying to spawn, but I'm not sure.

Thanks in advance to anyone willing to trawl through this <3

Canute

MarketValue.CalculatedBaseMarketValue
An incident is coming a TradeRequest.
Rimworld try to calculate the value of some items but fail to do so, maybe some item's with no or wrong value.
Sorry but i can't say what item or mod does it cause.

But you can't kill the incident from your safegame.
Backup your safegame.
Open the safegame with a texteditor
Search for queuedIncidents 2 times
then you see the list of coming incidents.
Just delete the first from <li>  to </li>.
Maybe it is the second, you should idenify them at the def entry.

But that don't solve the problem.
You should try to check items you got for their marketvalue, when you notice something strange like no or zero value, you maybe should disable that mod.

BadNeighbour

Thankyou very much, I'll investigate it tomorrow and figure out what's doing it

hadrienguelque