UE4.12 crash after hot reload

Hi,

I am currently moving various variables from a blueprint to a C++ base class.

In this example, i am moving a variable called Y. To facilitate this, i first renamed the variable in the blueprint to “Y BP” and then i added the following to my C++ base class:

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Crate|2D Position")
	int32 Y;

I then alt-tabbed back to the editor, clicked ‘compile’ and went into the blueprint in question, used find references and manually repalaced each reference to “Y BP” with the new “Y” from the base class by dragging the “pill” for the variable over the other to replace it (“change to read from Y”).

After a few variable replacements and clicking of the compile button in the blueprint editor, the following crash occurs. This is highly reproducible for me and I get it several times a day. This has been my first attempt to pin it down and generate a proper bug report.

I’ve captured a video here demonstrating my workflow so you can see what I was doing, and showing the crash happening and visual studio intercepting it.

Crash stack trace is attached along with editor log, the crash occurs on line 60 of PropertyBaseObject.cpp, the if() statement of this code:

// always serialize the cross level references, because they could be NULL
// @todo: okay, this is pretty hacky overall - we should have a PortFlag or something
// that is set during SavePackage. Other times, we don't want to immediately return false
// (instead of just this ExportDefProps case)
// instance testing
if (!bResult && ObjectA->GetClass() == ObjectB->GetClass())
{
	bool bPerformDeepComparison = (PortFlags&PPF_DeepComparison) != 0;

I hope this is enough information for you to repro and fix, as this bug is driving me crackers!

Thanks! :slight_smile:

It was fixed in 4.12.2 if I remember right

If it was, it’s regressed - I am running 4.12.3 right now which is the version where i reproduced that bug in the video. It’s been doing this to me since 4.12.1.
Thanks for the suggestion though!

Sorry… ( I personaly don’t use hot reload because it’s not enough crash safe, even if it’s usefull)

Hi braindigitalis,

I tried to reproduce this in a clean project, and was unable to do so. I actually got a crash when replacing references to the old Blueprint variable with the new one created in code, which I will have to investigate a little further. However, I did not get any errors when performing a hot reload after adding a new variable in code, and no errors/crash occurred in the Blueprint after doing so. It may be that your Blueprint is more complex than the one I was using and something else is happening. Do you see the same thing happening if you create a new test project with a similar setup?

Hi

I’ve not tried to reproduce in a simpler project yet, this is a project with some quite complicated blueprints hence the need to refactor to simpler c++. I was also seeing the crash when replacing references and in fact this is what I set out to reproduce, it’s just that the editor ran past the bug I was looking for and went into the hot reload code. I think perhaps we are both looking at different parts of the same bug?

I believe I am seeing the original crash that you mentioned when replacing references. That is resulting in an access violation error for me. Is that the same thing that you were getting? It is also being triggered within PropertyObject.cpp, but in a different location from where you were seeing the crash that you initially reported here.

Hi

Thanks and yes, i believe this might be a different side effect of the same bug, perhaps a stack or heap corruption?

Hi braindigitalis,

Sorry for the delay on this issue. I took another pass at it today in 4.12.3, and I saw the same error messages after Hot Reloading that you highlighted in the video you provided. However, I did not hit a breakpoint in Visual Studio when I compiled the Blueprint after the Hot Reload.

Would you be able to tell me what version of Visual Studio you are using, and are you using the binary version of the Engine installed by the Launcher, or did you build the Engine from source code?

Hi

Sorry for the delay in responding! I am using visual studio 2015, “14.0.23107.0 D14.REL” (from Help->About) and UE4 4.12.5-3039270+++UE4+Release-4.12 downloaded via the launcher. I still get the crash in 4.12.5, and have been getting the crash since before 4.12.3

Hope this helps!

Hi braindigitalis,

I just tried hitting the breakpoint again, and unfortunately was still unable to do so. I used 4.12.5 installed by the Launcher, which is the same as what you were using. My VS 2015 has Update 1 installed (Version 14.0.24720.00 Update 1), but I’m not sure that would be the cause. I wonder if it may be something to do with the specific way that your Blueprint was set up. The Blueprint that I am using to test may be too simple.

Hi braindigitalis,

We have not heard back from you for a while. Do you still need help with this issue? I will be marking this post as resolved for internal tracking purposes, but please feel free to add a comment at any time to re-open the post if you need any additional assistance.

hi, did you ever get anywhere with this? Curious to know if you managed to duplicate it, i could share blueprints with you confidentally but i am not sure what in my large number of them causes the issue. Compound this with the fact that since this bug has happened most of my bigger bp’s have been refactored into C++ so the code is no longer the same.

So far I have only been able to reproduce the error message in the output log when hot reloading. Compiling the Blueprint then just clears the errors for me and lets me continue. It does not hit a breakpoint in VS as your video demonstrates. I have not yet been able to determine why I appear to be making it past the point where it stops for you when I am doing the same thing you are doing in the video.

Hi braindigitalis,

I just wanted to check in and see if you are still experiencing the same issue in version 4.14.1.