Trying to access a property causes blueprint runtime error

Sorry for double posting, I’ve already posted my issue [here][1] but managed to reproduce it in a project from scratch and think it’s really a bug and not something from my code. Here’s what I did:

  • Create a third person BP project

  • Create a c++ class, let’s call it Room, with a FString property like this:

    UPROPERTY(Category = “Room properties”, EditAnywhere, BlueprintReadWrite)
    FString RoomName;

  • Create a blueprint that inherits from this class, place it in the scene

  • In the third person BP, try to display the room name like this

  • Launch the game, press H, the room name is displayed

  • Edit the code to add a comment just above the UPROPERTY

    // I’m a comment
    UPROPERTY(Category = “Room properties”, EditAnywhere, BlueprintReadWrite)
    FString RoomName;

  • Compile, launch, press H, the errors are displayed.

    PIE:Error: Error Blueprint Runtime Error: Attempted to access missing property. If this is a packaged/cooked build, are you attempting to use an editor-only property? from function: ‘ExecuteUbergraph_ThirdPersonCharacter’ from node: Print String in graph: EventGraph in object: ThirdPersonCharacter
    The only way to fix this is to relaunch the editor. I’ve tested this on two different computers to be sure it was not coming from a potentially corrupted installation. I’ve also tested on 4.10, which doesn’t break, but it does breaks on 4.11.1 and 4.11.2.

Am I the only one having this issue? I hope you guys can reproduce it and fix it. :slight_smile:

Thanks in advance.

This is not corruption, it’s hotreload not being perfect it messes up property data and as you notice already you need to restart editor so all modules are loaded properly. But it’s still a bug

1 Like

Is there a way to force hotreload without restarting the editor? I can’t restart it every time I want to compile my code. What’s weird is that it never happened before we updated to 4.11.

Thanks for confirming the bug tho

hotreload when you compile with editor turned on end editor swaps old version of you module with new one, it is not perfect and sometimes act wierd. What you did here is updating reflection data and it seems it’s not doing it right, so restart when you edit header files if you update code in cpp hotreload should be ok. Simply if something behaves odd try restarting. And as said it’s still a bug and it probably know because you not first reporting this.

I hope they release a fix soon, thanks for the info

Hey oristal-

There is a difference in the behavior between the 4.10 and 4.11 engine version. I have entered a bug report about the error message you received (UE-29768) for further investigation. Rather than having to restart the editor, I found that compiling the blueprint with the reference (in your case the character) will update the blueprint and print the name as expected.

Cheers

1 Like

Thanks a lot for acknowledging this behavior! I’m fine with re-compiling the blueprint for the moment, it’s not as bad as I thought :slight_smile:

Also experienced this issue in my project. Thank you for this temporary solution!

Actually I still have this problem, but if you want to fix this you can create getter/setter for value you get/set. It’s not the best solution but it fixes hot_reload bug.

Can you send me a screenshot with the solution?

Bump. This error persists in 4.22 still and the logged error is still marked unresolved.

In my case, I import new data assets via C++ compilation and consolidate objects to clean up, then fix up references. Due to the compiling via hot reload, blueprint classes that make use of the new, consolidated data assets don’t work unless recompiling manually (no compile error beforehand though) or restarting the editor due to “missing properties”.

It’s very simple, if you have for example code like this:

//declararation of variable
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category = "MyCategory")
int someVar;

//get 
UFUNCTION(BlueprintCallable)
int getSomeVar() const { return someVar; } 

//set 
UFUNCTION(BlueprintCallable)
void setSomeVar(int var) { someVar = var; }

It should work after compile.

1 Like

I’m getting this error and the properties are defined in blueprint. Not sure what to make of it, other than maybe that the blueprint is in the process of being destroyed?
UE 4.21

Confirming that we are also dealing with this issue. Yes, it is resolved by restarting the editor, but this is definitely hindering our development process as we have to to restart the editor once this bug appears.

1 Like

Yes, I hope Epic will look into this. Since the bug has quite a few votes and is still unresolved, maybe we should just submit more individual bug reports about this to make a statement on how problematic it is in the long run. The plugin I’m working on for a company right now forces the user to restart the engine upon reimporting data. That’s not because the data doesn’t get reimported, that works nicely, but the blueprints accessing said data just stop working if we don’t force the user to do that.

Users want easily accessible solutions, not some tech mumbo jumbo explaining they have to recompile their affected blueprints. A forced restart is easier, but at the same time shouldn’t be necessary in the first place.

Fix this annoying bug, it’s driving me crazy.
I have to manually recompile every ■■■■■■■ BP.

we’re getting this on 4.22.3 too, for me compiling the related blueprints seems to fix this until another hot reload

I am still getting this bug as well in version 4.22

Getting this on 4.22.3 aswell

4.23 , Issue still persists