Variables being passed through as null on create widget node

Every variable I try to pass to this create widget node ends up as ‘None’ on the widget blueprint. I have tried passing other variables too. Even the float ‘TileSize’ which is entered directly onto the node comes through as 0.00. I have deleted this node and dropped it in again.

here are some screenshots of the blueprints:

The debug preview watch is known to be a notorious liar (scope is important). What do you get if you Print the component display name instead?

It prints “InventoryComponent”

correction: it prints this
image

So it does work, right? You’re passing correct data. It’s just the debugger not showing it.


May be unrelated: in the first screenshot you create a widget but don’t add it to parent. If you don’t reference it somehow, the garbage collection will scoop it sooner or later.

Holy smokes! that was it. No the debugger was showing the data passed but then all the variables inside the widget blueprint were null. But now I realize that its because the garbage collection must have been getting rid of the widget right away. Thanks for the help!!

1 Like

Nevermind. Sorry I got excited. The Create Widget node executes but the values are still getting passed through as null. I stopped getting the ‘accessed none’ error and now I am getting a ‘set to kill’ error.

Pending Kill? Can you show the message?

yes sorry ‘pending kill’

also you were right the debugger was lying. the values are getting passed through.

image
dont know why the pending kill error though

You’re trying to do fiddle with an actor that has been destroyed and is waiting on the stack to be removed from memory. Probably not directly related to what was discussed above. Start clicking on these to get to the offending nodes:

image

Hard to advise anything without understanding how the whole thing works.

Yeah I dont think it is related. We can definitely call the original issue resolved. I’ll hammer away at this. Thanks again for the help its much appreciated!

1 Like