Ludeon Forums

RimWorld => Support => Topic started by: hadrienguelque on April 16, 2019, 08:52:42 AM

Title: Sudden Lag
Post by: hadrienguelque on April 16, 2019, 08:52:42 AM
So I've been playing RimWorld for quite some time now, and I tried installing some mods
Many colonies later (where everything was all right), I had a problem with a new colony: suddely, i went from 60fps to 2fps, making the game unplayable.
I tried with two new other colonies: same problem. Suddenly, there's lag. And nothing stops it.
I tried unloading some mods that might be problematic, but the same thing happens. Whenever I load a save before the lag, the game isn't laggy, but I'll will eventually become laggy around the same time as before.
Could you help me ? Here is and extract of the log right as the lag begins (its the same everytime):

System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.StatWorker_MarketValue.CalculatedBaseMarketValue (Verse.BuildableDef def, Verse.ThingDef stuffDef) [0x00000] in <filename unknown>:0
  at RimWorld.StatWorker_MarketValue.GetValueUnfinalized (StatRequest req, Boolean applyPostProcess) [0x00000] in <filename unknown>:0
  at RimWorld.StatWorker.GetValue (StatRequest req, Boolean applyPostProcess) [0x00000] in <filename unknown>:0
  at RimWorld.StatWorker.GetValueAbstract (Verse.BuildableDef def, Verse.ThingDef stuffDef) [0x00000] in <filename unknown>:0
  at RimWorld.StatExtension.GetStatValueAbstract (Verse.BuildableDef def, RimWorld.StatDef stat, Verse.ThingDef stuff) [0x00000] in <filename unknown>:0
  at Verse.ThingDef.get_BaseMarketValue () [0x00000] in <filename unknown>:0
  at RimWorld.IncidentWorker_QuestTradeRequest+<TryFindRandomRequestedThingDef>c__AnonStorey1.<>m__0 (Verse.ThingDef td) [0x00000] in <filename unknown>:0
  at RimWorld.IncidentWorker_QuestTradeRequest+<TryFindRandomRequestedThingDef>c__AnonStorey1.<>m__1 (Verse.ThingDef td) [0x00000] in <filename unknown>:0
  at System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[Verse.ThingDef].MoveNext () [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1[Verse.ThingDef].AddEnumerable (IEnumerable`1 enumerable) [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1[Verse.ThingDef]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0
  at System.Linq.Enumerable.ToList[ThingDef] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
  at Verse.GenCollection.TryRandomElement[ThingDef] (IEnumerable`1 source, Verse.ThingDef& result) [0x00000] in <filename unknown>:0
  at RimWorld.IncidentWorker_QuestTradeRequest.TryFindRandomRequestedThingDef (Verse.Map map, Verse.ThingDef& thingDef, System.Int32& count) [0x00000] in <filename unknown>:0
  at RimWorld.IncidentWorker_QuestTradeRequest.TryGenerateTradeRequest (RimWorld.Planet.TradeRequestComp target, Verse.Map map) [0x00000] in <filename unknown>:0
  at RimWorld.IncidentWorker_QuestTradeRequest.TryExecuteWorker (RimWorld.IncidentParms parms) [0x00000] in <filename unknown>:0
  at RimWorld.IncidentWorker.TryExecute (RimWorld.IncidentParms parms) [0x00000] in <filename unknown>:0
  at RimWorld.Storyteller.TryFire (RimWorld.FiringIncident fi) [0x00000] in <filename unknown>:0
  at RimWorld.IncidentQueue.IncidentQueueTick () [0x00000] in <filename unknown>:0
  at RimWorld.Storyteller.StorytellerTick () [0x00000] in <filename unknown>:0
at Verse.TickManager.DoSingleTick () [0x00000] in <filename unknown>:0
Title: Re: Sudden Lag
Post by: Canute on April 16, 2019, 09:12:34 AM
QuoteWhenever I load a save before the lag, the game isn't laggy, but I'll will eventually become laggy around the same time as before.
You should compare what items you got before and after the lag.
The error msg. is about CalculatedBaseMarketValue, looks like some item or resource got a missing or bad market value.
After you know the item, you might can figure out the mod which add the item or resource, and report that to the mod author.
Title: Re: Sudden Lag
Post by: hadrienguelque on April 16, 2019, 09:33:50 AM
I took a look at all my items, none of them have a missing or a bad (negative or zero) market value... And nothing disapears after the lag...
EDIT: I just found out that my corpses don't have any value but think that's normal, since you can't usually sell them...
Title: Re: Sudden Lag
Post by: Canute on April 16, 2019, 10:21:10 AM
Sorry i oversaw "IncidentWorker_QuestTradeRequest"
it is for an coming event "Trade Request" which they can't calculate the tradevalue.

You can delete this event, but that don't solve the generell problem and can happen at the next trade request  (or other event's) again.
To delete the event:
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>.
You should idenify them at the def entry.

