Upgrading from 4.13 to 4.16

I have a very simple project that I have been working on and I decided to upgrade it to 4.16.3 (from GitHub) today. I made all of the necessary changes to the build and target files to get rid of the deprecation warnings, but I still have one error that is popping up from the project’s generated file:


projectname.generated.cpp(1089): error C4700: uninitialized local variable 'Parms' used

This error was showing up before I made any changes to the other code and will not go away. The code also builds completely fine on 4.13.

Any ideas?

I managed to get to the bottom of the problem.

I had an IInterface that contained a UFUNCTION that returned a custom struct. It’s declaration looked like this:


UFUNCTION(BlueprintNativeEvent, BlueprintCallable, meta = (...), ...)
    FCustomStruct setStructValue(int32 index, int32 value, bool change);

This was causing the parms error. I assume that this is because the default version of this function does not initialize the FCustomStruct that is to be returned, and the function cannot be virtual because it is a BlueprintNativeEvent.

So to fix it, I just made the FCustomStruct an out parameter.


UFUNCTION(BlueprintNativeEvent, BlueprintCallable, meta = (...), ...)
    void setStructValue(int32 index, int32 value, bool change, FCustomStruct &outStruct);

It behaves exactly the same and it now compiles! Hurray!

[HR][/HR]
Regarding this, is this expected behavior? This wasn’t an issue in 4.13. I don’t know which behavior is exhibited in 4.14 and 4.15 so I don’t know when this change happened, but is this by design or a bug?

Does still appear to be an issue, odd.