Sudden Lag

Started by hadrienguelque, April 16, 2019, 08:52:42 AM

Previous topic - Next topic

hadrienguelque

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

Canute

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.

hadrienguelque

#2
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...

Canute

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.


hadrienguelque

is there no way to know which mod this is from ?

hadrienguelque

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.

hadrienguelque


Canute

Don't forget to made a report to the mod author.

Retry_02Hide

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...

Retry_02Hide

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.

Canute

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.

Retry_02Hide

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
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?

Canute

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 ?

Retry_02Hide

#13
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.

Canute

#14
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).