ThinkInvis / RoR2-ClassicItems

A mod for Risk of Rain 2.
GNU General Public License v3.0
3 stars 6 forks source link

Possible NullRef in Boxing Gloves while taking damage from DelayBlast #26

Closed ThinkInvis closed 4 years ago

ThinkInvis commented 4 years ago

Reported by a user on Discord; "happens when you kill a glacial enemy and get hit by their freeze", caused glacial explosion to repeat rapidly. Could not reproduce with only Artifact of Honor; may have to do with Artifact of Evolution, multiplayer, a specific character, and/or another mod.

Attached stack trace:


[Error  : Unity Log] NullReferenceException
Stack trace:
UnityEngine.GameObject.GetComponent[T] () (at <2cc17dca390941eeb4d7b2ff1f84696a>:IL_0020)
CustomItem.Hooks.GlobalEventManager_onServerDamageDealtAtg (RoR2.DamageReport obj) (at <6fc2ae4286544c7eab5d76e76212ee24>:IL_0042)
RoR2.GlobalEventManager.ServerDamageDealt (RoR2.DamageReport damageReport) (at <5e1a40d262134ca79e67a64202668d6c>:IL_0009)
DMD<TakeDamage>?546978816._RoR2_HealthComponent::TakeDamage (RoR2.HealthComponent this, RoR2.DamageInfo damageInfo) (at <c0c035f3b8a244bb845e1047e51c96b4>:IL_0A09)
DMD<>?546978816._Trampoline<RoR2_HealthComponent::TakeDamage>?1821048832 (RoR2.HealthComponent , RoR2.DamageInfo ) (at <b4a46834de624f4f9ecc268c15acf10f>:IL_0020)
ThinkInvisible.ClassicItems.BoxingGloves.On_HCTakeDamage (On.RoR2.HealthComponent+orig_TakeDamage orig, RoR2.HealthComponent self, RoR2.DamageInfo di) (at <d65e8c0f1cd84a81bb0933214b2c239f>:IL_00ED)
DMD<>?546978816._Hook<RoR2_HealthComponent::TakeDamage>?200973952 (RoR2.HealthComponent , RoR2.DamageInfo ) (at <56166ba8b9534fb7980f96c0464ac4c8>:IL_0014)
RoR2.BlastAttack.PerformDamageServer (RoR2.BlastAttack+BlastAttackDamageInfo& blastAttackDamageInfo) (at <5e1a40d262134ca79e67a64202668d6c>:IL_0098)
RoR2.BlastAttack.HandleHits (RoR2.BlastAttack+HitPoint[] hitPoints) (at <5e1a40d262134ca79e67a64202668d6c>:IL_01AA)
RoR2.BlastAttack.Fire () (at <5e1a40d262134ca79e67a64202668d6c>:IL_0007)
RoR2.DelayBlast.Detonate () (at <5e1a40d262134ca79e67a64202668d6c>:IL_00A9)
RoR2.DelayBlast.FixedUpdate () (at <5e1a40d262134ca79e67a64202668d6c>:IL_009F)```
ThinkInvis commented 4 years ago

Further testing reveals that enemies having the item (created a command to set Artifact of Evolution itemcounts) does not cause the bug in singleplayer nor in multiplayer. This is likely a character-specific bug or a mod incompatibility.

ThinkInvis commented 4 years ago

May have to do with FriendlyAtgAndBands mod. Still couldn't reproduce the bug with said mod installed, using Commando + Artifact of Honor + Artifact of Evolution and a concmd to add Boxing Gloves to the Evolution pool. Bug possibly addressed by cf75bfca89b2035f9f414cd6283379b84aef51cf.

ThinkInvis commented 4 years ago

This was a standalone bug in the FriendlyAtgAndBands mod.