Rain World

Rain World

Artificer Revive on Kill
GreenStar 23 Sep, 2023 @ 7:56pm
Exception logs.
Here, I'll go first.


NullReferenceException: Object reference not set to an instance of an object
DMD<Violence>?130158848._Scavenger::Violence (Scavenger this, BodyChunk source, System.Nullable`1[T] directionAndMomentum, BodyChunk hitChunk, PhysicalObject+Appendage+Pos hitAppendage, Creature+DamageType type, System.Single damage, System.Single stunBonus) (at <789f09f28ab247639d900291ce41b2e7>:0)
DMD<>?130158848.Trampoline<Scavenger::Violence>?-1388596736 (Scavenger , BodyChunk , System.Nullable`1[T] , BodyChunk , PhysicalObject+Appendage+Pos , Creature+DamageType , System.Single , System.Single ) (at <3413da086ddb4768807a01aa41418493>:0)
ReviveOnKill.Plugin.Scavenger_Violence (On.Scavenger+orig_Violence orig, Scavenger self, BodyChunk source, System.Nullable`1[T] directionAndMomentum, BodyChunk hitChunk, PhysicalObject+Appendage+Pos hitAppendage, Creature+DamageType type, System.Single damage, System.Single stunBonus) (at <1fb8f578ed384f56a0c38fe6967721eb>:0)
DMD<>?130158848.Hook<Scavenger::Violence>?1125387264 (Scavenger , BodyChunk , System.Nullable`1[T] , BodyChunk , PhysicalObject+Appendage+Pos , Creature+DamageType , System.Single , System.Single ) (at <37d73bee371446e4870ba5bfc8a9139c>:0)
KingTusks+Tusk.ShootUpdate (System.Single speed) (at <1014ff9a5d9941ab9e645d4f5c9384a5>:0)
KingTusks+Tusk.Update () (at <1014ff9a5d9941ab9e645d4f5c9384a5>:0)
KingTusks.Update () (at <1014ff9a5d9941ab9e645d4f5c9384a5>:0)
Vulture.Update (System.Boolean eu) (at <1014ff9a5d9941ab9e645d4f5c9384a5>:0)
Room.Update () (at <1014ff9a5d9941ab9e645d4f5c9384a5>:0)
DMD<Update>?130158848._RainWorldGame::Update (RainWorldGame this) (at <5277263b1cb84860b7e65846e8457d3a>:0)
DMD<>?130158848.Trampoline<RainWorldGame::Update>?45975040 (RainWorldGame ) (at <76d5cbc800fc4305a947032a7975373e>:0)
Explorite.KarmaReinforcementReinforcement.Plugin.RainWorldGame_Update (On.RainWorldGame+orig_Update orig, RainWorldGame self) (at <0ba3da7371c542619c582427895a054d>:0)
DMD<>?130158848.Hook<RainWorldGame::Update>?1833925120 (RainWorldGame ) (at <0d1237f2bd8c4103992f9c92e48caf81>:0)
MainLoopProcess.RawUpdate (System.Single dt) (at <1014ff9a5d9941ab9e645d4f5c9384a5>:0)
RainWorldGame.RawUpdate (System.Single dt) (at <1014ff9a5d9941ab9e645d4f5c9384a5>:0)
ProcessManager.Update (System.Single deltaTime) (at <1014ff9a5d9941ab9e645d4f5c9384a5>:0)
DMD<Update>?130158848._RainWorld::Update (RainWorld this) (at <cacb9270ac7442c6a7eb8cdaabfba6f3>:0)
DMD<>?130158848.Trampoline<RainWorld::Update>?1197392896 (RainWorld ) (at <98b1f469400746a4bba711cb34d0c1e0>:0)
Guardian.LogHooks.RainWorld_Update (On.RainWorld+orig_Update orig, RainWorld self) (at E:/RainWorldModding/Guardian/src/plugin/Hooks/LogHooks.cs:70)
UnityEngine.Debug:LogException(Exception)
Guardian.CloudLogger:LogAndUploadException(Exception) (at E:/RainWorldModding/Guardian/src/plugin/CloudLogger.cs:31)
Guardian.LogHooks:RainWorld_Update(orig_Update, RainWorld) (at E:/RainWorldModding/Guardian/src/plugin/Hooks/LogHooks.cs:74)
DMD<>?130158848:Hook<RainWorld::Update>?1633013248(RainWorld)
< >
Showing 1-7 of 7 comments
TheScaryDoor  [developer] 23 Sep, 2023 @ 11:50pm 
Uhh that's weird. This shows a crash happening in the original Scavenger.Violence() function. But ReviveOnKill hasn't done anything up to that point. All it did was pass the arguments as-is to Scavenger.Violence().

