Infinite loop error on standart Blueprint's macro

Hi, this is my AiController Blueprint and after running it I every time get infinite loop error on Do Once nod. I tried to replace Do Once with a branch but it detected infinite loop on set variable node. Sometimes it detects infinite loop on ForEachLoop macro.

I can’t understand what is happening

You should connect your shuffle node from the complete pin on your loop. Also consider using a random int within your array length rather than shuffling. Shuffling is very intensive and can lag out even with small arrays.

Thanks for optimization advice but I have found that custom event causing this error, I am still don’t understand where is an Infinite loop here but my workaround looks like this

This kinda strange because this blueprint was an example from teaching book, maybe for an earlier engine version.