Getting Accessed None after upgrading to 4.19

Hi, I just upgraded my project from 4.18 to 4.19, but it throws an error. I don’t know what is going on. Been googling and stuff for answers but no clue. It works fine on 4.18, I don’t know why the error comes out on 4.19.

Here’s the blueprint that throws it.

Here’s the error that comes out

Kinda new to Unreal so I don’t know whether it’s a bug or something, but I would appreciate if somebody could provide an insights for this. Thanks.

It’s the HUD Reference variable causing it. It has not been set and is pointing at nothing atm.

Right click it → Find References.

This should give you a list of Get / Set. See if you can find something that is supposed to set it. Double clicking it should take you there.

Let us know if you find anything suspicious.

Here’s the get/set of the HUD Reference, it doesn’t print any when I hit play, I did print the same thing on my 4.18 project, and it did prints out my HUD name. I don’t know what caused it.
Here’s the blueprint:

This is how the 4.18 prints out the string

This is my 4.19 project interface looks like

I’m lost right now…

You need to keep digging. If the pic1 does not print, hook up a Print String to Cast Failed, although it’s unlikely this cast fails.

Where is the HUDReferences function called? Perhaps it’s never called. Again, you can right click and search for it.

The the cast does not fail yet it throws an error above. I did call the HUDReferences function at the Event Graph. I’m not sure what am I missing here.

All right then. Next step is to go to the Player Controller and check what is happening to the Game HUD Reference there, apparently, it’s not being set.

Okey here it is

And here is the variable.

240952-gamehudref.png

Odd. it looks ok.

Is the error message mentioned at the very beginning spammed constantly? I’m wondering whether the WeatherManager actor is allowed to tick before Begin Play. It’s at the top of the ClassDefaults - Allow Tick Before Begin Play.

So hold on, the Hud we see is the actual hud that is causing causing the access none errors?

Yup, it constantly spammed. I did tick the Allow Tick Before Begin Play check box too, both still throwing that same error, and yes, it is the same HUD.
I printed the GameHUDReferences after the Set inside MyPlayerController and it detects my HUD as well.

Right. So we’re at a stage where it’s reasonable to blame the engine.

  • If the project was originally created before 4.18, consider switching off the blueprint compilation manager and see if that helps. It’s in the Project SettingsUse Compilation Manger

  • if that does not help, recreate the part of code that is causing the issues if you have not done so already

  • recompile all the blueprints, one by one :expressionless:

None of it is working :’(, but I tried to replace the HUDReference with GameHUDReference directly from the MyPlayerController instead and its finally working!
Weird, but it works. So now I wonder if I really need to even create that HUDReference variable inside the Weather Manager in the first place… Btw thank you for the help, I appreciated it :slight_smile: