CommitAbility Node Causes Micro-Freeze

I’ve been utilizing the Gameplay Ability System for a project of mine, and I’ve encountered a weird bug with one of my Gameplay Abilities in particular.

Every first time the player uses the ability, the game has a micro-freeze. If I’m testing in the editor, the issue doesn’t repeat until I’ve completely closed out of the Unreal Editor and re-opened it. If I’m playing in a Standalone build, it happens every time I boot up a new instance of the standalone game.

I narrowed down the issue to two nodes in particular: The CommitAbility node, and the ApplyGameplayEffectToOwner node. I wanted to narrow down this issue to the CommitAbility node, so I created an override of the C++ method, and added some profiling info in order to figure out what was going on in more detail.

Upon replicating the issue and observing the information, I found out that K2_CommitAbility is calling ObjectLibrary/Engine/Transient.ObjectLibrary whenever this spike happens, and that particular call is taking around 140 ms, give or take.

I’m not sure what this is doing, and quite frankly I’m not sure how to fix this. None of my other abilities cause any sort of freezing like this, it only seems to happen with this ability in particular.

[Here’s a pastebin of the Blueprint if anyone would like to see.][1] I’ve disconnected and tested everything and it’s only the CommitAbility and ApplyGameplayEffectToOwner nodes that cause the freezing. Also, ignore the two “WaitForGameplayEvent” nodes back-to-back, it was part of a test in order to get the ability to activate at the right time.

(I have also tried “CommitAbilityCooldown” since I don’t use an MP/stamina system, and I’ve encountered the same issue)

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://epicsupport.force.com/unrealengine/s/

Thanks

Thanks so much! I’ll definitely fill out this form as soon as possible. I had been looking for a more direct way of submitting a bug report, but I couldn’t seem to find anything like this!

To anyone who might be reading this: I discovered the bug doesn’t occur when I run a packaged version of the game. This seems like solely an in-editor/standalone issue.