Search Unity

Help - A PlayableGraph is being directly or indirectly evaluated recursively.

Discussion in 'Timeline' started by JennyHide, Jun 22, 2020.

  1. JennyHide

    JennyHide

    Joined:
    Sep 30, 2014
    Posts:
    47
    Hello,

    I'm getting the error message "A PlayableGraph is being directly or indirectly evaluated recursively." when I call

    Code (CSharp):
    1. playableDirector.RebuildGraph();
    I'm calling RebuildGraph() when I change the current Timeline playable asset in code. The error message doesn't show for every timeline, but it does always show for two specific timelines (it happens to be the two that I've made recently. The others were made months ago). The new timelines don't use anything different in them - the tracks they use are all used elsewhere.

    The error message doesn't seem to do anything most of the time - I can keep playing the game. BUT sometimes, the game (both the build and the Unity editor) crashes here. I still get the error message. The crash dump indicates the crash happens in Unity.exe!PlayableOutput::GetSourcePlayable(void).

    Since I can't look into Unity's .cpp files, I can't see what's going wrong.. any ideas?

    Thanks,
    Jenny
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    This usually means that the timeline is somehow self referencing. For example, if you are using nested timelines with control tracks, and one of the clips tries to control a playable director at a higher level.
     
  3. JennyHide

    JennyHide

    Joined:
    Sep 30, 2014
    Posts:
    47
    Hello,

    I'm not using any nested timelines.

    I've just tried swapping the Timeline that causes it with a new, empty one. I still get the "A PlayableGraph is being directly or indirectly evaluated recursively." error when I set the new one. And I've just managed to get the crash again with this empty timeline.

    Jenny
     
  4. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Are you using any custom built tracks on the old one?
     
  5. JennyHide

    JennyHide

    Joined:
    Sep 30, 2014
    Posts:
    47
    Yes - several. I've managed to 'fix' this by just not using

    Code (CSharp):
    1. RebuildGraph();
    after changing the current Timeline playable asset. It seems to work fine without it!