Weird Bugs called asynchronous event...

Started by Courier, March 12, 2021, 12:24:25 AM

Previous topic - Next topic

Courier

hello i need help i got a bug whenever im trying to use the camp abilities from Syr camp mod... The bugs is as follow:

Exception from asynchronous event: System.NullReferenceException: Object reference not set to an instance of an object
  at GiddyUpRideAndRoll.Harmony.CaravanEnterMapUtility_Enter.MountCaravanMounts (System.Collections.Generic.List`1[T] pawns) [0x00086] in <f2a255b31b7742feb9fc211cbe4c4119>:0
  at (wrapper dynamic-method) RimWorld.Planet.CaravanEnterMapUtility.RimWorld.Planet.CaravanEnterMapUtility.Enter_Patch1(RimWorld.Planet.Caravan,Verse.Map,System.Func`2<Verse.Pawn, Verse.IntVec3>,RimWorld.Planet.CaravanDropInventoryMode,bool)
  at RimWorld.Planet.CaravanEnterMapUtility.Enter (RimWorld.Planet.Caravan caravan, Verse.Map map, RimWorld.Planet.CaravanEnterMode enterMode, RimWorld.Planet.CaravanDropInventoryMode dropInventoryMode, System.Boolean draftColonists, System.Predicate`1[T] extraCellValidator) [0x00074] in <d72310b4d8f64d25aee502792b58549f>:0
  at Syrchalis_SetUpCamp.SetUpCamp_Utility+<>c__DisplayClass3_0.<Camp>b__1 () [0x00028] in <42d22c63d4bf485dbe6a6d7c36549038>:0
  at Verse.LongEventHandler.RunEventFromAnotherThread (System.Action action) [0x00008] in <d72310b4d8f64d25aee502792b58549f>:0
Verse.Log:Error(String, Boolean)
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.<>c:<UpdateCurrentAsynchronousEvent>b__27_0()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()

Anybody know the reason for this ?

Canute

QuoteAnybody know the reason for this ?
Too many bad mods. :-)

Since Giddyup and Setup Camp are very popular mods and normaly don't have issues together, it is prolly one or more of your other mods you use too.
Since "Enter.MountCaravanMounts" i would point at any custom animal, but beside that no idea.

If you can't reproduce it on a new colony, so you can play around with the mod list and deactivate mods, you don't have much chances to find it out.

RawCode

reason for this is lack of safety checks inside "MountCaravanMounts"

it's okay to omit checks for code that under your direct control, but in case of chained injections, mod developers absolutely must implement null checks, especially if one mod may alter arguments for other mods.

Courier

If this help here my modlist

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<ModsConfigData>
<version>1.2.2753 rev712</version>
<activeMods>
<li>brrainz.harmony</li>
<li>ludeon.rimworld</li>
<li>ludeon.rimworld.royalty</li>
<li>smashphil.neceros.srtsexpanded</li>
<li>unlimitedhugs.hugslib</li>
<li>jecrell.jecstools</li>
<li>erdelf.humanoidalienraces</li>
<li>void.charactereditor</li>
<li>oskarpotocki.vanillafactionsexpanded.core</li>
<li>goudaquiche.moharframework</li>
<li>v1024.ebframework</li>
<li>haplo.miscellaneous.core</li>
<li>roolo.whatthehack</li>
<li>roolo.giddyupcore</li>
<li>roolo.giddyupbattlemounts</li>
<li>roolo.giddyupcaravan</li>
<li>roolo.giddyuprideandroll</li>
<li>torann.arimworldofmagic</li>
<li>kure.arom</li>
<li>tostov722.simplehindustrialhfactions</li>
<li>alias.degeneralizework</li>
<li>boxrsxxthvaniatthlingluo881.morehpracticalhtraits</li>
<li>vanillaexpanded.vanillatraitsexpanded</li>
<li>mlie.suprememelee</li>
<li>hams.eternalyouthtraits</li>
<li>chjees.androids</li>
<li>vat.epoeforked</li>
<li>vat.epoeforkedroyalty</li>
<li>atlas.medicinesplus.at</li>
<li>community.psychology.unofficialupdate</li>
<li>frozensnowfox.filthvanisheswithrainandtime</li>
<li>orion.hospitality</li>
<li>dubwise.dubsbadhygiene</li>
<li>petetimessix.simplesidearms</li>
<li>mlie.morefactioninteraction</li>
<li>orion.gastronomy</li>
<li>ratys.madskills</li>
<li>weilbyte.nopowerwires</li>
<li>8z.dormitoriesnotbarracks</li>
<li>dhultgren.smarterconstruction</li>
<li>rosco.morebackstories</li>
<li>longercfloor.proxyheat</li>
<li>rainbeausfishing.reworkmod</li>
<li>elseud.thisismine</li>
<li>mlie.realdining</li>
<li>ben.nrcq</li>
<li>gguake.apparelbodyresolver</li>
<li>ac.mw.sad</li>
<li>smashphil.loadinginprogress</li>
<li>velc.hatsdisplayselection</li>
<li>fluffy.blueprints</li>
<li>dubwise.dubsmintmenus</li>
<li>brrainz.achtung</li>
<li>antaioz.tdiner</li>
<li>roolo.runandgun</li>
<li>falconne.aff</li>
<li>roolo.searchanddestroy</li>
<li>roolo.dualwield</li>
<li>avilmask.commonsense</li>
<li>weilbyte.snapout</li>
<li>uuugggg.replacestuff</li>
<li>fluffy.pharmacist</li>
<li>brrainz.cameraplus</li>
<li>orion.brightflames</li>
<li>jaxe.bubbles</li>
<li>bar0th.war</li>
<li>derekbickley.ltocolonygroupsfinal</li>
<li>captainmuscles.beatyourprisoners</li>
<li>dylan.csl</li>
<li>troopersmith1.agemattersupdated</li>
<li>captainmuscles.callouts</li>
<li>cp.rimdeed</li>
<li>swedishmask.propershotgunspatch</li>
<li>vanya.polarisbloc.corelab</li>
<li>vanya.polarisbloc.securityforce</li>
<li>vanya.polarisbloc.mechenemy</li>
<li>saakra.empire</li>
<li>kikohi.cybernetic</li>
<li>ssulunge.bbbodysupport</li>
<li>gloomy.gloomyfacemk2</li>
<li>mireia.bodies</li>
<li>xedos.arsenalexotic</li>
<li>oblitus.animalslogic</li>
<li>hol.words</li>
<li>rimsenal.core</li>
<li>rimsenal.security</li>
<li>rimsenal.federation</li>
<li>rimsenal.feral</li>
<li>rimsenal.hair</li>
<li>rimsenal.evp</li>
<li>ameiro.animehairs</li>
<li>sakama.roppoihair</li>
<li>vanya.agent.lolidrophairshop</li>
<li>lat.veehair</li>
<li>jintuzilamian.hairstyle.afuwomenshairstyles</li>
<li>jintuzilamian.hairstyle.afumenshairstyles</li>
<li>gloomy.gloomyhairmk2</li>
<li>mlie.thewitchertrials</li>
<li>crustypeanut.wce2.core</li>
<li>vanillaexpanded.vwe</li>
<li>vanillaexpanded.vwel</li>
<li>vanillaexpanded.vweq</li>
<li>vanillaexpanded.vwehw</li>
<li>vanillaexpanded.vwec</li>
<li>vanillaexpanded.varme</li>
<li>vanillaexpanded.vappe</li>
<li>vanillaexpanded.vfecore</li>
<li>vanillaexpanded.vfemedical</li>
<li>vanillaexpanded.vfesecurity</li>
<li>vanillaexpanded.vfeproduction</li>
<li>vanillaexpanded.vfefarming</li>
<li>vanillaexpanded.vfespacer</li>
<li>vanillaexpanded.vfepropsanddecor</li>
<li>vanillaexpanded.vfeart</li>
<li>vanillaexpanded.vee</li>
<li>vanillaexpanded.vcef</li>
<li>vanillaexpanded.vcooke</li>
<li>vanillaexpanded.vplantse</li>
<li>vanillaexpanded.vbookse</li>
<li>vanillaexpanded.vbrewe</li>
<li>vanillaexpanded.vcookestews</li>
<li>vanillaexpanded.vcookesushi</li>
<li>
oskarpotocki.vanillafactionsexpanded.settlersmodule
</li>
<li>
oskarpotocki.vanillafactionsexpanded.medievalmodule
</li>
<li>oskarpotocki.vfe.vikings</li>
<li>oskarpotocki.vfe.insectoid</li>
<li>mlie.cyberneticwarfare</li>
<li>dubwise.rimefeller</li>
<li>dubwise.rimatomics</li>
<li>itzal.pi.mp</li>
<li>itzal.pi.bg</li>
<li>itzal.vw.eg</li>
<li>itzal.vw.cp</li>
<li>itzal.pi.tmg</li>
<li>itzal.pi.cp</li>
<li>itzal.vw.emg</li>
<li>itzal.pi.sd</li>
<li>itzal.pi.laser</li>
<li>kyrrisayo.weaponsplus</li>
<li>zerophoenix.contractorsarsenalfaction</li>
<li>captainmuscles.partyyourassoff</li>
<li>brassy.sfguns.vanilla</li>
<li>gunmar.moremeleeweapons</li>
<li>mlie.sdadvancedpowergeneration</li>
<li>albion.sparklingworlds.full</li>
<li>ratys.rtsolarflareshield</li>
<li>arandomkiwi.mercenariesforme</li>
<li>arandomkiwi.powerpp</li>
<li>murmur.walllight</li>
<li>machine.rtr</li>
<li>void.terraformrimworld</li>
<li>citrus.expectationsmodifier</li>
<li>fridgebaron.immortals</li>
<li>k.psitech</li>
<li>5katz.commschat</li>
<li>spdskatr.projectrimfactory</li>
<li>rimfridge.kv.rw</li>
<li>lwm.deepstorage</li>
<li>tmc.armory.assaultrifle.1</li>
<li>tmc.armory.shotguns.1</li>
<li>tmc.armory.sidearms.1</li>
<li>tmc.armory.smgs.1</li>
<li>tmc.aam</li>
<li>tmc.armory.rf.1</li>
<li>tmc.armory.sw.1</li>
<li>tmc.armory.communitypack</li>
<li>sy4.vanilla.weapon.pack</li>
<li>simmin.afan</li>
<li>jangodsoul.ghostr.wa</li>
<li>jangodsoul.frog.mgs4</li>
<li>jangodsoul.bot.soldier</li>
<li>harkon.df.dusk</li>
<li>aoba.tent</li>
<li>kenshi.armory.geminingen</li>
<li>harkon.gunnut.chapter1</li>
<li>harkon.gunnut.chapter2</li>
<li>harkon.gunnut.community</li>
<li>harkon.gunnut.krissvector</li>
<li>harkon.gunnut.ksgshotgun</li>
<li>mlie.rimwriter</li>
<li>jangodsoul.eft.apparel</li>
<li>jangodsoul.exileddawn</li>
<li>jangodsoul.simplestorage</li>
<li>cheerybelle.syntheticleather.complete</li>
<li>syrchalis.setupcamp</li>
<li>halo.rsf</li>
<li>ogre.advancedhydroponics</li>
<li>dninemfive.settlementdescription</li>
<li>mlie.tacticalchargedgear</li>
<li>murmur.pawnnamevariety</li>
<li>fuji.srts.rimheli</li>
<li>sumghai.medpod</li>
<li>rusticfox.chickenplucker.rr</li>
<li>notfood.mendandrecycle</li>
<li>neceros.srtsexpandedoldgenesis</li>
<li>com.distman.gastrap</li>
<li>mlie.rebound</li>
<li>aoba.musket</li>
<li>alien.arasakacorporation</li>
<li>alaestor.quantumcooling</li>
<li>andross.combatenthusiastscollection</li>
<li>daylight.colorfuleggplant</li>
<li>jangodsoul.simplestorage.ref</li>
<li>wofl.morefurnitureupdated</li>
<li>nephlite.orbitaltradecolumn</li>
<li>paradox.morevanillaturrets</li>
<li>nanoce.glasslights</li>
<li>erin.japanesefurniture</li>
<li>aoba.fortress.neolithic</li>
<li>nuke.synthmeat</li>
<li>mlie.razzledazzle</li>
<li>ratys.rtfuse</li>
<li>haplo.miscellaneous.mapgenfactionbase</li>
<li>haplo.miscellaneous.incidents</li>
<li>haplo.miscellaneous.training</li>
<li>mlie.simplymorebridges</li>
<li>kongmd.qee</li>
<li>cp.retro.joy</li>
<li>cp.military.furniture</li>
<li>tmc.eft.melee</li>
<li>kegarr.wftv</li>
<li>kentington.saveourship2</li>
<li>sarg.alphaships</li>
<li>hlx.ultratechalteredcarbon</li>
<li>spoonshortage.adogsaidanimalprosthetics</li>
<li>sarg.geneticrim</li>
<li>ayameduki.harxenoorca</li>
<li>ayameduki.haridhale</li>
<li>ayameduki.harsilkiera</li>
<li>ayameduki.harnearmare</li>
<li>ayameduki.harneclose</li>
<li>haduki.ancientspecies</li>
<li>jkviolet.rakkleracemode.copy</li>
<li>fs.reviarace</li>
<li>ssulunge.kijinrace2</li>
<li>runnelatki.rabbieracemod</li>
<li>nemonian.my</li>
<li>gloomylynx.dragonianrace</li>
<li>solaris.ratkinracemod</li>
<li>dianawinters.orassans</li>
<li>roo.antyracemod</li>
<li>seioch.kurin.har</li>
<li>outremer.epona</li>
<li>rutranickers.nakedkurinreskin</li>
<li>rutranickers.kurinharapparelpatch</li>
<li>toyama.xenoorca</li>
<li>toyama.haridhale</li>
<li>toyama.harsilkiera</li>
<li>nif.nearmare.engtranslation</li>
<li>overlordsos.rabbieenglishpatch</li>
<li>bichang.frilleus</li>
<li>sarg.magicalmenagerie</li>
<li>sarg.alphaanimals</li>
<li>sarg.geneticrimalphaanimals</li>
<li>mlie.callofcthulhucosmichorrors</li>
<li>sarg.geneticrimcosmichorrors</li>
<li>mlie.medicalsupplements</li>
<li>sineswiper.xenobionicpatcher</li>
<li>user19990313.runtimegc</li>
</activeMods>
<knownExpansions>
<li>ludeon.rimworld.royalty</li>
</knownExpansions>
</ModsConfigData>

I dont know any icompactibility with each mod....

Courier

Found it it seems that certain event has started that changing some of the pawn location... Imma testing it now

RawCode

start from removing runtimegc, dunno why people installs it, but it do nothing good.

Alenerel

Quote from: RawCode on March 13, 2021, 09:48:01 AM
start from removing runtimegc, dunno why people installs it, but it do nothing good.

It makes my game quite faster when removing more than 400 dead pawns

Canute

I don't think it run's faster/slower because of dead pawns.
They are just a list of dead pawn, no interaction with them.
Just the safegame is smaller and maybe Rimworld use less RAM.
But i am not an expert and could be wrong.

Only when you use a 32bit client and you are close to the 3.2 GiB max RAM for a task, it could be useful.


Alenerel

I read in several posts that dead pawns use ticks, and thus use cpu power. But what I can tell you for sure is that my late game usually lags and stays at 30-40 fps, and when I reach 10-20 fps and use the remove dead bodies option it jumps back to around 50. Its a very noticeable effect

I wish I knew which mods used the most CPU power...

RawCode

kay, game do tick dead pawns, partially, how long in nanoseconds such partial ticks lasts?
have you read such information in that several posts?
do that posts have results of profiling or something similar?

instance of pawn object is 256+61*64 bytes (4160 or 4kb) (shallow, there is technique of deep memory footprint calculation, but i can't run it right now)
and removing pawn object from list will not cause it's collection, especially if some random mod hold reference to it for any reason

just checked runtimegc code and found no "magical" code related to garbage collection or anything similar, it absolutely can't decrease memory consumption of the game by significant amount and absolutely can't fix memory leaks caused by other mods.