Hot Reload breaks blueprint Callable

Hi !
Again, I found some questions/posts relating hot reload, but I’ve not been able to find the bug report I have.

Since UE 4.11.2, when building xCode/compile in UE4, everything is ok. But as soon as I change something in a blueprint after that, I have compile errors on each of my blueprint callable : for the editor, they don’t exist anymore.
I need to restart the whole project in order to make it work.

I use intensively hot reload and never had this issue in 4.10

Maybe it’s just an OsX issue ? Anyway, thanks for looking into it.

PS : Besides, I do not know if this is the same thing, but at the first build of my project in 4.11.2, I had to delete and recreate each of my “BlueprintNativeEvent”, they would not compile anymore.

Hello ,

Thank you for reporting this problem. Would it be possible to be more detailed? What exactly are you changing inside of your blueprint that causes this issue? Is it a property, adding/removing a node, changing the flow of the blueprint (moving pins)? A simple reproduction that can be done in a new project would be best. There could be something specific that I’m missing as I haven’t run into these problems.

Hi,
Unfortunately I was not able to reproduce it neither on a new project. I tried to create similar functions and similar classes.

On my main project, I don’t do anything in fact:

  • Open Project from Epic Launcher
  • Open Xcode from Unreal Editor
  • Build using command+B
  • After hot reload success, open Widget blueprint and click compile

I uploaded a screenshot showing the error.

For your information, this project was converted from 4.10 to 4.11.
I did not test using a project from 4.10 and then convert it to 4.11 to try if I have this issue.
Therefore, on the screenshot, the PartyCharacterWidgetBP inherits from PartyCharacterWidget (CPP). As soon as I change something in PartyCharacterWidget.h, and then build, I don’t have errors anymore on my widget.

Let me know if you want further tests.
89256-

Since you mentioned that the project was converted, do you still have the old version of it? If so, can you try creating a new project in 4.11 and then migrating the content from the older project to the new one using the in-editor migration tools? The source itself can be copied over manually as it cannot be affected by the migration, I believe. After that, try generating the project files, building the project, and seeing if you can get the same behavior to occur. It could be a reference issue that became mixed up in the conversion process.

Note that it may be easier if you name the new project the same as the old one since the code makes multiple references to the project’s name.

Hi,
After several attempts to find the issue, I finally found out. This is not due to the 4.10 → 4.11, since I was able to reproduce it and a test project.

I created a UserWidget class :

MyUserWidget.h

UCLASS()
class TESTBLUEPRINTISSUE_API UMyUserWidget : public UUserWidget
{
    GENERATED_BODY()
public:
    DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam( FOnTranslationX, float, translationX);
    
    UFUNCTION(BlueprintCallable, Category = "Test")
    void BindTestCallable();
    
    
protected:
    UFUNCTION(BlueprintImplementableEvent, BlueprintCosmetic, Category = "Test")
    void OnTestImplementable();
public:
    
    UPROPERTY()
    FOnTranslationX testX;

	
	
};

MyUserWidget.cpp

#include "TestBlueprintIssue.h"
#include "MyUserWidget.h"


void UMyUserWidget::BindTestCallable()
{
    //Do nothing this is just a test
}

After this, I created a Userwidget blueprint and reparent it to MyUserWidget.

Every time I recompile the c++ code, callable functions and implementable events just disappear.
WARNING: to make this happen, you must not change anything in MyUserWidget class before launching the compile, or the bug will not happen (I assume the class is compiled again and therefore it helps).

Hope this helps

Thank you for the details, unfortunately I’m unable to get this to reproduce on my end. For some clarification, what Build Configuration / Platform do you have set inside of Visual Studio? Also, when you mention “recompile” the C++ code, which compile button are you hitting? The one in the editor? Visual Studio? Are you hitting “Build” or “Rebuild”? When you mention that the functions/events disappear, do you mean that they were already placed in the blueprint and then disappeared or that they’re no longer able to be selected from the list of available events/functions?

Hi,
I’m not on Windows, so I assume this bug only occurs in Mac OSX.
I’m actually running Mac OSX El Capitan : V 10.11.4
Xcode version : 7.3.1
I have a macbook pro Retina and an intel core i7 quadcore

To make it happen :

  • Cmb + B in Xcode. It will build the project, and then the “Hot reload” dialog window appears in Unreal Engine. I cannot test right now if pressing compile in editor would do the same issue, but I’m pretty sure I already tested it and I was having the same error.

Concerning consequences on blueprint :

  • Each Implementable Events are replaced by “Custom Events”, since they don’t appear in blueprint anymore
  • On suggestion menu (when pressing right mouse), I am unable to select any of my Implementable events or callable functions.

Let me know if you need further information

Thank you for that information. I’ve been attempting to reproduce the problem but been running into other issues instead. The first is that, upon attempting a hot reload, the build will fail if the declaration for the Implementable event is present. The second is that, if this is removed and then compiled, if a blueprint that had the event in its graph is opened, it’ll crash the editor.

I’ll continue looking into this and attempt to reproduce on a Mac using El Captian (My current one is Yosemite) to see if I can get the same behavior.

Unfortunately I’m still running into those issues that are blocking me from being able to reproduce your issue. Would it be possible for you to provide a small project that reproduces the issue to see if I can get it from that?

Yes of course. For the moment, the test project I have is about 1 Go, but It’s because I integrated starter content I think.
I’ll try to cut it, and upload it. Do you have a preference for the upload?
Should I just upload it on Dropbox?

Thanks

That would be fine. Any size is fine as well, whatever you’re willing to upload.

Here is the template project :
I hope it will help you to find the issue
link text

Thank you for the project. I’ve tried reproducing the issue but haven’t had any luck. The thing that confuses me the most is that you mention that it only happens if no changes have been made to the MyUserWidget class prior to compiling.

If no changes are made then the compile will never actually happen as it will detect that there have been no changes and not hot reload. Prior to compiling, is there a certain class that you’re editing instead that leads to the blueprint having problems?

No, I just press cmd+B in xCode to build the project.
Nothing has changed, so as you say, the class is not recompiled, and this is the issue I’m having : since this class is not recompiled, I do not know why but blueprint functions are not referenced any more.

Hello ,

I apologize for the delay in response, but I’ve been trying to reproduce this issue. Have you had a chance to test this issue in the 4.12 previews to see if the same results occur?

Hi, sorry for the late reply either.
Fortunately, the 4.12 engine seems to resolve my issue. I tested it on both Test Project, and real project, and I did not have the issue anymore.

Besides, when building (Cmd + B) project where nothing has changed, the hot reload dialog does not appear anymore (small improvement, but it shows that hot reload seems smarter than 4.11)

Anyway, thanks for your patience with this matter, and good job with this 4.12 !