# Transition Error Causes FMOD to Die

**URL:** https://qa.fmod.com/t/transition-error-causes-fmod-to-die/15443
**Category:** FMOD Studio
**Created:** [February 6, 2020, 7:09am UTC](https://qa.fmod.com/t/transition-error-causes-fmod-to-die/15443 "2020-02-06T07:09:46Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![mrmiller](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@mrmiller](https://qa.fmod.com/u/mrmiller)
#### Post date: [February 6, 2020, 7:09am UTC](https://qa.fmod.com/t/transition-error-causes-fmod-to-die/15443/1 "2020-02-06T07:09:47Z")

</div>

This is a really odd one, but I’ve got a lot of supporting documentation. It occurs in both FMOD 2.00.05 and 2.00.07, in both FMOD Studio and the Unity integration, both macOS and Windows.

One of my events has a loop with a transition timeline and a transition region below it to jump away when a parameter changes. If the parameter changes at the right moment, it causes FMOD to fail spectacularly. Here’s a video in a minimal example project demonstrating:  
[Video Example](https://www.dropbox.com/s/hj67tnnjxpmk674/mrmiller_example.mov?dl=1)

In the example project, if I trigger a parameter change in either FMOD Studio or via the Unity integration at m. 47, playback in the event hangs and it logs the following continuously:

```
22:49:21 fmod_playback_timeline.cpp(2021), assert(): assertion: 'leadTransition->timeline().length() == TimeUnit::zero()' failed 
22:49:21 "FMOD_ERROR (28): An error occurred that wasn't supposed to. Contact support." 
22:49:21 "FMOD_ERROR /Users/raymond/jenkins/workspace/Build __2.0__ Studio_Mac/studio/src/SoundSystem.cpp(415): mSystem->update()" 

```

The event will continue to assert and will only stop once told to stop immediately. Stopping with fade out hangs indefinitely.

Even worse, whatever the error is affects the rest of FMOD. In FMOD Studio, the meters stay at the level they were at just before the error messages started and the playback cursor stopped.

In Unity, FMOD stops playing most other events. Each additional event played allocates a new voice yet those voices are never freed so they pile up. For our players, this causes almost all sound in the game to stop entirely, and most new sounds will not play audibly.

If running in the Unity Editor, it also caused Unity to crash:  
[Unity\_2020-02-05-220417\_MacBook-Pro-3.log](https://qa.fmod.com/uploads/short-url/7KnvzZ3fb4tVoTQtWcvXcn9IMMj.log) (157.6 KB)

What is it about this event that is so problematic? Is there any sort of workaround to avoid the bug in question?

[Minimal Example Project](https://www.dropbox.com/s/rfbxyqu3c8m6kio/mrmiller_example.fspackage?dl=1)

And here’s a video of it failing in Unity, where you can see how the metering is frozen and channel count is monotonically increasing with each new sound played. After I stop play mode, Unity crashes without fail, with the same crash log as attached.  
[Unity Example](https://www.dropbox.com/s/dbz3kvzgvm9ibsg/mrmiller_unity.mov?dl=1)

---

<div class="post-metadata">

### Author: ![tristanjl](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/tristanjl/32/261_2.png) [@tristanjl](https://qa.fmod.com/u/tristanjl)
#### Post date: [February 20, 2020, 3:52am UTC](https://qa.fmod.com/t/transition-error-causes-fmod-to-die/15443/3 "2020-02-20T03:52:08Z")

</div>

Hi mrmiller,

We have a fix for this issue that will be available in the next version.

This issue is happening when encountering a loop with a transition timeline while already inside another transition timeline. Loops are followed during source and destination regions, but there is no support for following one transition timeline while in another. Currently this is not handled at all, and the change is to ignore the nested transition region (following the loop region as normal).

You can avoid this by avoiding transition timelines that encounter loop regions that have transition timelines.

---

<div class="post-metadata">

### Author: ![mrmiller](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@mrmiller](https://qa.fmod.com/u/mrmiller)
#### Post date: [February 20, 2020, 4:04am UTC](https://qa.fmod.com/t/transition-error-causes-fmod-to-die/15443/4 "2020-02-20T04:04:34Z")

</div>

Thanks! I had a feeling that was the case and worked around it last week by removing any loops and replacing them with transitions instead.

---

<div class="post-metadata">

### Author: ![mrmiller](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@mrmiller](https://qa.fmod.com/u/mrmiller)
#### Post date: [February 20, 2020, 4:08am UTC](https://qa.fmod.com/t/transition-error-causes-fmod-to-die/15443/5 "2020-02-20T04:08:50Z")

</div>

I should make a separate topic, but I’ve found a similar issue with transition regions in some specific circumstances. When playing into a transition region targeting a marker, playback stops immediately (stop button engages itself, so a different issue). For whatever reason, this doesn’t happen when going to a named region and doesn’t happen if it’s in the middle of the transition region, only the leading edge.

---

<div class="post-metadata">

### Author: ![tristanjl](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/tristanjl/32/261_2.png) [@tristanjl](https://qa.fmod.com/u/tristanjl)
#### Post date: [February 20, 2020, 4:21am UTC](https://qa.fmod.com/t/transition-error-causes-fmod-to-die/15443/6 "2020-02-20T04:21:22Z")

</div>

I would need some more information to understand what’s happening.

If the marker is at the end of the event, the event should stop by having reached its end. Ends of destination and magnet regions aren’t currently included in that end determination (which is a change slated for a future fmod version). There was also a fix added to 2.00.07 to address stopping due to loops encountered in transition destination regions that may be related.

---

<div class="post-metadata">

### Author: ![mrmiller](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@mrmiller](https://qa.fmod.com/u/mrmiller)
#### Post date: [February 20, 2020, 4:45am UTC](https://qa.fmod.com/t/transition-error-causes-fmod-to-die/15443/7 "2020-02-20T04:45:58Z")

</div>

[Here’s an example project demonstrating it.](https://www.dropbox.com/s/har6v65s8qhdi6h/mrmiller_example2.fspackage?dl=1)

The pictured event stops immediately as soon as it hits the leading edge of the transition region. It doesn’t matter whether there’s a loop or more material after the destination. It doesn’t matter if you move that destination before the transition region so it’s definitely not at the end of the Event. Strangely enough, though, if you change the transition region to go to the destination region instead of the destination marker, it works fine. And regular transitions to the marker also work fine.

I believe the relative offset is required for it to break, which may make it a sort of boundary condition bug.

 ![Screen Shot 2020-02-19 at 8.43.03 PM](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/1X/a565e1b2581ed939ff77de42b58a467d0074f9ec.jpeg)

---

<div class="post-metadata">

### Author: ![tristanjl](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/tristanjl/32/261_2.png) [@tristanjl](https://qa.fmod.com/u/tristanjl)
#### Post date: [February 21, 2020, 12:14am UTC](https://qa.fmod.com/t/transition-error-causes-fmod-to-die/15443/8 "2020-02-21T00:14:27Z")

</div>

Thanks for the information, a fix for this issue will be available in 2.00.08.

The specific combination that causes this issue is tempo marker + start of a transition region + destination marker + relative/inverted transition. Any other combination should avoid this issue.

---

<div class="post-metadata">

### Author: ![mrmiller](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@mrmiller](https://qa.fmod.com/u/mrmiller)
#### Post date: [February 21, 2020, 12:15am UTC](https://qa.fmod.com/t/transition-error-causes-fmod-to-die/15443/9 "2020-02-21T00:15:45Z")

</div>

Thanks for the quick response!