Presumably this NullReferenceException would have happened without ReviveOnKill, but I don't see how it could have been possible with the implementation of KingTusks.Tusk.ShootUpdate(). The values that ShootUpdate() passes to Violence() should always be valid.

----

How did you produce this crash? Is it repeatable? Do you have any mods that might be modifying the King Vulture behavior?
Last edited by TheScaryDoor; 24 Sep, 2023 @ 12:03am
WillowWispy 14 Jan, 2024 @ 8:41pm 
Someone sent me some exception logs that seem to be from this mod. It looks like it's errors out as players stop existing, you probably want to make sure the hud is checking that the realized player isn't null before running ShouldDisplayLives

NullReferenceException: Object reference not set to an instance of an object
at ReviveOnKill.Plugin.IsArtificer (Player p) [0x00008] in <465b3e72d6634eaeb87daa144eefd141>:0
at ReviveOnKill.ReviveCountHud.ShouldDisplayLives (Player p) [0x00001] in <465b3e72d6634eaeb87daa144eefd141>:0
at ReviveOnKill.ReviveCountHud.Update () [0x00248] in <465b3e72d6634eaeb87daa144eefd141>:0
at DMD<Update>?-379756928._HUD_HUD::Update (HUD.HUD this) [0x00068] in <248aecce0f6d4d5d9f5bf6afdbb0c248>:0

Hope this helps!
Last edited by WillowWispy; 14 Jan, 2024 @ 8:42pm
TheScaryDoor  [developer] 14 Jan, 2024 @ 10:19pm 
Thanks, added a null check as a quick fix, but I'm not really sure what caused this. Can players disappear? Killing/destroying doesn't seem to trigger this

