Custom Anim Node causes crash

I’m using Linux and openGL4, I don’t know if it happens on other OSs.

I created a AnimGraphNode and respective AnimNode, based on the implementation of the Modify Bone. I copied the implementation and tweaked it a bit.

So, as the Modify Bone, my classes inherit from UAnimGraphNode_SkeletalControlBase and FAnimNode_SkeletalControlBase.

The problem is that when in the editor, playing, and when focuses (clicked with the mouse) it crashes the UE4Editor.

I’ve debugged a bit and found that it all comes down to the editor trying to cast my classes into the Modify Bone class (UAnimGraphNode_ModifyBone), which fails, of course.

Backtrace

I found the problem.

Since I copied the code from premade samples I missed one little tweak.

UAnimGraphNode_ModifyBone overrides a function named GetEditorMode() that makes it run specific code to interact with the Animation Node in the persona editor.

All I had to was to comment out/delete that function and let it use the default.

1 Like