plugdata-team / plugdata

Pure Data as a plugin, with a new GUI
https://plugdata.org
GNU General Public License v3.0
1.58k stars 67 forks source link

standalone crash on mac using Aoo external with opus #1946

Closed bluck101 closed 1 week ago

bluck101 commented 1 week ago

HI, systematic crash of plugdata 0.92 latest (CMake #6432) on mac with AOO external when creating the audio stream . Same patch works fine with 0.91 using pcm or opus. It works with pcm format in 0.92, but not with opus format.

crash thread details : Thread 5 Crashed:: com.apple.audio.IOThread.client 0 libsystem_kernel.dylib 0x186230704 __pthread_kill + 8 1 libsystem_pthread.dylib 0x186267c28 pthread_kill + 288 2 libsystem_c.dylib 0x186175ae8 abort + 180 3 aoo.d_fat 0x1125a5d74 celt_fatal + 52 4 aoo.d_fat 0x11257c388 opus_decode_native + 1368 5 aoo.d_fat 0x1125864b4 opus_multistream_decode_native + 660 6 aoo.d_fat 0x112586854 opus_multistream_decode_float + 40 7 aoo.d_fat 0x112577b6c 0x112518000 + 392044 8 aoo.d_fat 0x1125332b4 0x112518000 + 111284 9 aoo.d_fat 0x112532aa4 0x112518000 + 109220 10 plugdata 0x102e7ad44 PluginProcessor::processBlock(juce::AudioBuffer&, juce::MidiBuffer&) + 524 11 plugdata 0x1031d35f8 juce::AudioProcessorPlayer::audioDeviceIOCallbackWithContext(float const const, int, float const, int, int, juce::AudioIODeviceCallbackContext const&) + 1624 12 plugdata 0x10360ff60 juce::AudioDeviceManager::audioDeviceIOCallbackInt(float const const, int, float const, int, int, juce::AudioIODeviceCallbackContext const&) + 496 13 plugdata 0x10361bc1c juce::CoreAudioClasses::CoreAudioInternal::audioCallback(AudioTimeStamp const, AudioTimeStamp const, AudioBufferList const, AudioBufferList) + 1032 14 plugdata 0x10361b7d4 juce::CoreAudioClasses::CoreAudioInternal::audioIOProc(unsigned int, AudioTimeStamp const, AudioBufferList const, AudioTimeStamp const, AudioBufferList, AudioTimeStamp const, void) + 28 15 CoreAudio 0x18854294c HALC_ProxyIOContext::IOWorkLoop() + 6628 16 CoreAudio 0x18854088c invocation function for block in HALC_ProxyIOContext::HALC_ProxyIOContext(unsigned int, unsigned int) + 116 17 CoreAudio 0x1886a3574 HALB_IOThread::Entry(void*) + 88 18 libsystem_pthread.dylib 0x186267fa8 _pthread_start + 148 19 libsystem_pthread.dylib 0x186262da0 thread_start + 8

timothyschoen commented 1 week ago

That's because we also include the opus library in plugdata, inside the pdlink~ object.

If you are building plugdata yourself with cmake, you could remove the opus library from plugdata (and disable pdlink~) by changing the cmake files.

bluck101 commented 1 week ago

Thank you for answering, i'll try that