We use FBlueprintEditorUtils::GetChildrenOfBlueprint function to generate some runtime data in editor that is baked into assets during cook time, however using this function in standalone play mode using `-game` with the editor executable, function gets stuck in an infinite loop instead of stopping at some point as `None` data is produced and continuously added into the ParentNames array. We have a temporary fix of checking for Nones before adding the new parent name, which fixed the infinite loop and things behave as we expect them to.
[Attachment Removed]
Hello. Do you still have a callstack from when this happened last? It would be helpful to, in some way, find a repro where Nones happen.
[Attachment Removed]
Hey Turhan, no need to salvage that callstack anymore. If you still had it, it might have been useful to our dev/QA but the problem scenario looks simple enough to paper craft.
The current FBlueprintEditorUtils::GetChildrenOfBlueprint hinges on the GeneratedClassPath registry tag always being valid and correct. Those assumptions are quite fragile, so I’ll just work on a fix and get it reviewed by a colleague to make the function less fragile. Thanks for reporting this!
[Attachment Removed]
Hi Zhi,
Sorry this was a note and change from 2 months ago, I just had a chance to write about while writing about other current issues on Friday. I just rolled back the change on our editor but was not able to reproduce the issue again as we seem to have removed the assets causing the issue to occur. I’ve tried creating a basic repro case too, and with the simple repro I am able to get `None` entry being entered into the `ParentNames` array easily but am not able to get it into infinitely looping state. Now that I’m looking into it again, it is possible we somehow had an asset with `ParentClass` tag `None` value (maybe a live coding issue?) or we had 2 assets pointing to each other (maybe blueprint reparenting/redirector issue?) and that was causing the infinite loop but because it’s been a long time I do not fully remember the case as well. I think some bad state can still cause infinite loops in this logic, and I believe ParentNames should be only appended unique data instead of accepting any new data but sadly I am not able to provide a working repro at the moment.
If you think the callstack (timing of execution) is important for your testing though I can easily say it was being executed during `UGameplayTagsManager::OnLastChanceToAddNativeTags` callback.
As a final note, I will be reverting our local change to fix the issue for now to see if we can in the future reproduce the issue and if so, can poke back the thread if you want to close the issue without taking action for now.
[Attachment Removed]