Solved - Accessed None trying to read property... that I know is valid.

Hai, noob here, because this makes NO sense to me and I feel like it should be relatively simple.

To explain screenshots, the first one is the error being thrown and the node which is pointed to. I have inserted “IsValid” nodes in place of the main menu variable and the loading progress variable, and both of them return as valid references, but when I plug them into the “set percent” node, it returns that error.

](filedata/fetch?id=1835894&d=1606271998)

The weirdest thing to me is that this is the exact same variable used in second screenshot, and that one doesn’t throw the error.

](filedata/fetch?id=1835895&d=1606272121)

This is in the same blueprint BEFORE the node that throws the error.

](filedata/fetch?id=1835896&d=1606272272)

I went to the first instance where these events are called, and put a full one second delay on it firing, to be 100% sure that the main menu widget was loaded in before it fired, and it still throws the error. At this point I am suspicious that something is firing pre-emptively due to the event dispatchers loading in on BeginPlay, because even if I disconnect the execution pin for the series of dispatch binders, it still throws the error on test launch even though it compiles cleanly.

What am I missing here?

Try adding an isvalid node before error city. The delay is likely just postponing stuff that is going to fire preemptively regardless.

1 Like

Yeah, that is where I inserted the “is valid” nodes. Came back valid, but nodes after that returned the error anyway.

So if this returns the error regardless, how on earth do I set up the events with the variables so they actually let the program run?

Can you show a close up of where set the MainMenu ref? Or is MainMenu a user widget child of MyHud?

If this is true, then the Output log should show your where it tries to access none.

“is main menu a user child widget of MyHud” - pretty sure it isn’t, though I am not sure if there is a way to manually set it so/if that helps.

Sorry, not at PC for closer screenshot, but the reference is set on sequence output 1, it’s the first three nodes. Construct main menu -> set as variable -> add to viewport.

Makes sense.

If you’re seeing access none errors while not using those dispatchers, the issue is elsewhere - as in, not in visible in the screenshots.

I’m not doubting/saying you are wrong, but then why would the error log point to this series of nodes specifically? I have an error for every one of the nodes in those events marked “error city”, and all of them are the same. “Accessed none” at main menu. I am back at PC now, gonna glance over the things with fresh eyes and see if I missed something stupid.

Ok, I disconnected all of the nodes in the level that call the events bound in that section, and it stopped throwing the error… My absolutely noob assessment is that the level loads before the UI, and the engine is hunting those references at launch before they can be assigned if they are connected in any way. So… I’mma just build the initial launch in the UI itself and see how that goes.

Solved it — You need to create the bindings BEFORE constructing any widget that references the bindings. Derp. This one works, where I just insert the binding in front of the construct node.

This makes little sense. You generally want to do this:

Below, binding to non-existing widget is asking for trouble. This does not work, and it shouldn’t:

But perhaps I misunderstood what you’re attempting to achieve, seeing how the bind targets *Self *in your image. Binding to self makes even less sense as children dispatcher calls are available directly (for widgets that are not created dynamically, that is):

But again, I might be missing the point here completely…

Sorry, should have clarified, the events are in the HUD blueprint, and the widget calls them. They have to be bound before the widget is constructed, because (as far as I can tell) even though it doesn’t fire them, the widget checks it’s components and doesn’t see any event it can call on construct and throws the error.