Using FObjectFinder to find UMG Blueprint crashes on play

I have the following code in my player controller

This compiles fine but when I click Play in the Unreal Editor it crashes

The blueprint is found here

And I have also included UMG in the build.cs. I’m not sure if i need slate and slatecore, but it crashes with or without them.

What am I doing wrong?

The error produced by this was because ContructorHelpers need to be in a constructor, not in begin play