Title: Re: Sudden Lag
Post by: hadrienguelque on April 16, 2019, 12:48:24 PM
is there no way to know which mod this is from ?
Title: Re: Sudden Lag
Post by: hadrienguelque on April 16, 2019, 01:34:15 PM
Okay I've tried Each mod individually and I THINK (still got to check) the bug comes from the mod UN Furnitures.
I'll keep you checked.
Title: Re: Sudden Lag
Post by: hadrienguelque on April 16, 2019, 03:19:07 PM
Yeah, problem fixed
Title: Re: Sudden Lag
Post by: Canute on April 16, 2019, 04:23:00 PM
Don't forget to made a report to the mod author.
Title: Re: Sudden Lag
Post by: Retry_02Hide on June 14, 2019, 12:43:43 PM
I had the same problem happened recently, and I want to ask if there's any way to figure out which mod causes this through the log?
The log just posting the same stuff after every adjustment I tried, and all I have is "filename unknown". How tf this thing happens in an unknown file, at least give us the file location or the xml file's name, the log just help nothing to deal with the problem...
Title: Re: Sudden Lag
Post by: Retry_02Hide on June 14, 2019, 01:32:32 PM
Quote from: Retry_02Hide on June 14, 2019, 12:43:43 PM
I had the same problem happened recently, and I want to ask if there's any way to figure out which mod causes this through the log?
The log just posting the same stuff after every adjustment I tried, and all I have is "filename unknown". How tf this thing happens in an unknown file, at least give us the file location or the xml file's name, the log just help nothing to deal with the problem...
And is there any chances that the save file have been totally corruptted? I tried the same mod setting in a new game and successfully called a trade request in dev mode, but I still have the same error log pops out in my current game.
Title: Re: Sudden Lag
Post by: Canute on June 14, 2019, 01:55:00 PM
Total corrupt mean's you can't load it anymore.
Not playable anymore, when one or more mod's cause so many error's that a normal gameplay isn't working anymore.

That's why i say everyone, don't use a mod when it cause an error on Rimworld startup.
Title: Re: Sudden Lag
Post by: Retry_02Hide on June 14, 2019, 05:57:29 PM
Oh I just find out that I replied in the wrong post 'cause my problem is not totally same us the OP's. My error log is more like other similar issue's post about PlayerItemAccessibilityUtility.
https://ludeon.com/forums/index.php?topic=47889.msg452296#msg452296 (https://ludeon.com/forums/index.php?topic=47889.msg452296#msg452296)
But since the same mod set works fine in a new game, could there be any possibility that some item in my colony cause the error occured?
Title: Re: Sudden Lag
Post by: Canute on June 15, 2019, 03:23:12 AM
Not sure about that.
I am not a modder, so don't know the 100% meaning of these error msg.
But from the name i think it could be a pathing issue too. Like when the item is at the right area, and basicly accessable.
But at some reason the game can't find a path to it. Do you use Doors expanded maybe ?
Title: Re: Sudden Lag
Post by: Retry_02Hide on June 15, 2019, 01:25:48 PM
Quote from: Canute on June 15, 2019, 03:23:12 AM
Not sure about that.
I am not a modder, so don't know the 100% meaning of these error msg.
But from the name i think it could be a pathing issue too. Like when the item is at the right area, and basicly accessable.
But at some reason the game can't find a path to it. Do you use Doors expanded maybe ?
Already abandoned that mod for a long time. Though it is convenient, it just cause too many compatibility issues and let many stuff bug out.
I don't know how to restore my save to the original state now, I have disabled any mod added in the mid-game (most of them are still unused 'cause I didn't build or research yet),  but it seens some part deep in the save file has been f**ked. Maybe I will just go on a game without trade request.
BTW, I take a look over any other game saves(4-5 different saves), but can't find any trade request incident between the
'queuedincident' code, weird.
Title: Re: Sudden Lag
Post by: Canute on June 15, 2019, 01:34:33 PM
Then i just would use these safes, if they works fine so far.
But the incident don't allways need to be the same. The storyteller just want fire an event, but what he use can differ everytime you reload the safegame.

