Why does the blueprint interface array crash?

Why does the blueprint interface array crash?
Please look at the picture:


I can only suggest adding break points in that method to help narrow it down, But have you looked at the auto’s/local’s window to see the values of the variables that have not been optomized out?

I just ran into this same issue in 4.24, I don’t suppose anyone knows if there’s a sensible work around?

This seems like a pretty common use case for interfaces, I’m amazed that this is still a problem.

Are the arrays empty? Where do you add items to the array?

same thing NobbigvonL is saying here. If your arrays are empty I would expect pressing T would generate an error or crash.

after TPressed-Event, get length of the array and check if it is > 0 (return bool to a branch). Continue only if true.
Accessing an index in an array which does not exist will always cause crashes. Nothing to do with interface.

Thanks for your help guys. I’ve added the suggested length checks as suggested, but I’m still getting the crash. I’ve been playing around with break points and it’s seems like the crash occurs as soon as it tries to step into the function. This is the error it spits out: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x000001df
I also made a test using the class instead of the interface and it works fine.

Here is how my blueprints are set up:

I just made a test using a single object instead of an array and that works fine. It seems like it’s only happening when using an array.

I had same problem (editor crashing on PIE). Changing object array (in this case: Sprite Impls) to interface array fixed this issue.