Issues using take recorder with anim notifies applied to montages/clips

We have had a persistent issue where use of animation notify events of all kinds in animation montages or directly in animation clips, reliably crash the take recorder when recordings are finished and the reference tree is being crawled and resolved. This seems to happen regardless of the type of notify used.

We had some success changing our notify tick type to branching point within montages, and this seems to reliably mitigate the crashing issue with those. We still have the same problem with notifies within clips however, despite them being changed to branching point, we don’t see the same graphical update in the animation editor that represents branching point and we still get crashes when animations with notifies are recorded on our characters using the take recorder.

We have isolated the problem to these elements within our project, but frustratingly I cannot get it to reproduce in a template project despite doing things like forcing GC.

Any idea what could be happening here, and whether a patch is available in a later engine version?

Thanks!

Steps to Reproduce
Unable to get it to repro in a clean project frustratingly. Will continue to try.

Hey there,

Apologize for the delay. There hasn’t been any patches or fixes around this issue specifically. We are wondering if you could maybe get more info on what is attempting to be garbage collected? Based on the call stack, EnsureDependenciesAreLoaded(AnimSeq.GetSkeleton()); is fetching some more data that is causing crash. Since you can’t repro in vanilla engine maybe we can derive an answer on from the internals on during the crash.

Dustin

Hey Dustin, sorry for the delay in reply.

I have attached a callstack from the crash. Seems the referencer for a notify we play during the recording is set to null by the time recording is stopped.

It appears to happen with any animation notify added to any animation clip that is triggered during recording. When the notifies are removed, it works as we would expect.

Please let me know if there is additional information that would be useful in diagnosing.

[Image Removed]

Thanks,

Looks like this isn’t quite enough info to help us out. We haven’t been able to repro the issue as well still, even with added info. I think to diagnose further we have a couple of more questions.

1: What types of edits have you made to the engine? If there’s too many, then maybe understanding any changes around anim notifies or take recorder would be good.

2: Do you have any info on some specific types of notify’s that are causing the issue? You mention any and all, is there any correlation to some specific ones that you see often? Is there multiple of the same, or does it happen with just one?

3: If you were to drop a break point or debug FReferenceFinder::HandleObjectReference, what is the value of Object in the line that contains Object->IsValidLowLevel().

Thanks,

Dustin

Thanks for replying Dustin.

  1. The only engine modification relating to anim notifies or take recorder is we set the default MontageTickType value to BranchingPoint so artists don’t need to remember to do this, allowing us to mitigate this crash in anim montages.
public:
	FAnimNotifyEvent()
		: FAnimLinkableElement()
                 ...
		, MontageTickType(EMontageNotifyTickType::BranchingPoint)
                 ...

2. It seems to be related to Wwise based audio notifies, we had our audio programmer take a look, but they didn’t seem convinced it was related to audio implementation. I will see if I can reproduce with other notify types and report back.

3. I’ve added an image showing details on the value of object and some of the class info available.

[Image Removed]In this notify class, in the Received_Notify function override does the following:

  • Grabs the mesh component owner and casts to our own character class.
  • Grabs an enum set on the notify to determine which audio to play.
  • Calls play audio on our character class which does a lookup from a map, loaded/initialized from a data table when the character is spawned to determine the clip to play
  • Calls PostAKEvent with a ref to the clip

I can share more details on the notify class and subsequent features, though would need to do this confidentially, as it would be much more difficult to redact the sensitive information.

After stepping through this, it looks likely to be related to some element of audio handling. I will ask our audio programmer to take another look, hopefully some of this information is helpful.

Sounds good. It does seem something specific to your project’s anim notify setup. Your first modification seems fine; there isn’t anything there that indicates that would be an issue.

If the crash is happening with WWise notifies each time, you might want to reach out to them to see if they have any improvements as well. But the ObjectFlags for the notify look suspiscious as they are being flagged as begin destroy and finish destroy immediately.

Dustin