Linked state tree asset crashes if global task parameter is bound to a ST parameter of not type AiController.

As per repro steps, if you create a linked ST and try to bind a ST parameter to a global task parameter, it will crash upon entering the linked state tree, unless the global task parameter type is AiController.

Steps to Reproduce

  1. Create a root state tree asset.
  2. Create a linked state tree asset.
  3. Create a float parameter on the linked state tree.
  4. Create a global task to use on the linked state tree.
  5. Add an input parameter on the global task with float type.
  6. In the linked state tree, bind the global task input parameter to the linked state tree float parameter.
  7. Create a new state in the root state tree and link it to the linked state tree asset.
  8. When the app is run, it will crash on entry to the linked state tree (assertion failure).
  9. Change the linked global task to use a parameter of type AiController instead of float.
  10. Bind the parameter to the AiController from the state tree context.
  11. The app can now be run without crashing.

Hi Grant,

Thank you for the report. I was able to repro the crash you described both by using your repro project and by starting from a blank project. There is a missing repro step in your list, though: for the crash to occur from a blank project, at least one parameter must be added to the root state tree asset as well. Later, this parameter can be deleted and the crash will keep occurring.

If you don’t need parameters on your root state tree asset, you can recreate it and copy the contents from the original. The crash should not happen then.

I am filing an internal bug report now about this issue, and I will get back to you with a public bug tracker link as soon as one is available.

Best regards,

Vitor

Thanks Vitor!

Hi Grant,

As part of the internal bug report process, I have also tested this issue on the latest version of the main branch, and it appears that the crash no longer occurs there. I could not find a changelist meant to solve this specific issue, but there has been a lot of development going into state trees for some months now, so I guess some other development or bug fix ended up resolving this as well. Some CLs that might have done it are 39175013 and 39253656 from january, but I’m not entirely sure. Let’s hope the fix can make its way to UE 5.6..!

Best regards,

Vitor