Access None in Level Blueprint on packaged build, but works in Editor

Hello Community!

I’m having a severe issue with some variables being None on packaged builds (Windows 64-bit to be exact) and being valid in Editor. In the Level Blueprint, I did the ‘IsValid’ checks on them and still no luck… Ever since I upgraded to 4.21 it’s been this way. I’m not sure if this is a potential bug, but it’s been happening. If anyone has solved this issue before, please let me know :(.

NOTE The only ones that are doing this are the UserWidget objects… My MainMenu Widget does this as well with the exact same ‘IsValid’ setup on packaged builds since 4.21 . I’ve even tried to use a widget that I know works in game as well… but for some reason in Level Blueprint, this just does not work.

UPDATE I decided to decouple the Cutscene Skip User Widget to be communicated with the Pawn in the scene. This actually fixes the issue, but doesn’t explain why this is happening within the Level Blueprint to be broken?

[2019.02.10-12.02.22:549][ 66]LogScript: Warning: Accessed None trying to read property SkipUI
	Introduction_C /Game/FirstPersonCPP/Levels/Introduction/Introduction.Introduction:PersistentLevel.Introduction_C_3
	Function /Game/FirstPersonCPP/Levels/Introduction/Introduction.Introduction_C:ExecuteUbergraph_Introduction:0124

Sounds like this could be an issue with initialization order. This is not guaranteed to be identical in editor and packaged build.
Do you do any work in begin play nodes? Could it be the case that you are doing something before the pawn has been initialized and that is why it is not valid at the time you are trying to create the widget?

If this is the case try to reorder your code so the beginplay logic doesn’t depend on specific actors being initalized or make it wait until they are.

jevk,

I have an ‘Introduction Pawn’ in the scene right now by default. I also have the player controller possessing the pawn before creating the Widget as well.

I actually solved the problem @jevk ! Thanks to you, I got a brain blast on what could be happening.

Soo from the above comment I posted, the actor that contains another widget blueprint is being casted to bind an event. Little did I know this was the crippling issue on the rest of the callstack in Begin Play. Strange enough, Level Blueprint doesn’t like binding events to a component from an existing actor? So I created delegates within the actors that contain the widget and binded a custom event within the actor to call the delegate to Level Blueprint. That there worked 100%. … If anyone wants details/visuals on how I did this, I can post the image in the comments