Blueprint Select Node disconnects pins after editor restart

If a Blueprint Select Node is selecting an actor between two actors (Ouput is an actor, Inputs are two actors and a boolean index), and one of them is not a pure actor but an actor-derived class, pin to this actor will be disconnected after next editor restart. It can be compiled, saved and run without problem, issue arises only after a restart. It didn’t happen in UE 4.7.

A workaround is to cast Actor-derived class to Actor and then plug it to select node. It will trigger a compiler warning though since Actor-derived class is already an Actor.

Example workaround:

Hi anticto,

Thanks for report! I was able to reproduce this in 4.8.2, and discovered that in our internal branch, compiling with this set up will actually crash editor! I’ve entered a bug report for this (UE-18799) and I’ll let you know when I see an update. Thanks again!

Thanks for additional info, Slavq. This has been fixed for 4.9, and fix should be implemented in 4.9 Preview if you’d like to test it; Select node should no longer accept this setup.

We never got a crash from this, however, so please open a new post if you get crash with log from your project’s Saved\Logs folder and information from Crash Reporter window if it crashes in 4.9. Thanks!

Same here on 4.8.3, it crashed and it broke my whole project, so it won’t open again. Fortunately i have some backups, but well… It’s a dangerous bug.

Additional note: In my case i have Select node with “Human” type output. “Human” derives from my “Unit” class. When i connect “Player” type and “Ally” type (both deriving from “Human” class) to inputs, it disconnects after editor restart. Casting both “Player” and “Ally” to “Human” solves this as a workaround, but ofc there are these warnings then.

Update, to not spread misinformation: I’ve just realized that crash that i wrote about is not related to this Select node bug, but it was caused by THIS ONE.

In 4.9, it still disconnects these pins after restarting editor. Same setup as in my previous comment. I’ve tried deleting Select node and creating a new one, but it didn’t helped.

In 4.9, you should no longer be able to connect two different types of actors as inputs in same Select node. If you’ve converted your project up to 4.9 from 4.8, old setup may still work but I would expect it to have same problems. Did you try same thing in a new project in 4.9?

It seems like it sometimes accepts it when one type is a child of another, which is my case. Repro steps in a new, clean 4.9 project:

  1. Create blueprints “ClassA” and “ChildOfClassA” which inherits from “ClassA”.
  2. Create blueprint “ClassB” with two variables, one of type ClassA, other of type ChildOfClassA - then, in Event Graph insert a Select node, plug in both variables and click Compile - no warnings, everything is “fine” and it accepts input like that.

BUT when you insert same thing (two variables and Select node) in Event Graph of “ClassA” blueprint, it will accept it, but at least it will show a warning that ChildOfClassA is not compatible with ClassA reference.

Hm, I just tried your setup in a new 4.9.0 blank project and on compiling ClassB I got a Compiler Error:

AutoCreateRefTerm Expansion: Assignment Error Select

That’s if I add ClassA var first, and ClassA Child var second. If I do it in reverse order (ClassA Child var first, ClassA var second), it won’t let me attach ClassA var at all:

Are you doing anything else that you may have neglected to mention? If you can do this in a fresh blank project, could you and attach that here?

I did everything like in these repro steps. Sure, here is project:link text

Thanks Slavq, I see what difference is now: if Index is left as Wildcard, it’s as I describe above. Otherwise, if you select an Index of any type, it will compile successfully. I didn’t see nodes disconnect after a restart, but I’m sure fixing first issue will resolve that.

I’ve created a new bug report for this (UE-20687) as it doesn’t seem to cause a crash anymore, and repro steps are a little different. I’ll let you know when I see an update on it. In meantime, avoiding using multiple Actor types (including Parent/Child combos) as inputs is correct workflow.

Thanks again!