Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in app using AVAudioSourceNode #19868

Closed
MortenGregersen opened this issue Jan 22, 2024 · 5 comments · Fixed by #20357
Closed

Crash in app using AVAudioSourceNode #19868

MortenGregersen opened this issue Jan 22, 2024 · 5 comments · Fixed by #20357
Labels
bug If an issue is a bug or a pull request a bug fix
Milestone

Comments

@MortenGregersen
Copy link

MortenGregersen commented Jan 22, 2024

This is a follow-up on my previous issue #19634, where the sample project worked (when @rolfbjarne's permission string was added. But we have a similar issue in our MAUI app, where the app crashes when data is written to an AVAudioSourceNode's output buffer. From the crash log, we can't really tell, why the crash happens.

Steps to Reproduce

  1. Attach an AVAudioSourceNode to an AVAudioEngine
  2. Connect it to the mainMixerNode
  3. Write data to the AVAudioSourceNode's output buffer
using System.Runtime.InteropServices;
using AudioToolbox;
using AVFoundation;
using NAudio.Wave;

namespace Softphone
{
    public partial class Speakers
    {
        private AVAudioSourceNode _sourceNode;
        private IWaveProvider _waveProvider;
        private readonly AVAudioFormat _inputFormat = new(AVAudioCommonFormat.PCMInt16, 8000, channels: 1, interleaved: true);
        
        public void Configure(AVAudioEngine audioEngine)
        {
            _waveProvider = MediaOutput.ToWaveProvider16();
            int _bufferByteSize = _waveProvider.WaveFormat.ConvertLatencyToByteSize(20); // 20 ms of data: 320 bytes
            _sourceNode = new(_inputFormat, (ref bool isSilence, ref AudioTimeStamp timestamp, uint frameCount, ref AudioBuffers outputData) =>
            {
                try
                {
                    Console.WriteLine("MBG source node {0}, {1}, {2}, {3}", isSilence, timestamp, frameCount, outputData);

                    byte[] data = new byte[frameCount];
                    int numberOfBytes = _waveProvider.Read(data, 0, (int) frameCount);
                    IntPtr buffer = Marshal.AllocHGlobal(data.Length);
                    Marshal.Copy(data, 0, buffer, data.Length);
                    outputData.SetData(0, buffer, data.Length);
                }
                catch(Exception e)
                {
                    Console.WriteLine(e);
                }

                return 0;
            });
            audioEngine.AttachNode(_sourceNode);
            audioEngine.Connect(_sourceNode, audioEngine.MainMixerNode, _inputFormat);
        }

        public void Unconfigure(AVAudioEngine audioEngine)
        {
            audioEngine.DetachNode(_sourceNode);
        }
    }
}

Expected Behavior

Audio coming out of the speaker - and no crash.

Actual Behavior

Crash 💥

