IOS Audio Crash

I think I’m getting a stack overflow crash. This error occurs on ios as soon as the audio is received from convai. Works fine on andriod and I’m able to chat with my npc, but not iphone.

I’ve tried using NPC AI Engine plugin version 4.1 and 4.2

Here are the last logs in the xcode console before it crashes

<color=grey>[14:38:39.558][Info][SDK]: [AudioTrackManager] AudioStream created successfully for Character 'ad7178ae-483d-11f1-9b48-42010a7be02e'</color>
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
Convai.Runtime.Logging.UnityConsoleSink:Write(LogEntry)
Convai.Domain.Logging.LogSinkExtensions:WriteIfEnabled(ILogSink, LogEntry&)
Convai.Runtime.Logging.ConvaiLogger:DispatchToSinks(LogEntry&)
Convai.Runtime.Logging.ConvaiLogger:LogMessageUnchecked(String, LogLevel, LogCategory, Exception)
Convai.Runtime.Logging.ConvaiLogger:LogMessage(String, LogLevel, LogCategory, Exception)
Convai.Runtime.Networking.Media.AudioTrackManager:HandleRemoteAudioTrackSubscribed(IRemoteAudioTrack, String, String)
Convai.Infrastructure.Networking.RemoteTrackSessionNotificationSupport:DispatchInline(Action)
Convai.Infrastructure.Networking.RemoteTrackSessionNotificationSupport:Notify(Delegate, Action, String, String, ILogger, String, Func`2, LogCategory)
Convai.Infrastructure.Networking.Native.NativeRoomController:HandleResolvedTransportAudioSubscription(TrackInfo, IRemoteParticipant, IRemoteAudioTrack, Boolean, String)
Convai.Infrastructure.Networking.Native.NativeRoomController:HandleRoomFacadeAudioTrackSubscribedCore(IRemoteAudioTrack, IRemoteParticipant)
Convai.Infrastructure.Networking.Native.NativeRoomFacade:OnTrackSubscribed(IRemoteTrack, RemoteTrackPublication, RemoteParticipant)
LiveKit.Internal.<>c:<FFICallback>b__109_0(Object)
UnityEngine.WorkRequest:Invoke()
UnityEngine.UnitySynchronizationContext:Exec()

<color=grey>[14:38:39.558][Info][SDK]: [AudioTrackManager] Audio track subscription completed for participant: ad7178ae-483d-11f1-9b48-42010a7be02e</color>
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
Convai.Runtime.Logging.UnityConsoleSink:Write(LogEntry)
Convai.Domain.Logging.LogSinkExtensions:WriteIfEnabled(ILogSink, LogEntry&)
Convai.Runtime.Logging.ConvaiLogger:DispatchToSinks(LogEntry&)
Convai.Runtime.Logging.ConvaiLogger:LogMessageUnchecked(String, LogLevel, LogCategory, Exception)
Convai.Runtime.Logging.ConvaiLogger:LogMessage(String, LogLevel, LogCategory, Exception)
Convai.Runtime.Networking.Media.AudioTrackManager:HandleRemoteAudioTrackSubscribed(IRemoteAudioTrack, String, String)
Convai.Infrastructure.Networking.RemoteTrackSessionNotificationSupport:DispatchInline(Action)
Convai.Infrastructure.Networking.RemoteTrackSessionNotificationSupport:Notify(Delegate, Action, String, String, ILogger, String, Func`2, LogCategory)
Convai.Infrastructure.Networking.Native.NativeRoomController:HandleResolvedTransportAudioSubscription(TrackInfo, IRemoteParticipant, IRemoteAudioTrack, Boolean, String)
Convai.Infrastructure.Networking.Native.NativeRoomController:HandleRoomFacadeAudioTrackSubscribedCore(IRemoteAudioTrack, IRemoteParticipant)
Convai.Infrastructure.Networking.Native.NativeRoomFacade:OnTrackSubscribed(IRemoteTrack, RemoteTrackPublication, RemoteParticipant)
LiveKit.Internal.<>c:<FFICallback>b__109_0(Object)
UnityEngine.WorkRequest:Invoke()
UnityEngine.UnitySynchronizationContext:Exec()

Sending mural intro speech prompt to ConvaiPlayer.
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
<SendIntroWhenReady>d__27:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

We tested this on our side, but we were not able to reproduce the issue.

We recommend creating a new project and taking a build from one of our sample scenes to check whether the issue still occurs there.

The logs you shared unfortunately do not provide enough useful information for us to investigate further. If you are still experiencing the issue, please share the full logs so we can review it in more detail.