Hi,
I created a custom async task node by subclassing UGameplayTask and adding a function.
After deleting the class, the node in blueprint crashes whenever I hover over it.
I’ve found that the function ‘UK2Node_CallFunction::GetUserFacingFunctionName’ doesn’t check the ‘Function’ parameter for validity, which was the cause of the crash.
Thanks,
.
Hi ,
It sounds like you may already have a fix for this issue. Typically we would recommend that you submit a pull request on GitHub with your fix so we can review it and give you credit if we bring it into the Engine. If you prefer not to submit a pull request, or are not able to do so, please let me know.
Hi ,
Unfortunately I am unable to submit a pull request.
My fix was to simply create and show a default string if the function was invalid.
Cheers,
.
Hi ,
I have been trying to reproduce this crash internally, and so far have not been able to. I made a new class deriving from UGameplayTask, added a public UFUNCTION, added a node for that function to a Blueprint, then deleted the new class from the project. When I hovered the mouse over the node, I didn’t get a crash. Do you happen to have any more details about what your setup was when the crash occurred for you?
Hi ,
I’ve just reproduced it on my machine.
The exact steps I took were:
-
Create the class, then build (see code below).
-
Add the task node into a blueprint (the result is the same for both level blueprints and actor blueprints).
-
Compile, save then close the editor.
-
Delete the class, then build.
-
The task node should now be invalid, and hovering over it will cause the crash.
The invalid node:

I have also added the code I used to reproduce this crash:
UCLASS()
class UMyTask : public UGameplayTask
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category = "MyCategory", meta = (BlueprintInternalUseOnly = "TRUE"))
static UMyTask* MyTaskFunction(UObject* TaskStarter) { UMyTask* Task = NewTask<UMyTask>(TaskStarter); return Task; }
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FMyTaskEvent);
UPROPERTY(BlueprintAssignable)
FMyTaskEvent OnMyTaskEvent;
};
I hope this helps.
Cheers,
.
Hi ,
Just wanted to give you a quick update. I was testing this again in our latest internal version of the Engine, and the Engine is no longer crashing when hovering over the invalid node. Unfortunately I am not sure exactly what change corrected this issue, but the crashing behavior should be resolved in a future released version of the Engine. Thanks for your help in reproducing this one.