14:49:34:962	Thread started:  #24
14:49:35:045	2024-01-19 14:51:05.797 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:045	2024-01-19 14:51:05.797 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:045	2024-01-19 14:51:05.797 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:045	2024-01-19 14:51:05.797 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:045	
14:49:35:072	2024-01-19 14:51:05.800 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:072	2024-01-19 14:51:05.800 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:072	2024-01-19 14:51:05.800 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:072	2024-01-19 14:51:05.800 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:072	2024-01-19 14:51:05.800 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:072	2024-01-19 14:51:05.800 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:072	2024-01-19 14:51:05.800 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:072	2024-01-19 14:51:05.801 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:072	
14:49:35:119	2024-01-19 14:51:05.797 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:119	
14:49:35:119	2024-01-19 14:51:05.799 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:119	
14:49:35:133	2024-01-19 14:51:05.800 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:133	2024-01-19 14:51:05.800 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:133	2024-01-19 14:51:05.800 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:133	
14:49:35:133	2024-01-19 14:51:05.802 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:133	
14:49:35:133	2024-01-19 14:51:05.799 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:133	
14:49:35:133	2024-01-19 14:51:05.799 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:133	2024-01-19 14:51:05.799 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:133	
14:49:35:163	2024-01-19 14:51:05.802 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:163	2024-01-19 14:51:05.803 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:163	2024-01-19 14:51:05.803 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:163	2024-01-19 14:51:05.803 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:163	2024-01-19 14:51:05.803 Xamarin.PreBuilt.iOS[557:25770] Warning: observer object was not disposed manually with Dispose()
14:49:35:163	
14:49:35:300	The thread 0x18 has exited with code 0 (0x0).
14:49:35:301	
14:49:35:301	Thread finished:  #24
14:49:36:322	
14:49:38:871	
14:49:38:940	2024-01-19 14:51:09.693 Xamarin.PreBuilt.iOS[557:26383] MBG source node False, {SampleTime=353,HostTime=69661072948,RateScalar=1}, 65, AudioToolbox.AudioBuffers
14:49:38:940	
14:49:38:947		0x1cab62244 - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:38:947		0x1d65b6504 - /System/Library/Frameworks/AVFAudio.framework/AVFAudio : <redacted>
14:49:38:947		0x22a3c5dcc - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:38:947		0x22a3ae760 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:38:947		0x1cab2bffc - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:38:947		0x1caaa9628 - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:38:947		0x1cac272a8 - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:38:947		0x1caaa8d74 - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:38:947		0x1cab2bb94 - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:38:947		0x22a3ba014 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <
14:49:38:947	Thread started:  #25
14:49:39:464		0x1cabc3ae0 - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:39:464	
14:49:39:464	ortCollection
14:49:39:464	
14:49:39:464	
14:49:39:464	=================================================================
14:49:39:464		Native Crash Reporting
14:49:39:464	=================================================================
14:49:39:464	Got a SIGSEGV while executing native code. This usually indicates
14:49:39:464	a fatal error in the mono runtime or one of the native libraries 
14:49:39:464	used by your application.
14:49:39:464	=================================================================
14:49:39:464	
14:49:39:464	=================================================================
14:49:39:464		Native stacktrace:
14:49:39:464	=================================================================
14:49:39:464		0x100b2d6e0 - /private/var/containers/Bundle/Application/DAC0D95D-48BE-4396-A7BD-42B4F29D3EAF/GoMaui.app/Xamarin.PreBuilt.iOS : AppleCryptoNative_X509ImportCollection
14:49:39:464		0x100b185cc - /private/var/containers/Bundle/Application/DAC0D95D-48BE-4396-A7BD-42B4F29D3EAF/GoMaui.app/Xamarin.PreBuilt.iOS : AppleCryptoNative_X509ImportCollection
14:49:39:464		0x100afa954 - /private/var/containers/Bundle/Application/DAC0D95D-48BE-4396-A7BD-42B4F29D3EAF/GoMaui.app/Xamarin.PreBuilt.iOS : AppleCryptoNative_X509Imp
14:49:39:464		0x21f4dc214 - /usr/lib/system/libsystem_platform.dylib : <redacted>
14:49:39:464		0x100b30918 - /private/var/containers/Bundle/Application/DAC0D95D-48BE-4396-A7BD-42B4F29D3EAF/GoMaui.app/Xamarin.PreBuilt.iOS : AppleCryptoNative_X509ImportCollection
14:49:39:464		0x100b2e510 - /private/var/containers/Bundle/Application/DAC0D95D-48BE-4396-A7BD-42B4F29D3EAF/GoMaui.app/Xamarin.PreBuilt.iOS : AppleCryptoNative_X509ImportCollection
14:49:39:464		0x1007d5a18 - /private/var/containers/Bundle/Application/DAC0D95D-48BE-4396-A7BD-42B4F29D3EAF/GoMaui.app/Xamarin.PreBuilt.iOS : 
14:49:39:464		0x1d65db718 - /System/Library/Frameworks/AVFAudio.framework/AVFAudio : <redacted>
14:49:39:464		0x1d65ba14c - /System/Library/Frameworks/AVFAudio.framework/AVFAudio : <redacted>
14:49:39:464	
14:49:39:464	2024-01-19 14:51:09.692 Xamarin.PreBuilt.iOS[557:26383] The type AudioToolbox.AudioBuffers does not have a constructor that takes two (ObjCRuntime.NativeHandle, bool) arguments but a constructor that takes two (System.IntPtr, bool) parameters was found (and will be used instead). It's highly recommended to change the signature of the (System.IntPtr, bool) constructor to be (ObjCRuntime.NativeHandle, bool).
14:49:39:464	
14:49:39:464		0x22a3b9f30 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:464		0x22a3a4320 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:464	
14:49:39:464	acted>
14:49:39:464		0x22a3a6534 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:464		0x1cabc24f8 - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:39:464	
14:49:39:464		0x22a3a6534 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:464		0x1cabc24f8 - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:39:464		0x1cab62244 - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:39:464		0x1d65b6504 - /System/Library/Frameworks/AVFAudio.framework/AVFAudio : <redacted>
14:49:39:464		0x1cabc3ae0 - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:39:464		0x22a3bdd38 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:464		0x22a3bbac4 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:464		0x22a3a7084 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:464		0x22a3a98dc - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:464		0x22a3a4320 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <red
14:49:39:464		0x1e084f000 - /usr/lib/libAudioToolboxUtility.dylib : MSHMIGDispatchMessage
14:49:39:464	
14:49:39:464	The app has been terminated.
14:49:39:465	0x1caaa8d74 - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:39:465		0x1cab2bb94 - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:39:465		0x22a3ba014 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:465		0x22a3b3e54 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:465		0x22a3a4320 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:465		0x22a3a4e60 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:465		0x22a3adb74 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:465		0x1e084f8b4 - /usr/lib/libAudioToolboxUtility.dylib : <redacted>
14:49:39:465		0x1e084f000 - /usr/lib/libAudioToolboxUtility.dylib : MSHMIGDispatchMessage
14:49:39:465		0x22a44a160 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:465		0x21f5726b8 - /usr/lib/system/libsystem
14:49:39:474	_pthread.dylib : _pthread_start
14:49:39:474		0x21f571b88 - /usr/lib/system/libsystem_pthread.dylib : thread_start
14:49:39:474	
14:49:39:474	Exiting early due to double fault.
14:49:39:474	
14:49:39:475	20 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:475		0x22a3a6534 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:475		0x1cabc24f8 - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:39:475		0x1cab62244 - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:39:475		0x1d65b6504 - /System/Library/Frameworks/AVFAudio.framework/AVFAudio : <redacted>
14:49:39:475		0x22a3c5dcc - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:475		0x22a3ae760 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:475		0x1cab2bffc - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:39:475		0x1caaa9628 - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:39:475		0x1cac272a8 - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:39:475		
14:49:39:475	ystem/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:475		0x22a3a6534 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:475		0x1cabc24f8 - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:39:475		0x1cab62244 - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:39:475		0x1d65b6504 - /System/Library/Frameworks/AVFAudio.framework/AVFAudio : <redacted>
14:49:39:475		0x1cabc3ae0 - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:39:475		0x22a3bdd38 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:475		0x22a3bbac4 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:475		0x22a3a7084 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:475		0x22a3a98dc - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:475		0x22a3a43
14:49:39:475	396-A7BD-42B4F29D3EAF/GoMaui.app/Xamarin.PreBuilt.iOS : AppleCryptoNative_X509ImportCollection
14:49:39:475		0x21f4dc214 - /usr/lib/system/libsystem_platform.dylib : <redacted>
14:49:39:475		0x100b30918 - /private/var/containers/Bundle/Application/DAC0D95D-48BE-4396-A7BD-42B4F29D3EAF/GoMaui.app/Xamarin.PreBuilt.iOS : AppleCryptoNative_X509ImportCollection
14:49:39:475		0x100b2e510 - /private/var/containers/Bundle/Application/DAC0D95D-48BE-4396-A7BD-42B4F29D3EAF/GoMaui.app/Xamarin.PreBuilt.iOS : AppleCryptoNative_X509ImportCollection
14:49:39:475		0x1007d5a18 - /private/var/containers/Bundle/Application/DAC0D95D-48BE-4396-A7BD-42B4F29D3EAF/GoMaui.app/Xamarin.PreBuilt.iOS : 
14:49:39:475		0x1d65db718 - /System/Library/Frameworks/AVFAudio.framework/AVFAudio : <redacted>
14:49:39:475		0x1d65ba14c - /System/Library/Frameworks/AVFAudio.framework/AVFAudio : <redacted>
14:49:39:475		0x1cabc3ae0 - /System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore : <redacted>
14:49:39:475		0x22a3b9f30 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:475		0x22a3a4320 - /S
14:49:39:475	============================================
14:49:39:475		Native Crash Reporting
14:49:39:475	=================================================================
14:49:39:475	Got a SIGSEGV while executing native code. This usually indicates
14:49:39:475	a fatal error in the mono runtime or one of the native libraries 
14:49:39:475	used by your application.
14:49:39:475	=================================================================
14:49:39:475	
14:49:39:475	An error has occurred in the native fault reporting. Some diagnostic information will be unavailable.
14:49:39:475	
14:49:39:475	=================================================================
14:49:39:475		Native stacktrace:
14:49:39:475	=================================================================
14:49:39:475		0x100b2d6e0 - /private/var/containers/Bundle/Application/DAC0D95D-48BE-4396-A7BD-42B4F29D3EAF/GoMaui.app/Xamarin.PreBuilt.iOS : AppleCryptoNative_X509ImportCollection
14:49:39:475		0x100b185cc - /private/var/containers/Bundle/Application/DAC0D95D-48BE-4396-A7BD-42B4F29D3EAF/GoMaui.app/Xamarin.PreBuilt.iOS : AppleCryptoNative_X509ImportCollection
14:49:39:475		0x100afa954 - /private/var/containers/Bundle/Application/DAC0D95D-48BE-4
14:49:39:483		0x22a44a160 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:483		0x21f5726b8 - /usr/lib/system/libsystem_pthread.dylib : _pthread_start
14:49:39:483		0x21f571b88 - /usr/lib/system/libsystem_pthread.dylib : thread_start
14:49:39:483	
14:49:39:483	=================================================================
14:49:39:483		Basic Fault Address Reporting
14:49:39:483	=================================================================
14:49:39:483	Memory around native instruction pointer (0x100b34310):0x100b34300  e8 0a 40 79 68 6a 68 f8 a8 d1 00 b4 e0 03 1a aa  ..@yhjh.........
14:49:39:483	0x100b34310  08 01 40 b9 e9 06 40 79 68 6a 29 b8 e8 1a 00 91  ..@...@yhj).....
14:49:39:483	0x100b34320  17 01 40 79 29 5b 77 f8 fc 03 16 aa f6 03 08 aa  ..@y)[w.........
14:49:39:483	0x100b34330  20 01 1f d6 f7 03 16 aa f6 03 1c aa e8 0a 40 79   .............@y
14:49:39:483	
14:49:39:483	=================================================================
14:49:39:483		Managed Stacktrace:
14:49:39:483	=================================================================
14:49:39:483	=================================================================
14:49:39:483	
14:49:39:483	=====================
14:49:39:483		0x1e084f8b4 - /usr/lib/libAudioToolboxUtility.dylib : <redacted>
14:49:39:483	
14:49:39:483	redacted>
14:49:39:483		0x22a3b3e54 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:483		0x22a3a4320 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:483		0x22a3a4e60 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:483		0x22a3adb74 - /System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib : <redacted>
14:49:39:483	

Environment

Version information
Microsoft Visual Studio Professional 2022
Version 17.8.5
VisualStudio.17.Release.LTSC.17.8/17.8.5+34511.84
Microsoft .NET Framework
Version 4.8.09032

Installed Version: Professional

ASP.NET and Web Tools   17.8.358.6298
ASP.NET and Web Tools

Azure App Service Tools v3.0.0   17.8.358.6298
Azure App Service Tools v3.0.0

C# Tools   4.8.0-7.23572.1+7b75981cf3bd520b86ec4ed00ec156c8bc48e4eb
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Extensibility Message Bus   1.4.39 (main@e8108eb)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Mono Debugging for Visual Studio   17.8.17 (957fbed)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   6.8.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Razor (ASP.NET Core)   17.8.3.2405201+d135dd8d2ec1c2fbdee220e8656b308694e17a4b
Provides languages services for ASP.NET Core Razor.

TypeScript Tools   17.0.20920.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   4.8.0-7.23572.1+7b75981cf3bd520b86ec4ed00ec156c8bc48e4eb
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools   17.8.0-beta.23475.2+10f956e631a1efc0f7f5e49c626c494cd32b1f50
Microsoft Visual F# Tools

Visual Studio IntelliCode   2.2
AI-assisted development for Visual Studio.

VisualStudio.DeviceLog   1.0
Information about my package

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

VSPackage Extension   1.0
VSPackage Visual Studio Extension Detailed Info

Xamarin   17.8.0.157 (d17-8@8e82278)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer   17.8.3.6 (remotes/origin/d17-8@eccf46a291)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates   17.8.16 (830b56a)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK   13.2.2.0 (d17-5/45b0e14)
Xamarin.Android Reference Assemblies and MSBuild support.
    Mono: d9a6e87
    Java.Interop: xamarin/java.interop/d17-5@149d70fe
    SQLite: xamarin/sqlite/3.40.1@68c69d8
    Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-5@ca1552d


Xamarin.iOS and Xamarin.Mac SDK   16.4.0.23 (9defd91b3)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Build Logs

Buildlogs.zip

Example Project (If Possible)

The relevant code is in the "Steps to Reproduce" section above.

@rolfbjarne
Copy link
Member

Please provide a complete test project we can use; your code snippet is incomplete (for instance, there's no code for the IWaveProvider or MediaOutput types).

@rolfbjarne rolfbjarne added the need-repro Waiting for a test case before the bug can be investigated label Jan 23, 2024
@rolfbjarne rolfbjarne added this to the Future milestone Jan 23, 2024
Copy link
Contributor

Hi @MortenGregersen. We have added the "need-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/xamarin/xamarin-macios/blob/main/docs/bug-repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Copy link
Contributor

Hi @MortenGregersen. Due to inactivity, we will be closing this issue. Please feel free to re-open this issue if the issue persists. For enhanced visibility, if over 7 days have passed, please open a new issue and link this issue there. Thank you.

@microsoft-github-policy-service microsoft-github-policy-service bot removed this from the Future milestone Jan 31, 2024
@rolfbjarne rolfbjarne added bug If an issue is a bug or a pull request a bug fix and removed need-repro Waiting for a test case before the bug can be investigated labels Apr 9, 2024
@rolfbjarne rolfbjarne added this to the Future milestone Apr 9, 2024
@rolfbjarne
Copy link
Member

Reopening; repro project was provided privately.

rolfbjarne added a commit that referenced this issue Apr 9, 2024
#20357)

The signature of the callback provided when creating AVAudioSourceNode instances
was wrong, so the callback would get corrupted data, causing crashes.

Fix the callback to have the right signature (not too difficult), and also make the
existing signature work (a bit more complicated).

Note that this is the second time we've tried to fix the delegate signature for the
AVAudioSourceNode callbacks, but now with tests, so hoping there won't be a third
time.

Fixes #19868.
@rolfbjarne rolfbjarne reopened this Apr 9, 2024
@rolfbjarne
Copy link
Member

Fixed with #20357.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug If an issue is a bug or a pull request a bug fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants