Warning reference will be nullptred bug

Just thought I’d say, I apologise if I’ve called undue fuss here :slight_smile: assuming Epic’s fix below is for the above bug, I’d also recommend taking it, not my code, as they almost certainly know what they’re doing a whole lot more than me! Just glad we have a fix.

fyi, If anybody has had a chance to test their fix in 4.18 (is it compatible?) I’d love to know.

That makes sense. so if this is the case, everybody, I am really sorry for the “undue fuss”.

still wondering why did the issue record disappear?

you don’t need to apologise, you are the hero who brought this issue to life again.
I am the one who did “undue fuss”, so I am sorry.

I have accepted UE answer as you have recommended ^^

Thank you for your hard work

Hi all. Here is my take on the issue:

  • The bug was indeed fixed some time ago (just before Christmas last year), but instead as a fix to this similar issue: Unreal Engine Issues and Bug Tracker (UE-53089)
  • At that time, we hadn’t released 4.19, but the code had already been branched for that release and so this fix missed the window for 4.19 changes.
  • The ticket only reared its head again recently during 4.20 regression testing. An unrelated hot reload issue was found, but it was marked as a regression of this issue, which it is not.
  • That was when I was made aware of this thread and everyone’s troubles, and so I came to offer the above code as an official workaround for until 4.20 gets released.
  • I have no dealings with our public issue tracker, so I don’t know why UE-52220 has disappeared. It may be due to a false positive on our ‘sanitised for public’ checker, which ensures we don’t accidentally leak confidential information (for clarity: neither this bug nor the fix is in any way confidential).
  • UE-52220 is still visible in our internal tracker - no attempt is being made to rewrite history here. I will see about getting the issue made public again.

I’m an internal developer and am not actively looking at public-facing sites for these types of issues, so I only respond to them when I’m made aware. I’m still sorry that people have felt left in the dark on this. But I would advise anyone to raise their concerns with the support teams.

Steve

The disappearance of the issue was indeed a false positive caused by our sanitiser - it is publicly available again (and still marked unresolved because of the issue unrelated to this regression):

Steve

Thank you Steve for clarification. and sorry for the fuss.

Thank you so much for your message, do you have any idea when 4.20 will be available, this is very annoying problem.

Thank you for the answer, I’m just not sure where to put this, UObjectBase.cpp? Can someone let me know.

Yes, in UObjectBase.cpp, just replace your existing UObjectCompiledInDefer() function with the one above.

Steve

Thanks Steve

@Steve Robb

This solution still does not solve the problem mentioned by the OP.

After building engine source with this change, UE crashes while trying to reproduce the issue instead of resetting values.

This fix even requires a new version update like “4.18.3”, but planned solution version is marked as “4.21”. Are we going to wait 3 months more to fix that “IMPORTANT” and “BREAKING” bug?

I can’t believe this. More than an year has passed and this major bug still exist. I have used Unreal Engine 4.24 just for 3 hours and faced this bug which completely resets everything since I derive from C++ class. This is not acceptable.

Working with workarounds at workarounds. I only store data for C++ in tables (later retrieved) and dynamic data in blueprints. Only possible workaround atm.

Well, you know that Epic is up to bring Live++ as replacement to Hot Reload. That’s why it’s not getting fixes/updates anymore. I believe after few versions, hot reload will be completely obsolete.

Any info on that?

I just can’t stand it. This bug is appearing in UE 5.0.1 also.

Make cpp class based on AActor with say, UStaticMeshComponent included. Inherit BP from this class. Set its mesh to a value. Start recompliation with Live Coding. Save project. Restart UE. Notice that mesh was set to null.

Having this same issue with or without live coding:

  • Create custom actor component
  • Create a MyFloat UPROPERTY float
  • Save a value for MyFloat in BP
  • Compile
  • MyFloat is back to 0

Same here, as described by @WILDLAND-IA-DEV using Unreal 5.0.1.
How can we manage this issue?

I know this is a old post but for me with the widget giving the error, I found it to be that I had a variable in the widget and a non-variable widget element with the same name. I renamed the non-variable widget element and then all the variable references become a pointer to the non-variable widget element. I replaced those with the actual variable, and the warning went away. Didn’t even realize that I did that, and I didn’t suspect that a named non-variable widget element would be accessed as a variable.

My Element was a Canvas panel named ‘Tombstone’, and the variable was also named ‘Tombstone’.

So that might be worth checking out a well if its a widget compile warning your getting this on.

Having the same problem