AnimGraphNode_SkeletalControlBase is returning nullptr for in UE 4.20

][1]

The above crash states LowLevelFatalError on skeletalControlBase.h at line 164 at the GetNode() pure virtual function.

This problem never happened in my same plugin project in 4.19,4.18 and so on.

There is no compilation error in visual studio apart from some errors such as “generated files not found” or “source files not found”. While the custom animgraphnode compiles , the moment i try to spawn a node in any animation blueprint , it crashes every time , giving the posted stack trace starting from the GetNode() function.

This problem is also easily reproducible in a minimal class file deriving from AnimGraphNode_SkeletalControlBase.

Example almost blank starter code to reproduce the crash:

pragma once

#include "CoreMinimal.h"
#include "AnimGraphNode_SkeletalControlBase.h"
#include "AnimNode_SkeletalControlBase.h"
#include "AnimGraphNode_Test.generated.h"

USTRUCT(BlueprintInternalUseOnly)
struct PROJECT20_PLUGN_API FAnimNode_TestFeetSolver : public FAnimNode_SkeletalControlBase
{
	GENERATED_BODY()
};

UCLASS()
class PROJECT20_PLUGN_API UAnimGraphNode_Test : public UAnimGraphNode_SkeletalControlBase
{
	GENERATED_BODY()
		
		UPROPERTY(EditAnywhere, Category = Settings)
		FAnimNode_TestFeetSolver ik_node;
public:
	UAnimGraphNode_Test(const FObjectInitializer& ObjectInitializer);
	virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
	virtual FText GetTooltipText() const override;
	virtual FString GetNodeCategory() const override;
	virtual FLinearColor GetNodeTitleColor() const override;

};

.CPP code:

#include "AnimGraphNode_Test.h"

UAnimGraphNode_Test::UAnimGraphNode_Test(const FObjectInitializer & ObjectInitializer)
{
}

FText UAnimGraphNode_Test::GetNodeTitle(ENodeTitleType::Type TitleType) const
{
	return FText::FromString(FString("Test Foot Solver"));
}

FText UAnimGraphNode_Test::GetTooltipText() const
{
	return FText::FromString(FString("Test. Find more details in the document ."));
}

FString UAnimGraphNode_Test::GetNodeCategory() const
{
	return FString("Test Plugin");
}

FLinearColor UAnimGraphNode_Test::GetNodeTitleColor() const
{
	return FLinearColor::Red;
}

The virtual function GetNode() inside for some reason is always returning nullptr from my experimentation. I believe this is a bug introduced in 4.20 and i hope someone from epic can shed some light on this.

I’m struggling with the same issue, same fatal error in call stack. I’ve reset Windows 10, reinstalled VS 2017, Epic Games Launcher, then added a new engine 4.20.2, though to note I did all this in response to same behavior in 4.19.2, then adding 4.20.1, so that’s one thing different here, problem prior to 4.20. One last thing I introduced with this most recent clean slate attempt was to isolate against a corrupted project file, restored from a backup that was stable at the time of backup. I’m out of ideas. Thanks for ideas!

In the end i ended up discarding all my classes derived from skeletalcontrolbase. I use animnode_base and animgraphnode_base instead and copied the necessary functionalities from the skeletalcontrolbase classes. The crash was finally avoided this way.

The skeletalcontrolbase class is directly derived from the base class (both graphnode and animnode). You can read the code from the engine source codes. This can be accesed either through your visual studio or an easy way is to go the engine source in github website and search for the files there. Read how AnimGraphNode_SkeletalControlBase.cpp and AnimNode_SkeletalControlBase.cpp is written. Afterwards its just a matter of replicating the necessary code to your fresh AnimGraphNode_Base.h and AnimNode_Base.h and see how it works.

Codehawk64, I’m jealous of your coding prowess, well beyond my skill level. Thank you for the prompt response, you see how I’ve been chasing my tail. How do I discard classes, identify necessary functionalities, move forward? Much appreciated.

I’m searching documentation on something so basic as how to open the engine from VS, finding how to setup VS, fine, but not seeing the basic steps to opening the engine. It seems intuitive to go File> Open> Project Solution, yes? I then navigate to the Engine folder> Binaries> Win64, yes? Is it then UE4Editor I’ll be opening to search for AnimGraphNode_SkeletalControlBase.ccp and Animnode_SkeletalControlBase.ccp?

I’ve only once had to modify an engine and compile from source code (FFakeStereoRenderer), recall being stuck with that custom build engine version, having to compile again whenever I wished to upgrade the engine. Do you believe this behavior to be a bug?, not loving the work around route. Again, not fun being the toddler drooling on itself making what to you are simple changes, but appreciate a bit of hand-holding, if you can walk me through just how these changes are implemented. Thanks.

Try adding this to UAnimGraphNode_Test:

virtual const FAnimNode_TestFeetSolver* GetNode() const override
{
    return &ik_node;
}