SKKmods Posted July 20, 2018 Share Posted July 20, 2018 Working with StartDeferredKill ... EndDeferredKill to manage limb damage death, all wonderful except that occasionally OnDeferredKill events on an actor stack and dump. Work fine then every 5 ... 20 (ish) deferred kill deaths it suddenly spins out of control generating a stackdump of 150 call requests on a single actor: Count of suspended stacks is over our warning threshold, dumping stacks: [alias ReplaceNPC on quest SKK_476NPCQuest (02028223)].SKK_476ReplaceNPCAliasScript.OnDeferredKill() - (requested call) Which is odd as there is only one StartDeferredKill registration for any actor, who only gets ONHIT() and put into DeferredKill once, so the stack of 150 requests must be the platform poking itself. Once it dumps the actor is handled properly to OnDeath. Predictably, the system ignores the next 1 ... 3 StartDeferredKill registrations, then behaves normally for new registrations. StartDeferredKill registration volumes makes no difference from 1 to ~50 concurrent, it seems more related to the count of OnDeferredKill events. Anyone come across similar symptoms ? Link to comment Share on other sites More sharing options...
Reneer Posted July 20, 2018 Share Posted July 20, 2018 I had something kind of similar happening with my Destructible Lights mod where each lightmarker script was registering with the main quest script using RegisterForCustomEvent. Since the lightmarkers are created at runtime there could be anywhere from 10 to upwards of 450 of them in a given cell. Eventually I had to add in a Wait timer with a random float to lower the number of calls being done at the same time. Honestly I'm not sure how applicable my situation is to what you are experiencing, but merely denotes that the system can be wonky sometimes. :/ Link to comment Share on other sites More sharing options...
SKKmods Posted July 23, 2018 Author Share Posted July 23, 2018 (edited) Public service announcement: OnDeferredKill() fires every time a registered actor takes a hit with AV health below 0. This is fine if an actor takes one or two hits during DeferredKill, but after ~100 hits (or 100 actors taking 1 hit) the stack will dump. Using Event OnHit() instead works perfectly with 100 actors taking hundreds of hits. Clearly a use case limitation or platform defect with event OnDeferredKill() - avoid bulk use. Edited July 23, 2018 by SKK50 Link to comment Share on other sites More sharing options...
Recommended Posts