Blueprint getsError Internal compiler error inside CreateExecutionSchedule on ForEachLoop

Hello,

so I need to start off with a image of my current level blueprint:


As you can see, after starting the level, I run through all the actors of the EsneItem class and try to cast them to BP_Coin which is a blueprint and if it succeeds I set a variable and assign an event to it.

After thinking about it a bit, I came up with another idea and thought that the casting wasn’t necessary if I just switched the Actor Class from Get All Actors Of Class to BP_Coin so it directly lists the coins instead of all the items. (EsneItem is the parent of every item) But then I realized that the ForEach returns an Actor and that I had to do the casting anyway.

But for now, the blueprint looks like this:


So, it didn’t work out the way I wanted it to and started pressing CTRL-Z until it was like in the original image, but then it wouldn’t compile anymore and give this error message:


(Even if it the class is still BP_Coin in the Get All Actors Of Class, it’s the same with EsneItem)

If I restart the engine after this, it works again, but nothing else does.
I can reproduce this error 100% so if the explanation wasn’t clear enough I’ll try to explain it again.

Hi zaaKun,

I was able to get the pickups to work like you want with this setup:

In my example I had a battery pickup item instead of a coin. If EsneItem is not a parent of the pickup, then it will not be able to cast to it successfully.

I have tried deleting the cast node and then use undo to restore it, but I am not receiving any errors. Besides deleting the Cast To Coin node being deleted and the execution path being reconnected, what changes were made?

Cheers,

Thank you for that information. I am unfortunately still not able to reproduce the issue. I have taken my example, deleted the Cast To and changed the Actor Class to something else, then undid until it was returned. The Actor Class never reset, but everything else did and when I change the Actor Class back to my pickup it works again.

I did notice something that is odd; In the error log you recieve, where does the link in “Exec output pin then cannot have more than one connection” go to when clicked?

It looks like there are references being broken while searching for actors; If you replace the Get All Actors of Class, ForEachLoop and Cast To nodes entirely, does that fix the issue?

The only other change I made was changing the Actor Class of the Get All Actors Of Class. So, instead of EsneItem (which was the original class (a c++ class)), I had BP_Coin (which is a blueprint that has EsneItem as a parent)

The idea was to ONLY search for BP_Coin in the level instead of searching for all the items, because I only really needed the coins for this work.

Basically this is what I did:

  • Changed Actor Class of Get All Actors of Class from EsneItem to BP_Coin (which inherits from EsneItem)

  • Removed the Cast To node

  • Realized I still needed the casting

  • CTRL-Z’d until it was back.

  • The error in my second image happened.

If I click on then it highlights the Get All Actors Of Class node.

Also, if I replace (as in deleting and adding them again) those three nodes you mentioned it works again.

Alright,

That makes sense for broken connections. I’ll keep testing it to see if I can get a repro case, but this gives me something to work with. Please use the work-around for now so that you can continue developing until we can properly resolve this issue.

Thank you,