OutputCoreAudio::updateMixer() crash on iOS Unity 2022.3.10f1 App

I have a crash we cannot repro. Can you help with this at all? Any way to guard against it or a fix?

-Stuart.

BACKGROUND THREAD 39 - CRASHED
  • UnityFramework

FMOD_Resampler_Linear

  • UnityFramework

FMOD::Output::recordFill(FMOD::FMOD_RECORDING_INFO*, unsigned int)

  • UnityFramework

FMOD::Output::recordUpdate()

  • UnityFramework

FMOD::Output::mix(void*, unsigned int)

  • UnityFramework

FMOD::OutputCoreAudio::updateMixer()

  • UnityFramework

FMOD::thread::callback(void*)

  • libsystem_pthread.dylib

0x1fc1be000 + 9428


Expand

MAIN THREAD
  • UnityFramework

mecanim::statemachine::EvaluateCondition(mecanim::statemachine::ConditionConstant const*, mecanim::ValueArrayConstant const*, mecanim::ValueArray const*) statemachine.cpp:746

  • UnityFramework

mecanim::statemachine::EvaluateTransition(mecanim::statemachine::TransitionConstant const*, mecanim::statemachine::TransitionInput const*, mecanim::statemachine::TransitionOutput*, mecanim::statemachine::TransitionMemory const*, mecanim::statemachine::StateMachineWorkspace*) statemachine.cpp:832

  • UnityFramework

mecanim::statemachine::EvaluateTransitions(OffsetPtr<OffsetPtrmecanim::statemachine::TransitionConstant > const&, unsigned int, mecanim::statemachine::TransitionInput&, mecanim::statemachine::TransitionOutput&, mecanim::statemachine::TransitionMemory&, mecanim::statemachine::StateMachineConstant const*, mecanim::statemachine::StateMachineInput const*, mecanim::statemachine::StateMachineOutput*, mecanim::statemachine::StateMachineMemory*, mecanim::statemachine::StateMachineWorkspace*, int) statemachine.cpp:898

  • UnityFramework

mecanim::statemachine::EvaluateStateMachine(mecanim::statemachine::StateMachineConstant const&, mecanim::statemachine::StateMachineInput const&, mecanim::statemachine::StateMachineOutput&, mecanim::statemachine::StateMachineMemory&, mecanim::statemachine::StateMachineWorkspace&) statemachine.cpp:1153

  • UnityFramework

AnimatorControllerPlayable::UpdateGraph(float) AnimatorControllerPlayable.cpp:538

  • UnityFramework

AnimatorControllerPlayable::PrepareFrame(FrameData const&, Playable*, bool) AnimatorControllerPlayable.cpp:277

  • UnityFramework

Playable::PrepareFrameVisitor(DirectorVisitorInfo&) Playable.cpp:599

  • UnityFramework

PreOrderPlayableTraverser::Traverse(DirectorVisitorInfo&) Traversers.h:149

  • UnityFramework

PlayableOutput::PrepareTraverse(FrameData const&, int) PlayableOutput.cpp:124

  • UnityFramework

PlayableGraph::PrepareFrame(PrepareFrameType, double, float, unsigned long long, unsigned int, DirectorThreadContext) PlayableGraph.cpp:241

  • UnityFramework

PrepareFrameJobFunc(PrepareFrameJob*, unsigned int) DirectorManager.cpp:440

  • UnityFramework

ujob_execute_job(ujob_control_t*, ujob_lane_t*, ujob_job_t*, ujob_handle_t, unsigned int) ujobs.cpp:1024

  • UnityFramework

ujob_wait_for(ujob_control_t*, ujob_handle_t, int) ujobs.cpp:1609

  • UnityFramework

CompleteFenceInternal(JobFence&, WorkStealMode) Jobs.cpp:24

  • UnityFramework

DirectorManager::ExecutePrepareFrames(DirectorStage) Jobs.h:285

  • UnityFramework

DirectorManager::ExecuteStage(DirectorStage) DirectorManager.cpp:601

  • UnityFramework

DirectorManager::InitializeClass()::PreLateUpdateDirectorUpdateAnimationBeginRegistrator::Forward() DirectorManager.cpp:190

  • UnityFramework

ExecutePlayerLoop(NativePlayerLoopSystem*) PlayerLoop.cpp:393

  • UnityFramework

ExecutePlayerLoop(NativePlayerLoopSystem*) PlayerLoop.cpp:414

  • UnityFramework

PlayerLoop() PlayerLoop.cpp:521

  • UnityFramework

UnityPlayerLoopImpl(bool) LibEntryPoint.mm:339

  • UnityFramework

UnityRepaint UnityAppController+Rendering.mm:213

  • QuartzCore

0x19384a000 + 192528


  • UnityFramework

-[UnityFramework runUIApplicationMainWithArgc:argv:] main.mm:96

  • SalesAcademy

main main.mm:26

  • 0x0 + 0

Looks like some of the stack frames are missing, so it’s a little tricky to tell exactly where it’s crashing.
What version of FMOD are you using?

there are no stack frames missing that I am aware of. This is what we had in the crash log. It is from Unity v2022.3.10f1. I am sorry but I have no idea what they use in their engine.

Please find the crash caught under xcode whilst debugging the app from the ipad.

If you aren’t directly using FMOD and you are getting this crash from Unity then you will need to discuss it with Unity. Unity uses an old version of FMOD that they maintain themselves, so it’s not something we can help with unfortunately.
At a high level, it looks like the crash is occurring while resampling recorded audio data. Resampling occurs when there is a mismatch between the sample rate of two devices. Perhaps if you can match Unity’s sample rate to the recording device or visa versa you can avoid the resampler block and avoid the crash.
Just speculation as I don’t have Unity’s source code, and I’m not sure how much control you have over Unity’s sample rate, but might be worth a shot.