Blueprint 4.7->4.8 Upgrade Modifies Execution Flow

I have a few functions in blueprints that have a ForEach node, and inside the loop, I’m using an Add node to add an element to an array variable. After upgrading to 4.8, these blueprint functions have the execution pin from the Add node inside the loop wired to the Return Node execution pin. Obviously, this exits the function the first time through the loop, rather than returning when the loop is complete.

Hi BrainDx,

I attempted to reproduce this but I couldn’t get your results.

Could you provide some screenshots showing exactly how your function is setup?

Or could you reproduce this in a new test project and upload that project here?

Sure, I had a function that had been created through “Collapse Nodes to Function” and looked like this:

After 4.8 upgrade, it looked something like this:

We’ve been working on this since around 4.3, and have upgraded through each revision. This particular function, however, was constructed using 4.7.

Any time I select nodes and collapse to function it creates a function with a ReturnNode and zero parameters, even in 4.8.

The parent class is just AActor.

How did you create a ReturnNode that only has an execute pin? Has your project been converted from a version prior to 4.7?

The reason I ask is by default all ReturnNode’s should have some sort of Parameter pin. If not, then they aren’t necessary because the Function node will always have a return execute anyways.

Also, what is the parent class of your blueprint and could you provide the 4.7 version of your project?

The blueprints that the problem functions are contained in, were they also created in 4.7 or in a previous version?

I wasn’t able to reproduce the issue at conversion but I have an idea as to what maybe going on.

If you collapse a set of nodes (that contain a loop) down to a function in 4.7.6 or 4.8 it will auto connect all empty execute pins to a ReturnNode. We have this issue logged as JIRA UE-7638 in our system.

I believe the conversion issue that you are seeing maybe caused by the large amount of code changes that have been made to the engine from versions 4.3 to 4.8.

They were created in 4.7.5 I believe. Luckily, our game is mostly code, but if we had more than a few blueprints I imagine this would make an upgrade to 4.8 really painful.

I’m glad you are able to repair this without to much trouble. I’ve updated JIRA UE-7638 to let the developers know about your issue and what problems it can cause for users with large blueprint projects.

Thanks again for the report and if you find any other info that might help, please feel free to post it here.

Cheers,

TJ

Hi! We had this problem too. With around 100 blueprints it is quite the hassle trying to step through everything to make sure it’s not nested anywhere. We also have an empty return node:

Hi Omberone,

I’m sorry that you are experiencing this issue. Unfortunately the workaround at the moment is to manually fix every blueprint. I will make another comment on the JIRA to let the developers know how this is effecting you.