OverrideController switching crashs unity starting with 5.6.1p4

Ever since Patch 5.6.1p4 unity is crashing after about 30 secs in our game. It seems to be related to our use of override controllers. This also occurs in 5.6.2f1

I have filed this as case 923813, but my project is too big to upload. But I would be happy to provide it privately.

This is the exception that unity crashes with.

Exception Information: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.

Here is the stack trace.

========== OUTPUTING STACK TRACE ==================

0x0000000140893B34 (Unity) AnimatorControllerPlayable::OverrideClipPlayables

0x00000001408421FC (Unity) Animator::UpdateOverrideControllerBindings

0x0000000140849091 (Unity) Animator::SetRuntimeAnimatorController

0x0000000063AA0BB5 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Animator:set_runtimeAnimatorController (UnityEngine.RuntimeAnimatorController)

0x0000000063AA0564 (Mono JIT Code) [F:\RSDev\UnityProject\Assets\Game\Sims\Human\HumanSim.cs:1105] DNA.Game.Sims.Human.HumanSim:SetAnimSuites (DNA.Game.Inventory.InventoryItemInstance/InventoryItemClass)

0x0000000063A9B9CE (Mono JIT Code) [F:\RSDev\UnityProject\Assets\Game\Sims\Human\HumanSim.cs:1130] DNA.Game.Sims.Human.HumanSim:SetRightProp (DNA.Game.Inventory.InventoryItemInstance/InventoryItemClass)

0x0000000063A9B442 (Mono JIT Code) [F:\RSDev\UnityProject\Assets\Game\Sims\Human\HumanSim.cs:1151] DNA.Game.Sims.Human.HumanSim:EquipPrimaryInternal ()

0x00000000559EB3E4 (Mono JIT Code) [F:\RSDev\UnityProject\Assets\Game\Sims\Human\HumanSim.cs:1490] DNA.Game.Sims.Human.HumanSim:UpdateAnimState (double)

0x00000000559E61EB (Mono JIT Code) [F:\RSDev\UnityProject\Assets\Game\Sims\Human\HumanSim.cs:2413] DNA.Game.Sims.Human.HumanSim:smile:oHostClientPostFixedSimulation ()

0x000000004C78985C (Mono JIT Code) [F:\RSDev\UnityProject\Assets\Game\Sims\SimBehavior.cs:339] DNA.Game.Sims.SimBehavior:FixedUpdate ()

0x0000000000877392 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)

0x00007FFB26B55823 (mono) [c:\buildslave\mono\build\mono\mini\mini.c:4937] mono_jit_runtime_invoke

0x00007FFB26AA8435 (mono) [c:\buildslave\mono\build\mono\metadata\object.c:2623] mono_runtime_invoke

0x0000000141072BA5 (Unity) scripting_method_invoke

0x00000001410684F1 (Unity) ScriptingInvocation::Invoke

0x00000001414AEC7B (Unity) MonoBehaviour::CallMethodIfAvailable

0x00000001414B2D7F (Unity) MonoBehaviour::CallUpdateMethod

0x0000000140ACDC16 (Unity) BaseBehaviourManager::CommonUpdate

0x0000000140ACDCEF (Unity) FixedBehaviourManager::Update

0x00000001414949EB (Unity) PlayerCleanupCachedData

0x0000000140D7E246 (Unity) PlayerLoop

0x0000000141730EEE (Unity) Application::UpdateScene

0x00000001417326BF (Unity) Application::UpdateSceneIfNeeded

0x000000014173AF3A (Unity) Application::TickTimer

0x000000014180693C (Unity) CrashCallback

0x0000000141808584 (Unity) WinMain

0x0000000141AECE74 (Unity) strnlen

0x00007FFB5F942774 (KERNEL32) BaseThreadInitThunk

0x00007FFB60F10D61 (ntdll) RtlUserThreadStart

This happens in 5.6.2p1 too. I was contacted by someone in test to provide a private build which I did.

This is still happening in 2017.1.0f3

I hope someone can look at this, it has been nearly a month since I reported this, and this hasn’t been confirmed yet. We are stuck on 5.6.1p3 because of this.