Edit: seems to happen when vultures carry you away
Last edited by TheScaryDoor; 14 Jan, 2024 @ 10:37pm
WillowWispy 15 Jan, 2024 @ 7:35am 
Thanks for the quick fix! Yea I didn't see how it happened myself, but I think some mods like pokeballs and the parasitic can abstract the player without killing them
T.Hybrid21 22 Feb, 2024 @ 4:33am 
NullReferenceException: Object reference not set to an instance of an object
ReviveOnKill.Plugin.Player_Update (On.Player+orig_Update orig, Player self, System.Boolean eu) (at <22a7fe7a48894af3a6e79de5e2376782>:0)
DMD<>?84414720.Hook<Player::Update>?516839424 (Player , System.Boolean ) (at <73ae22aeecc143d888c8fdfe6a20b49c>:0)
DMD<>?84414720.Trampoline<Player::Update>?-1545528320 (Player , System.Boolean ) (at <2f3aa99d900a49129c0fcb23dfab5247>:0)
RotundWorld.patch_Player.BPPlayer_Update (On.Player+orig_Update orig, Player self, System.Boolean eu) (at /RainWorldMods/WillowsMods/patch_Player.cs:7547)
DMD<>?84414720.Hook<Player::Update>?1253630976 (Player , System.Boolean ) (at <75d194cd54834060a9deed4b5a8df41e>:0)
DMD<>?84414720.Trampoline<Player::Update>?-706642944 (Player , System.Boolean ) (at <f7174c03ed7c49ccac45b2d68daf22bb>:0)
StruggleMod.StruggleMod.PlayerStruggleHook (On.Player+orig_Update orig, Player self, System.Boolean eu) (at <e0ce46f1afcc41428ba9fcd5fb55adef>:0)
DMD<>?84414720.Hook<Player::Update>?982799360 (Player , System.Boolean ) (at <c498265cd74243c2979c37ceb09b6868>:0)
DMD<>?84414720.Trampoline<Player::Update>?-1738658816 (Player , System.Boolean ) (at <8e6158317f534787a63eaab4df740718>:0)
Silkslug.Plugin.Player_Update (On.Player+orig_Update orig, Player self, System.Boolean eu) (at <3d5986756cd84394aa791635eb0c9ce9>:0)
DMD<>?84414720.Hook<Player::Update>?1504446976 (Player , System.Boolean ) (at <0d217517ad8a4fc697fdfc4ef12fca71>:0)
DMD<>?84414720.Trampoline<Player::Update>?1397083136 (Player , System.Boolean ) (at <183c5fc254114690947b8edae29a235d>:0)
BeeWorld.Hooks.PlayerMiscHooks.Player_Update (On.Player+orig_Update orig, Player self, System.Boolean eu) (at C:/Users/User/Desktop/Beecat/src/Hooks/PlayerMiscHooks.cs:157)
DMD<>?84414720.Hook<Player::Update>?1260624384 (Player , System.Boolean ) (at <a1fe5a9dfcca43e792b29823d5ef0952>:0)
DMD<>?84414720.Trampoline<Player::Update>?-1013919744 (Player , System.Boolean ) (at <9b4875d6acec4bdea6c2bfca4a482b83>:0)
wa.HoneyFood.Player_Update (On.Player+orig_Update orig, Player self, System.Boolean eu) (at C:/Users/User/Desktop/Beecat/src/Creatures/HoneyComb.cs:265)
DMD<>?84414720.Hook<Player::Update>?-1295585280 (Player , System.Boolean ) (at <4fd73091ded1417db7d980a11879f9e6>:0)
DMD<>?84414720.Trampoline<Player::Update>?-1774397952 (Player , System.Boolean ) (at <6dd1d3e734aa4eb08c2d318249dad2da>:0)
BeeWorld.BupHook.BupsAI (On.Player+orig_Update orig, Player self, System.Boolean eu) (at C:/Users/User/Desktop/Beecat/src/Creatures/BeePup/BupCritob.cs:346)
DMD<>?84414720.Hook<Player::Update>?522666496 (Player , System.Boolean ) (at <151de3b2b62a4330b51c5d467b0c5bbb>:0)
DMD<>?84414720.Trampoline<Player::Update>?1629443072 (Player , System.Boolean ) (at <5ce1977566054644a8839d23de8ea0f5>:0)
CatSub.Cat.AppendCatSub.UpdatePatch (On.Player+orig_Update orig, Player self, System.Boolean eu) (at <ac44ec2992394195aa964993f97973d5>:0)
DMD<>?84414720.Hook<Player::Update>?2065063424 (Player , System.Boolean ) (at <05bdea4e662f4fb2821435b7abe461b7>:0)
DMD<>?84414720.Trampoline<Player::Update>?1372057600 (Player , System.Boolean ) (at <be9072cf9dc942c1b6b2550467310db0>:0)
LancerRemix.Cat.ModifyCat.PlayerUpdate (On.Player+orig_Update orig, Player self, System.Boolean eu) (at <9b8f07d46e4a42a8a64bd2b1e6a5e133>:0)
DMD<>?84414720.Hook<Player::Update>?154405376 (Player , System.Boolean ) (at <f4007bd0e5734fedb63771b924ca10a7>:0)
DMD<>?84414720.Trampoline<Player::Update>?-2078059520 (Player , System.Boolean ) (at <5ac013489db34adb844732d7909567f2>:0)
ExpeditionEnhanced.ExampleContent.CrippledMechanics.Player_Update (On.Player+orig_Update orig, Player player, System.Boolean eu) (at <20682b37aa554d7ea014aa7aa1cd41ba>:0)
DMD<>?84414720.Hook<Player::Update>?-1023162880 (Player , System.Boolean ) (at <83e64fac86464f399a397ad901e6e5d3>:0)
DMD<>?84414720.Trampoline<Player::Update>?2095015424 (Player , System.Boolean ) (at <6f7e7445880f49859bb40893ec38f94c>:0)
BeastMasterPupExtras.BeastMasterPupExtras.PlayerOnUpdate (On.Player+orig_Update orig, Player self, System.Boolean eu) (at <fc044287df58488b9f5b64c04a9b31ce>:0)
DMD<>?84414720.Hook<Player::Update>?1813349888 (Player , System.Boolean ) (at <856c2694e2a641159b40249d4d626aba>:0)
DMD<>?84414720.Trampoline<Player::Update>?-1923710976 (Player , System.Boolean ) (at <47a6f118080a434da9d6f62e218841a0>:0)
RegionKit.Modules.Objects.NoWallSlideZones.PlayerUpdate (On.Player+orig_Update orig, Player self, System.Boolean eu) (at <d1b1d0fea65245628b796fb3fd75518e>:0)
DMD<>?84414720.Hook<Player::Update>?663767040 (Player , System.Boolean ) (at <8bfbf1726ebb45da8a6f5235887080a9>:0)
DMD<>?84414720.Trampoline<Player::Update>?1763275776 (Player , System.Boolean ) (at <7df90dfcbbfc457f9a58f757cf76a00d>:0)
ShinyShieldMask.FaceMasksHandler.FaceMaskUpdate (On.Player+orig_Update orig, Player self, System.Boolean eu) (at <5b8e79d5a4854a0ba590d114a75f4e3b>:0)
DMD<>?84414720.Hook<Player::Update>?1481610240 (Player , System.Boolean ) (at <c75fe008e31148d1a2f918005705debb>:0)
Room.Update () (at <1014ff9a5d9941ab9e645d4f5c9384a5>:0)
DMD<>?84414720.Trampoline<Room::Update>?-78683136 (Room ) (at <906d6b3a032e40d4a02436289427df78>:0)
PitchBlack.WorldChanges.Room_Update (On.Room+orig_Update orig, Room self) (at /PitchBlackDevTeam/Utilities/WorldChanges.cs:82)
DMD<>?84414720.Hook<Room::Update>?-1504506880 (Room ) (at <36ec5f3d0e7d4c1d819683d232f7c8e4>:0)
DMD<>?84414720.Trampoline<Room::Update>?-791152640 (Room ) (at <977f2cb4215c42d69a178ba589b0ced2>:0)
MouseDrag.Hooks.RoomUpdateHook (On.Room+orig_Update orig, Room self) (at <5f8e72e2a31f45a58779803a5f45fee7>:0)
DMD<>?84414720.Hook<Room::Update>?-86230016 (Room ) (at <83fcb5d6df294b0eb2c05e3b09bf7f3a>:0)
DMD<>?84414720.Trampoline<Room::Update>?1134091264 (Room ) (at <9b085bb16c1c4d9d9774f923df8a44e0>:0)
BloodHooks.Room_Update (On.Room+orig_Update orig, Room self) (at C:/Users/Lee/source/repos/Blood/BloodHooks.cs:180)
DMD<>?84414720.Hook<Room::Update>?852425728 (Room ) (at <fbeb793b548b427295fb068fed27f02e>:0)
DMD<Update>?84414720._RainWorldGame::Update (RainWorldGame this) (at <6afe2554edff427296bc75a10b5ae12c>:0)
DMD<>?84414720.Trampoline<RainWorldGame::Update>?220595712 (RainWorldGame ) (at <5ec4ef1fcd0b4f6d887efb5617173451>:0)
MouseDrag.Hooks.RainWorldGameUpdateHook (On.RainWorldGame+orig_Update orig, RainWorldGame self) (at <5f8e72e2a31f45a58779803a5f45fee7>:0)
DMD<>?84414720.Hook<RainWorldGame::Update>?508091392 (RainWorldGame ) (at <8cdd7cf8def4430c84f3126d5d6937cb>:0)
DMD<>?84414720.Trampoline<RainWorldGame::Update>?2092281856 (RainWorldGame ) (at <8b39e31b8905411592a25614940dcb6d>:0)
WhereSlugpupMod.WhereSlugpupMain.RainWorldGame_Update (On.RainWorldGame+orig_Update orig, RainWorldGame self) (at <033ac0337543475e9f90f54e512a9fe1>:0)
DMD<>?84414720.Hook<RainWorldGame::Update>?1211871232 (RainWorldGame ) (at <473b8351cfe94b489b0583154a06320a>:0)
DMD<>?84414720.Trampoline<RainWorldGame::Update>?-563715584 (RainWorldGame ) (at <1512c5cf52974ba08b60720b08763456>:0)
RotundWorld.patch_Player.RainWorldGame_Update (On.RainWorldGame+orig_Update orig, RainWorldGame self) (at /RainWorldMods/WillowsMods/patch_Player.cs:681)
DMD<>?84414720.Hook<RainWorldGame::Update>?-845381120 (RainWorldGame ) (at <53651aa2d0ff4d19a70b4b7ce20121f0>:0)
DMD<>?84414720.Trampoline<RainWorldGame::Update>?1105588224 (RainWorldGame ) (at <8251458fb9844cd0aaac52522c312a32>:0)
SplitScreenCoop.SplitScreenCoop.RainWorldGame_Update (On.RainWorldGame+orig_Update orig, RainWorldGame self) (at <2c9a26d4ad384464bafe029223bf5252>:0)
DMD<>?84414720.Hook<RainWorldGame::Update>?-897711104 (RainWorldGame ) (at <30ce691702ed43d3ad974777c000b740>:0)
DMD<>?84414720.Trampoline<RainWorldGame::Update>?1521167872 (RainWorldGame ) (at <2163f3c799544726afb5b7848fa132a7>:0)

Spawning Artificer as a NPC with Beastmaster causes this error. Kind of niche issue probably but yeah.
TheScaryDoor  [developer] 22 Feb, 2024 @ 9:35pm 
Ok, I think this can be fixed by just checking if the player is an NPC in CanRevive().

For some reason, when the NPC Artificer is first initialized, its class is "Slugpup," so my code ignores it. Then at some later point, it suddenly changes to "Artificer" and starts using my code even though it skipped the initial setup. So that causes the NullReferenceException crash.

I'll patch it later after I test some more
Last edited by TheScaryDoor; 23 Feb, 2024 @ 7:15pm
TheScaryDoor  [developer] 24 Feb, 2024 @ 6:27pm 
Ok, should be fixed :steamthumbsup:, thanks for the report
< >
Showing 1-7 of 7 comments
Per page: 1530 50