I need to honor you that you searched the forum for your problem allready (many don't do this), but next time try to include the complete logfile (Share log button or the original Rimworld log).
Title: Re: Sudden Lag
Post by: Retry_02Hide on June 16, 2019, 01:01:42 AM
Quote from: Canute on June 15, 2019, 01:34:33 PM
I need to honor you that you searched the forum for your problem allready (many don't do this), but next time try to include the complete logfile (Share log button or the original Rimworld log).
Oh, sorry for forgetting about that. But since the problem has no solution right now, I would just leave my data here to let anyone have similar problems about trade request bug as a reference.
System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.PlayerItemAccessibilityUtility.CacheAccessibleThings (Int32 nearTile) [0x00000] in <filename unknown>:0
  at RimWorld.PlayerItemAccessibilityUtility.Accessible (Verse.ThingDef thing, Int32 count, Verse.Map map) [0x00000] in <filename unknown>:0
  at RimWorld.PlayerItemAccessibilityUtility.PossiblyAccessible (Verse.ThingDef thing, Int32 count, Verse.Map map) [0x00000] in <filename unknown>:0
  at RimWorld.IncidentWorker_QuestTradeRequest+<TryFindRandomRequestedThingDef>c__AnonStorey1.<>m__0 (Verse.ThingDef td) [0x00000] in <filename unknown>:0
  at RimWorld.IncidentWorker_QuestTradeRequest+<TryFindRandomRequestedThingDef>c__AnonStorey1.<>m__1 (Verse.ThingDef td) [0x00000] in <filename unknown>:0
  at System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[Verse.ThingDef].MoveNext () [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1[Verse.ThingDef].AddEnumerable (IEnumerable`1 enumerable) [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1[Verse.ThingDef]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0
  at System.Linq.Enumerable.ToList[ThingDef] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
  at Verse.GenCollection.TryRandomElement[ThingDef] (IEnumerable`1 source, Verse.ThingDef& result) [0x00000] in <filename unknown>:0
  at RimWorld.IncidentWorker_QuestTradeRequest.TryFindRandomRequestedThingDef (Verse.Map map, Verse.ThingDef& thingDef, System.Int32& count) [0x00000] in <filename unknown>:0
  at RimWorld.IncidentWorker_QuestTradeRequest.TryGenerateTradeRequest (RimWorld.Planet.TradeRequestComp target, Verse.Map map) [0x00000] in <filename unknown>:0
  at RimWorld.IncidentWorker_QuestTradeRequest.TryExecuteWorker (RimWorld.IncidentParms parms) [0x00000] in <filename unknown>:0
  at RimWorld.IncidentWorker.TryExecute (RimWorld.IncidentParms parms) [0x00000] in <filename unknown>:0
  at RimWorld.Storyteller.TryFire (RimWorld.FiringIncident fi) [0x00000] in <filename unknown>:0
  at RimWorld.IncidentQueue.IncidentQueueTick () [0x00000] in <filename unknown>:0
  at RimWorld.Storyteller.StorytellerTick () [0x00000] in <filename unknown>:0
  at Verse.TickManager.DoSingleTick () [0x00000] in <filename unknown>:0

(just totally same as other thread)
mod list:
<li>BetterLoading</li>
      <li>Startup impact</li>
      <li>Core</li>
      <li>HugsLib</li>
      <li>JecsTools</li>
      <li>RuntimeGC</li>
      <li>RIMMSLoadUp</li>
      <li>EdB Prepare Carefully</li>
      <li>Mod Manager</li>
      <li>Colony Manager</li>
      <li>Sparkling Worlds - Full Mod</li>
      <li>Giddy-up! Core</li>
      <li>Miscellaneous 'CORE'</li>
      <li>Project RimFactory - Core</li>
      <li>Giddy-up! Ride and Roll</li>
      <li>Giddy-up! Battle Mounts</li>
      <li>Giddy-up! Caravan</li>
      <li>Humanoid Alien Races 2.0</li>
      <li>Vanilla Animals Expanded — Livestock</li>
      <li>More Faction Interaction</li>
      <li>[KV] Faction Control - 1.0</li>
      <li>Faction Discovery</li>
      <li>Rimworld Westernization Project</li>
      <li>[RH] Faction: The Ghosts (1.0)</li>
      <li>[RH] Faction: Umbra Company (1.0)</li>
      <li>NewRatkinPlus</li>
      <li>Forsakens</li>
      <li>Kurin, The Three Tailed Fox</li>
      <li>Rimsenal - Feral</li>
      <li>Hospitality</li>
      <li>Dubs Bad Hygiene</li>
      <li>Combat Extended</li>
      <li>Combat Extended: Chemical Distilling</li>
      <li>Combat Extended Guns</li>
      <li>[1.0] Combat Extended: Shields</li>
      <li>What the hack?!</li>
      <li>Rimsenal - Enhanced Vanilla Pack</li>
      <li>Rimsenal - Enhanced Vanilla + Combat Extended Compatibility Patch</li>
      <li>[1.0] Ratkin + Combat Extended Compatibility Patch</li>
      <li>Kurin CE Pach</li>
      <li>Forsakens CE Patch</li>
      <li>Kurin, Apparel Fix</li>
      <li>Vanilla Animals Expanded — Livestock CombatExtended Patch</li>
      <li>Sparkling Worlds - CE Patch [1.0] - Combat Extendend Compatibility</li>
      <li>Rimsenal - Feral + Combat Extended Patch</li>
      <li>Rimworld Westernization Project + Combat Extended Compatibility Mod</li>
      <li>Misc. Robots</li>
      <li>Misc. Robots++</li>
      <li>Project RimFactory - Insanity</li>
      <li>Project RimFactory - Drones</li>
      <li>Project RimFactory - Storage</li>
      <li>Job Splitter</li>
      <li>Pawn Rules</li>
      <li>Better Pawn Control</li>
      <li>Animals Logic</li>
      <li>Allow Tool</li>
      <li>Hardworking animals 1.0</li>
      <li>OgreStack</li>
      <li>LWM's Deep Storage</li>
      <li>Pick Up And Haul</li>
      <li>Haul to Stack</li>
      <li>I Clearly Have Enough!</li>
      <li>[KV] Improved Load Transport Pods</li>
      <li>Meals On Wheels</li>
      <li>RunAndGun</li>
      <li>Search and Destroy</li>
      <li>[1.0] Material Filter</li>
      <li>Incident Person Stat</li>
      <li>Rah's Bionics and Surgery Expansion</li>
      <li>[1.0] DE Surgeries for RBSE only</li>
      <li>A Dog Said... Animal Prosthetics</li>
      <li>[RH] The Ghosts - A Dog Said.. Patch (1.0)</li>
      <li>Bionic icons</li>
      <li>Children, school and learning</li>
      <li>Alien Children Compatibility</li>
      <li>ED-EnhancedOptions</li>
      <li>Achtung!</li>
      <li>Avoid Friendly Fire</li>
      <li>Snap Out!</li>
      <li>Dubs Break Mod</li>
      <li>Therapy</li>
      <li>[SYR] Set Up Camp</li>
      <li>QualityBuilder</li>
      <li>Replace Stuff</li>
      <li>[KV] Save Storage, Outfit, Crafting, Drug, &amp; Operation Settings - 1.0</li>
      <li>Share The Load</li>
      <li>Down For Me</li>
      <li>Hunt for Me</li>
      <li>Raids For Me</li>
      <li>Run and Hide</li>
      <li>Harvest Organs Post Mortem - 4.1 [1.0]</li>
      <li>Hold Open Opens Doors</li>
      <li>Idle Power Consumption</li>
      <li>Prison Labor</li>
      <li>Prisoner Harvesting</li>
      <li>Quarry 1.0</li>
      <li>Skilled Stonecutting</li>
      <li>[CP] Prisoner Outfit (1.0)</li>
      <li>[KR]KRFemaleBodyOP-B19</li>
      <li>[KV] Show Hair With Hats or Hide All Hats - 1.0</li>
      <li>[NL] Chibi Face Female only</li>
      <li>[NL] Chibi Face Male only</li>
      <li>Rimsenal - Rimhair</li>
      <li>gloomy_hair</li>
      <li>[CP] Detailed Body Textures (1.0)</li>
      <li>Clutter Structures</li>
      <li>Clutter "The Door Stuff"</li>
      <li>Clutter "Windows Stuff"</li>
      <li>Rimatomics</li>
      <li>Rimefeller</li>
      <li>Replimat</li>
      <li>[sd] advanced powergeneration</li>
      <li>Roads of the Rim</li>
      <li>[L] House Maid Nukos</li>
      <li>House Maid Nukos CE Patch</li>
      <li>Cargo Pod Transport[1.0]</li>
      <li>VGP Vegetable Garden</li>
      <li>VGP_CoffeeTeaDrugs</li>
      <li>VGP Garden Medicine</li>
      <li>VGP Garden Gourmet</li>
      <li>VGP Garden Drinks</li>
      <li>VGP Garden Fabrics</li>
      <li>[CP] Rimmu-Nation - Weapons (1.0)</li>
      <li>[CP] Rimmu-Nation - Clothing (All Craftable!) (1.0)</li>
      <li>ROK ARMY MOD CE compatible</li>
      <li>More Vanilla Turrets [1.0]</li>
      <li>Mechanoid Blaster</li>
      <li>Pulsefire Turret</li>
      <li>Defensive Machine Gun Turret Pack</li>
      <li>Expanded Roofing</li>
      <li>Defensive Positions</li>
      <li>[RF] Concrete [1.0]</li>
      <li>[1.0] Defenses Expanded</li>
      <li>[v1.0]-LinkableDoors</li>
      <li>Centralized Climate Control</li>
      <li>[KV] RimFridge - 1.0</li>
      <li>FashionRIMsta</li>
      <li>Tilled Soil</li>
      <li>Combat Training</li>
      <li>Combat Training - Unofficial CE Patch</li>
      <li>Dubs Mint Minimap</li>
      <li>Fences And Floors</li>
      <li>Locks</li>
      <li>Release-Animals-into-Wild-master</li>
      <li>MendAndRecycle</li>
      <li>More Batteries</li>
      <li>Simple sidearms</li>
      <li>Repair Workbench</li>
      <li>P-Music</li>
      <li>RT Fuse</li>
      <li>Simply More Bridges</li>
      <li>RT Power Switch</li>
      <li>PowerSwitch</li>
      <li>Door Mat R1.0</li>
      <li>[CP] Red Horse Furniture (1.0)</li>
      <li>More Furniture [1.0]</li>
      <li>RimWriter - Books, Scrolls, Tablets, and Libraries</li>
      <li>Misc. Training</li>
      <li>Realistic Rooms</li>
      <li>Giddy-Up! Add-on: Animal Saddles</li>
      <li>Wall Light</li>
      <li>Survivalist's Additions</li>
      <li>BuilderTweaks</li>
      <li>Dub's Paint Shop</li>
      <li>Metal Doesn't Burn</li>
      <li>[CP] Metal Gear Solid - Incident Sounds (1.0)</li>
      <li>[FSF] Rain Washes Away Filth</li>
      <li>[NL] Custom Portraits</li>
      <li>Extra Traits for CE</li>
      <li>ShowModDesignators</li>
      <li>Progress Renderer</li>
      <li>AnimalHarvestingSpot (Continued)</li>
      <li>[KV] Trading Spot - 1.0</li>
      <li>Transport Downed Pawns</li>
      <li>Tables+</li>
      <li>Camera+</li>
quite impossible to find out the problem in the mid-game as a heavy modder like me, ha :D
Edit:problem solvedjust find out that I accidentally installed MVT with CE, thier compatibility issue just caused the chain effect and made a lot of other mods unable to work.
Title: Re: Sudden Lag
Post by: Canute on June 16, 2019, 05:21:11 AM
Even when you think it is the same error, it isn't
At the first posting the 2. line show
"RimWorld.StatWorker_MarketValue.CalculatedBaseMarketValue "
while yours are
"RimWorld.PlayerItemAccessibilityUtility.CacheAccessibleThings"

But even when you don't find a trade request at the incident queue, you just could test out to delete all incidents from the safegame (don't forget to backup) and check if that helps with the lag.
Then you could restore them back and maybe find the incident with the problem.

Yes, you are right. To find the mod which cause the problem is hard, since the error msg. don't show which item cause the problem.
Maybe you can try the Mod sorting tool:
https://ludeon.com/forums/index.php?topic=48518.0
Maybe one of the unknown marked mods :-)