> I attached the callstack in the original post but I don’t see it anymore, could you confirm you have received it?
Yeah, I have it. The front end UI for EPS doesn’t seem to display it but I’m able to view it from the backend.
> About the recursion, I want to stress the fact that the URigVMBlueprint::HandlePackageDone is not called on the rig vm that is loaded by FRigVMGraphFunctionHeader::GetFunctionHost but another one that was in the async loading queue.
I think that this is fine, in theory. HandlePackageDone will be called every time a package has finished loading. The LoadedPackages array can contain multiple assets, since multiple assets could have been loaded, including potentially more than one rig. So it doesn’t necessarily need to be the same rig that FRigVMGraphFunctionHeader::GetFunctionHost was called on (whether URigVMCompiler can cope with this is a different question). You could add another check to HandlePackageDone in the form of:
if (!GetPackage()->GetHasBeenEndLoaded())
{
return;
}
But if the current rig is within the LoadedPackages array, I don’t see how the package could not have been loaded by that point, so I don’t expect that would fix anything.
I think we really need to try and get a repro for this. When I was trying again today, I see that the async loader will automatically load the dependent assets when I attempt to perform an async load on an actor similar to the one you described. So I’m not sure how you end up in a situation where FRigVMGraphFunctionHeader::GetFunctionHost has to force the load.
Maybe it’s that the async loading thread is busy loading other assets, so the dependent rig hasn’t been loaded yet. But in a simpler setup like mine where I have fewer assets to load, the async loader has loaded all the assets by the point we call FRigVMGraphFunctionHeader::GetFunctionHost. If that’s the case, I would expect that you only run into this crash intermittently, or is it something you see consistently with every PIE?
Is there any chance you could supply the assets in a repro project? If not, could you attach a few screenshots to show how you’re performing the async load of the actor, and also how you’re referencing the functions within the control rig(s)?