Canardoux / flutter_sound

Flutter plugin for sound. Audio recorder and player.
Mozilla Public License 2.0
877 stars 574 forks source link

[BUG]: app crashes after call startRecorder on iOS 17.4 simulator #1032

Open vickychu opened 5 months ago

vickychu commented 5 months ago

Flutter Sound Version : 9.4.6

├── flutter_sound 9.4.6 │ ├── flutter_sound_platform_interface 9.4.6 │ ├── flutter_sound_web 9.4.6 │ │ ├── flutter_sound_platform_interface...


Severity


Platforms you faced the error


Describe the bug My app crashes after I call the function "startRecorder" on the simulator (ios version is 17.4). Everything is ok if the ios version of the simulator is 16. Everything is ok if I run the app in real device, even the ios version of the device is 17.3. I think I'v met the same issue as #1007.

To Reproduce Steps to reproduce the behavior:

  1. Upgrade xcode to 15.3
  2. Select a simulator whose ios version is 17.4
  3. Start the app on this simulator
  4. Start Recorder

Logs!!!!

flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder.openRecorder (package:flutter_sound/public/flutter_sound_recorder.dart:370:13)
flutter: │ #1   AsrState.openRecorder (package:beta_ai_app/states/asr.dart:77:27)
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 FS:---> openAudioSession
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder._openAudioSession (package:flutter_sound/public/flutter_sound_recorder.dart:379:13)
flutter: │ #1   FlutterSoundRecorder.openRecorder.<anonymous closure> (package:flutter_sound/public/flutter_sound_recorder.dart:372:11)
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 ---> openAudioSession
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder._openAudioSession (package:flutter_sound/public/flutter_sound_recorder.dart:394:17)
flutter: │ #1   FlutterSoundRecorder.openRecorder.<anonymous closure> (package:flutter_sound/public/flutter_sound_recorder.dart:372:11)
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 Resetting flutter_sound Recorder Plugin
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder.openRecorder (package:flutter_sound/public/flutter_sound_recorder.dart:374:13)
flutter: │ #1   <asynchronous suspension>
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 FS:<--- openAudioSession
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder.openRecorderCompleted (package:flutter_sound/public/flutter_sound_recorder.dart:169:13)
flutter: │ #1   MethodChannelFlutterSoundRecorder.channelMethodCallHandler (package:flutter_sound_platform_interface/method_channel_flutter_sound_recorder.dart:94:22)
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 ---> openRecorderCompleted: true
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder.openRecorderCompleted (package:flutter_sound/public/flutter_sound_recorder.dart:180:13)
flutter: │ #1   MethodChannelFlutterSoundRecorder.channelMethodCallHandler (package:flutter_sound_platform_interface/method_channel_flutter_sound_recorder.dart:94:22)
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 <--- openRecorderCompleted: true
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder._openAudioSession (package:flutter_sound/public/flutter_sound_recorder.dart:410:13)
flutter: │ #1   <asynchronous suspension>
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 <--- openAudioSession
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
AddInstanceForFactory: No factory registered for id <CFUUID 0x60000022dd80> F8BB1C28-BAE8-11D6-9C31-00039315CD46
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder.setSubscriptionDuration (package:flutter_sound/public/flutter_sound_recorder.dart:512:13)
flutter: │ #1   AsrState.record (package:beta_ai_app/states/asr.dart:119:19)
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 FS:---> setSubscriptionDuration
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder.startRecorder (package:flutter_sound/public/flutter_sound_recorder.dart:588:13)
flutter: │ #1   AsrState.record (package:beta_ai_app/states/asr.dart:120:25)
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 FS:---> startRecorder
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder._startRecorder (package:flutter_sound/public/flutter_sound_recorder.dart:616:13)
flutter: │ #1   FlutterSoundRecorder.startRecorder.<anonymous closure> (package:flutter_sound/public/flutter_sound_recorder.dart:590:13)
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 FS:---> _startRecorder.
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder.setSubscriptionDuration (package:flutter_sound/public/flutter_sound_recorder.dart:519:13)
flutter: │ #1   <asynchronous suspension>
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 FS:<--- setSubscriptionDuration
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
           AURemoteIO.cpp:1162  failed: -10851 (enable 1, outf< 2 ch,      0 Hz, Float32, deinterleaved> inf< 2 ch,      0 Hz, Float32, deinterleaved>)
           AVAEInternal.h:76    required condition is false: [AVAEGraphNode.mm:832:CreateRecordingTap: (IsFormatSampleRateAndChannelCountValid(format))]
*** Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: IsFormatSampleRateAndChannelCountValid(format)'
*** First throw call stack:
(
    0   CoreFoundation                      0x00000001804ae138 __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x0000000180087db4 objc_exception_throw + 56
    2   CoreFoundation                      0x00000001804adfdc +[NSException raise:format:] + 0
    3   AVFAudio                            0x00000001c6393e70 _Z19AVAE_RaiseExceptionP8NSStringz + 48
    4   AVFAudio                            0x00000001c63eb7a4 _ZN17AUGraphNodeBaseV318CreateRecordingTapEmjP13AVAudioFormatU13block_pointerFvP16AVAudioPCMBufferP11AVAudioTimeE + 724
    5   AVFAudio                            0x00000001c645b8cc -[AVAudioNode installTapOnBus:bufferSize:format:block:] + 1344
    6   flutter_sound_core                  0x0000000102e33d10 _ZN19AudioRecorderEngineC2E7t_CODECP8NSStringP19NSMutableDictionarylbP14FlautoRecorder + 2084
    7   flutter_sound_core                  0x0000000102e3460c _ZN19AudioRecorderEngineC1E7t_CODECP8NSStringP19NSMutableDictionarylbP14FlautoRecorder + 152
    8   flutter_sound_core                  0x0000000102e327d0 -[FlautoRecorder startRecorderCodec:toPath:channels:sampleRate:bitRate:bufferSize:enableVoiceProcessing:] + 996
    9   Runner                              0x0000000102b9c27c -[FlutterSoundRecorder startRecorder:result:] + 1696
    10  Runner                              0x0000000102b9d68c -[FlutterSoundRecorderManager handleMethodCall:result:] + 1136
    11  Flutter                             0x00000001078fdeec __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 164
    12  Flutter                             0x0000000107330300 ___ZN7flutter25PlatformMessageHandlerIos21HandlePlatformMessageENSt3_fl10unique_ptrINS_15PlatformMessageENS1_14default_deleteIS3_EEEE_block_invoke + 108
    13  libdispatch.dylib                   0x0000000103d33ec4 _dispatch_call_block_and_release + 24
    14  libdispatch.dylib                   0x0000000103d3573c _dispatch_client_callout + 16
    15  libdispatch.dylib                   0x0000000103d453f8 _dispatch_main_queue_drain + 1228
    16  libdispatch.dylib                   0x0000000103d44f1c _dispatch_main_queue_callback_4CF + 40
    17  CoreFoundation                      0x000000018040e9a0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
    18  CoreFoundation                      0x00000001804090b8 __CFRunLoopRun + 1936
    19  CoreFoundation                      0x0000000180408514 CFRunLoopRunSpecific + 572
    20  GraphicsServices                    0x000000018ef06ae4 GSEventRunModal + 160
    21  UIKitCore                           0x00000001853e8040 -[UIApplication _run] + 868
    22  UIKitCore                           0x00000001853ebcc8 UIApplicationMain + 124
    23  Runner                              0x0000000102b9318c main + 64
    24  dyld                                0x0000000102d3d544 start_sim + 20
    25  ???                                 0x0000000102e5a0e0 0x0 + 4343570656
    26  ???                                 0xdc63000000000000 0x0 + 15880536711038500864
)
libc++abi: terminating due to uncaught exception of type NSException
Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: SIGNAL 6 Abort trap: 6
Terminating Process: Runner [79143]

Triggered by Thread:  0

Last Exception Backtrace:
0   CoreFoundation                         0x1804ae12c __exceptionPreprocess + 160
1   libobjc.A.dylib                        0x180087db4 objc_exception_throw + 56
2   CoreFoundation                         0x1804adfdc +[NSException raise:format:] + 0
3   AVFAudio                               0x1c6393e70 AVAE_RaiseException(NSString*, ...) + 48
4   AVFAudio                               0x1c63eb7a4 AUGraphNodeBaseV3::CreateRecordingTap(unsigned long, unsigned int, AVAudioFormat*, void (AVAudioPCMBuffer*, AVAudioTime*) block_pointer) + 724
5   AVFAudio                               0x1c645b8cc -[AVAudioNode installTapOnBus:bufferSize:format:block:] + 1344
6   flutter_sound_core                     0x1023d3d10 AudioRecorderEngine::AudioRecorderEngine(t_CODEC, NSString*, NSMutableDictionary*, long, bool, FlautoRecorder*) + 2084 (FlautoRecorderEngine.mm:102)
7   flutter_sound_core                     0x1023d460c AudioRecorderEngine::AudioRecorderEngine(t_CODEC, NSString*, NSMutableDictionary*, long, bool, FlautoRecorder*) + 152 (FlautoRecorderEngine.mm:39)
8   flutter_sound_core                     0x1023d27d0 -[FlautoRecorder startRecorderCodec:toPath:channels:sampleRate:bitRate:bufferSize:enableVoiceProcessing:] + 996 (FlautoRecorder.mm:229)
9   Runner                                 0x10225c27c -[FlutterSoundRecorder startRecorder:result:] + 1696
10  Runner                                 0x10225d68c -[FlutterSoundRecorderManager handleMethodCall:result:] + 1136
11  Flutter                                0x1068e5eec __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 164
12  Flutter                                0x106318300 invocation function for block in flutter::PlatformMessageHandlerIos::HandlePlatformMessage(std::_fl::unique_ptr<flutter::PlatformMessage, std::_fl::default_delete<flutter::PlatformMessage>>) + 108
13  libdispatch.dylib                      0x180170104 _dispatch_call_block_and_release + 24
14  libdispatch.dylib                      0x180171978 _dispatch_client_callout + 16
15  libdispatch.dylib                      0x1801807c8 _dispatch_main_queue_drain + 1276
16  libdispatch.dylib                      0x1801802bc _dispatch_main_queue_callback_4CF + 40
17  CoreFoundation                         0x18040e9a0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
18  CoreFoundation                         0x1804090b8 __CFRunLoopRun + 1936
19  CoreFoundation                         0x180408514 CFRunLoopRunSpecific + 572
20  GraphicsServices                       0x18ef06ae4 GSEventRunModal + 160
21  UIKitCore                              0x1853e8040 -[UIApplication _run] + 868
22  UIKitCore                              0x1853ebcc8 UIApplicationMain + 124
23  Runner                                 0x10225318c main + 64 (AppDelegate.swift:5)
24  dyld_sim                               0x1023fd544 start_sim + 20
25  dyld                                   0x10266a0e0 start + 2360
26  ???                             0x631c000000000000 ???

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib                 0x1025113b0 __pthread_kill + 8
1   libsystem_pthread.dylib                0x10260f124 pthread_kill + 256
2   libsystem_c.dylib                      0x1801655c0 abort + 104
3   libc++abi.dylib                        0x1802a7798 abort_message + 128
4   libc++abi.dylib                        0x180298eec demangling_terminate_handler() + 300
5   libobjc.A.dylib                        0x180063498 _objc_terminate() + 124
6   libc++abi.dylib                        0x1802a6c70 std::__terminate(void (*)()) + 12
7   libc++abi.dylib                        0x1802a6c20 std::terminate() + 52
8   libdispatch.dylib                      0x18017198c _dispatch_client_callout + 36
9   libdispatch.dylib                      0x1801807c8 _dispatch_main_queue_drain + 1276
10  libdispatch.dylib                      0x1801802bc _dispatch_main_queue_callback_4CF + 40
11  CoreFoundation                         0x18040e9a0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
12  CoreFoundation                         0x1804090b8 __CFRunLoopRun + 1936
13  CoreFoundation                         0x180408514 CFRunLoopRunSpecific + 572
14  GraphicsServices                       0x18ef06ae4 GSEventRunModal + 160
15  UIKitCore                              0x1853e8040 -[UIApplication _run] + 868
16  UIKitCore                              0x1853ebcc8 UIApplicationMain + 124
17  Runner                                 0x10225318c main + 64 (AppDelegate.swift:5)
18  dyld_sim                               0x1023fd544 start_sim + 20
19  dyld                                   0x10266a0e0 start + 2360

Thread 1:: com.apple.uikit.eventfetch-thread
0   libsystem_kernel.dylib                 0x102509570 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x10251ab80 mach_msg2_internal + 76
2   libsystem_kernel.dylib                 0x102511798 mach_msg_overwrite + 532
3   libsystem_kernel.dylib                 0x1025098e8 mach_msg + 20
4   CoreFoundation                         0x18040e6c4 __CFRunLoopServiceMachPort + 156
5   CoreFoundation                         0x180408da4 __CFRunLoopRun + 1148
6   CoreFoundation                         0x180408514 CFRunLoopRunSpecific + 572
7   Foundation                             0x180dea38c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 208
8   Foundation                             0x180dea5b0 -[NSRunLoop(NSRunLoop) runUntilDate:] + 60
9   UIKitCore                              0x18548df20 -[UIEventFetcher threadMain] + 404
10  Foundation                             0x180e10be4 __NSThread__start__ + 720
11  libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
12  libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 2:
0   libsystem_pthread.dylib                0x10260a5cc start_wqthread + 0

Thread 3:: io.flutter.1.ui
0   libsystem_kernel.dylib                 0x102509570 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x10251ab80 mach_msg2_internal + 76
2   libsystem_kernel.dylib                 0x102511798 mach_msg_overwrite + 532
3   libsystem_kernel.dylib                 0x1025098e8 mach_msg + 20
4   CoreFoundation                         0x18040e6c4 __CFRunLoopServiceMachPort + 156
5   CoreFoundation                         0x180408da4 __CFRunLoopRun + 1148
6   CoreFoundation                         0x180408514 CFRunLoopRunSpecific + 572
7   Flutter                                0x1065e9e78 fml::MessageLoopDarwin::Run() + 88
8   Flutter                                0x1065e3098 fml::MessageLoopImpl::DoRun() + 40
9   Flutter                                0x1065e88f8 void* std::_fl::__thread_proxy[abi:v15000]<std::_fl::tuple<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct>>, fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0>>(void*) + 208
10  libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
11  libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 4:: io.flutter.1.raster
0   libsystem_kernel.dylib                 0x102509570 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x10251ab80 mach_msg2_internal + 76
2   libsystem_kernel.dylib                 0x102511798 mach_msg_overwrite + 532
3   libsystem_kernel.dylib                 0x1025098e8 mach_msg + 20
4   CoreFoundation                         0x18040e6c4 __CFRunLoopServiceMachPort + 156
5   CoreFoundation                         0x180408da4 __CFRunLoopRun + 1148
6   CoreFoundation                         0x180408514 CFRunLoopRunSpecific + 572
7   Flutter                                0x1065e9e78 fml::MessageLoopDarwin::Run() + 88
8   Flutter                                0x1065e3098 fml::MessageLoopImpl::DoRun() + 40
9   Flutter                                0x1065e88f8 void* std::_fl::__thread_proxy[abi:v15000]<std::_fl::tuple<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct>>, fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0>>(void*) + 208
10  libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
11  libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 5:: io.flutter.1.io
0   libsystem_kernel.dylib                 0x102509570 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x10251ab80 mach_msg2_internal + 76
2   libsystem_kernel.dylib                 0x102511798 mach_msg_overwrite + 532
3   libsystem_kernel.dylib                 0x1025098e8 mach_msg + 20
4   CoreFoundation                         0x18040e6c4 __CFRunLoopServiceMachPort + 156
5   CoreFoundation                         0x180408da4 __CFRunLoopRun + 1148
6   CoreFoundation                         0x180408514 CFRunLoopRunSpecific + 572
7   Flutter                                0x1065e9e78 fml::MessageLoopDarwin::Run() + 88
8   Flutter                                0x1065e3098 fml::MessageLoopImpl::DoRun() + 40
9   Flutter                                0x1065e88f8 void* std::_fl::__thread_proxy[abi:v15000]<std::_fl::tuple<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct>>, fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0>>(void*) + 208
10  libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
11  libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 6:: io.flutter.1.profiler
0   libsystem_kernel.dylib                 0x102509570 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x10251ab80 mach_msg2_internal + 76
2   libsystem_kernel.dylib                 0x102511798 mach_msg_overwrite + 532
3   libsystem_kernel.dylib                 0x1025098e8 mach_msg + 20
4   CoreFoundation                         0x18040e6c4 __CFRunLoopServiceMachPort + 156
5   CoreFoundation                         0x180408da4 __CFRunLoopRun + 1148
6   CoreFoundation                         0x180408514 CFRunLoopRunSpecific + 572
7   Flutter                                0x1065e9e78 fml::MessageLoopDarwin::Run() + 88
8   Flutter                                0x1065e3098 fml::MessageLoopImpl::DoRun() + 40
9   Flutter                                0x1065e88f8 void* std::_fl::__thread_proxy[abi:v15000]<std::_fl::tuple<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct>>, fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0>>(void*) + 208
10  libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
11  libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 7:: io.worker.1
0   libsystem_kernel.dylib                 0x10250ca70 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x10260f9cc _pthread_cond_wait + 1216
2   Flutter                                0x10632d0c8 std::_fl::condition_variable::wait(std::_fl::unique_lock<std::_fl::mutex>&) + 24
3   Flutter                                0x1065e00f4 fml::ConcurrentMessageLoop::WorkerMain() + 128
4   Flutter                                0x1065e0814 void* std::_fl::__thread_proxy[abi:v15000]<std::_fl::tuple<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct>>, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>>(void*) + 184
5   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
6   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 8:: io.worker.2
0   libsystem_kernel.dylib                 0x10250ca70 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x10260f9cc _pthread_cond_wait + 1216
2   Flutter                                0x10632d0c8 std::_fl::condition_variable::wait(std::_fl::unique_lock<std::_fl::mutex>&) + 24
3   Flutter                                0x1065e00f4 fml::ConcurrentMessageLoop::WorkerMain() + 128
4   Flutter                                0x1065e0814 void* std::_fl::__thread_proxy[abi:v15000]<std::_fl::tuple<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct>>, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>>(void*) + 184
5   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
6   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 9:: io.worker.3
0   libsystem_kernel.dylib                 0x10250ca70 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x10260f9cc _pthread_cond_wait + 1216
2   Flutter                                0x10632d0c8 std::_fl::condition_variable::wait(std::_fl::unique_lock<std::_fl::mutex>&) + 24
3   Flutter                                0x1065e00f4 fml::ConcurrentMessageLoop::WorkerMain() + 128
4   Flutter                                0x1065e0814 void* std::_fl::__thread_proxy[abi:v15000]<std::_fl::tuple<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct>>, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>>(void*) + 184
5   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
6   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 10:: io.worker.4
0   libsystem_kernel.dylib                 0x10250ca70 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x10260f9cc _pthread_cond_wait + 1216
2   Flutter                                0x10632d0c8 std::_fl::condition_variable::wait(std::_fl::unique_lock<std::_fl::mutex>&) + 24
3   Flutter                                0x1065e00f4 fml::ConcurrentMessageLoop::WorkerMain() + 128
4   Flutter                                0x1065e0814 void* std::_fl::__thread_proxy[abi:v15000]<std::_fl::tuple<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct>>, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>>(void*) + 184
5   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
6   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 11:: io.worker.5
0   libsystem_kernel.dylib                 0x10250ca70 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x10260f9cc _pthread_cond_wait + 1216
2   Flutter                                0x10632d0c8 std::_fl::condition_variable::wait(std::_fl::unique_lock<std::_fl::mutex>&) + 24
3   Flutter                                0x1065e00f4 fml::ConcurrentMessageLoop::WorkerMain() + 128
4   Flutter                                0x1065e0814 void* std::_fl::__thread_proxy[abi:v15000]<std::_fl::tuple<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct>>, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>>(void*) + 184
5   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
6   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 12:: io.worker.6
0   libsystem_kernel.dylib                 0x10250ca70 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x10260f9cc _pthread_cond_wait + 1216
2   Flutter                                0x10632d0c8 std::_fl::condition_variable::wait(std::_fl::unique_lock<std::_fl::mutex>&) + 24
3   Flutter                                0x1065e00f4 fml::ConcurrentMessageLoop::WorkerMain() + 128
4   Flutter                                0x1065e0814 void* std::_fl::__thread_proxy[abi:v15000]<std::_fl::tuple<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct>>, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>>(void*) + 184
5   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
6   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 13:: io.worker.7
0   libsystem_kernel.dylib                 0x10250ca70 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x10260f9cc _pthread_cond_wait + 1216
2   Flutter                                0x10632d0c8 std::_fl::condition_variable::wait(std::_fl::unique_lock<std::_fl::mutex>&) + 24
3   Flutter                                0x1065e00f4 fml::ConcurrentMessageLoop::WorkerMain() + 128
4   Flutter                                0x1065e0814 void* std::_fl::__thread_proxy[abi:v15000]<std::_fl::tuple<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct>>, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>>(void*) + 184
5   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
6   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 14:: io.worker.8
0   libsystem_kernel.dylib                 0x10250ca70 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x10260f9cc _pthread_cond_wait + 1216
2   Flutter                                0x10632d0c8 std::_fl::condition_variable::wait(std::_fl::unique_lock<std::_fl::mutex>&) + 24
3   Flutter                                0x1065e00f4 fml::ConcurrentMessageLoop::WorkerMain() + 128
4   Flutter                                0x1065e0814 void* std::_fl::__thread_proxy[abi:v15000]<std::_fl::tuple<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct>>, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>>(void*) + 184
5   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
6   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 15:: io.worker.9
0   libsystem_kernel.dylib                 0x10250ca70 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x10260f9cc _pthread_cond_wait + 1216
2   Flutter                                0x10632d0c8 std::_fl::condition_variable::wait(std::_fl::unique_lock<std::_fl::mutex>&) + 24
3   Flutter                                0x1065e00f4 fml::ConcurrentMessageLoop::WorkerMain() + 128
4   Flutter                                0x1065e0814 void* std::_fl::__thread_proxy[abi:v15000]<std::_fl::tuple<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct>>, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>>(void*) + 184
5   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
6   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 16:: io.worker.10
0   libsystem_kernel.dylib                 0x10250ca70 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x10260f9cc _pthread_cond_wait + 1216
2   Flutter                                0x10632d0c8 std::_fl::condition_variable::wait(std::_fl::unique_lock<std::_fl::mutex>&) + 24
3   Flutter                                0x1065e00f4 fml::ConcurrentMessageLoop::WorkerMain() + 128
4   Flutter                                0x1065e0814 void* std::_fl::__thread_proxy[abi:v15000]<std::_fl::tuple<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct>>, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>>(void*) + 184
5   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
6   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 17:: dart:io EventHandler
0   libsystem_kernel.dylib                 0x10250f0ec kevent + 8
1   Flutter                                0x1068afc2c dart::bin::EventHandlerImplementation::EventHandlerEntry(unsigned long) + 300
2   Flutter                                0x1068cc1a0 dart::bin::ThreadStart(void*) + 88
3   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
4   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 18:: Dart Profiler ThreadInterrupter
0   libsystem_kernel.dylib                 0x10250ca70 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x10260f9cc _pthread_cond_wait + 1216
2   Flutter                                0x106a107c0 dart::Monitor::WaitMicros(long long) + 152
3   Flutter                                0x106a7d664 dart::ThreadInterrupter::ThreadMain(unsigned long) + 324
4   Flutter                                0x106a0ff2c dart::ThreadStart(void*) + 204
5   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
6   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 19:: Dart Profiler SampleBlockProcessor
0   libsystem_kernel.dylib                 0x10250ca70 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x10260f9f8 _pthread_cond_wait + 1260
2   Flutter                                0x106a107a8 dart::Monitor::WaitMicros(long long) + 128
3   Flutter                                0x106a14ebc dart::SampleBlockProcessor::ThreadMain(unsigned long) + 284
4   Flutter                                0x106a0ff2c dart::ThreadStart(void*) + 204
5   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
6   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 20:: io.worker.1
0   libsystem_kernel.dylib                 0x10250ca70 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x10260f9cc _pthread_cond_wait + 1216
2   Flutter                                0x10632d0c8 std::_fl::condition_variable::wait(std::_fl::unique_lock<std::_fl::mutex>&) + 24
3   Flutter                                0x1065e00f4 fml::ConcurrentMessageLoop::WorkerMain() + 128
4   Flutter                                0x1065e0814 void* std::_fl::__thread_proxy[abi:v15000]<std::_fl::tuple<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct>>, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>>(void*) + 184
5   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
6   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 21:: io.worker.2
0   libsystem_kernel.dylib                 0x10250ca70 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x10260f9cc _pthread_cond_wait + 1216
2   Flutter                                0x10632d0c8 std::_fl::condition_variable::wait(std::_fl::unique_lock<std::_fl::mutex>&) + 24
3   Flutter                                0x1065e00f4 fml::ConcurrentMessageLoop::WorkerMain() + 128
4   Flutter                                0x1065e0814 void* std::_fl::__thread_proxy[abi:v15000]<std::_fl::tuple<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct>>, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>>(void*) + 184
5   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
6   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 22:: io.worker.3
0   libsystem_kernel.dylib                 0x10250ca70 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x10260f9cc _pthread_cond_wait + 1216
2   Flutter                                0x10632d0c8 std::_fl::condition_variable::wait(std::_fl::unique_lock<std::_fl::mutex>&) + 24
3   Flutter                                0x1065e00f4 fml::ConcurrentMessageLoop::WorkerMain() + 128
4   Flutter                                0x1065e0814 void* std::_fl::__thread_proxy[abi:v15000]<std::_fl::tuple<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct>>, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>>(void*) + 184
5   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
6   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 23:: io.worker.4
0   libsystem_kernel.dylib                 0x10250ca70 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x10260f9cc _pthread_cond_wait + 1216
2   Flutter                                0x10632d0c8 std::_fl::condition_variable::wait(std::_fl::unique_lock<std::_fl::mutex>&) + 24
3   Flutter                                0x1065e00f4 fml::ConcurrentMessageLoop::WorkerMain() + 128
4   Flutter                                0x1065e0814 void* std::_fl::__thread_proxy[abi:v15000]<std::_fl::tuple<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct>>, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>>(void*) + 184
5   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
6   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 24:: DartWorker
0   libsystem_kernel.dylib                 0x10250ca70 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x10260f9f8 _pthread_cond_wait + 1260
2   Flutter                                0x106a107a8 dart::Monitor::WaitMicros(long long) + 128
3   Flutter                                0x1069568f4 dart::MutatorThreadPool::OnEnterIdleLocked(dart::MonitorLocker*) + 140
4   Flutter                                0x106a7e0e8 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) + 136
5   Flutter                                0x106a7e3fc dart::ThreadPool::Worker::Main(unsigned long) + 116
6   Flutter                                0x106a0ff2c dart::ThreadStart(void*) + 204
7   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
8   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 25:: DartWorker
0   libsystem_kernel.dylib                 0x10250ca70 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x10260f9f8 _pthread_cond_wait + 1260
2   Flutter                                0x106a107a8 dart::Monitor::WaitMicros(long long) + 128
3   Flutter                                0x106a7e248 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) + 488
4   Flutter                                0x106a7e3fc dart::ThreadPool::Worker::Main(unsigned long) + 116
5   Flutter                                0x106a0ff2c dart::ThreadStart(void*) + 204
6   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
7   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 26:: DartWorker
0   libsystem_kernel.dylib                 0x10250ca70 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x10260f9f8 _pthread_cond_wait + 1260
2   Flutter                                0x106a107a8 dart::Monitor::WaitMicros(long long) + 128
3   Flutter                                0x106a7e248 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) + 488
4   Flutter                                0x106a7e3fc dart::ThreadPool::Worker::Main(unsigned long) + 116
5   Flutter                                0x106a0ff2c dart::ThreadStart(void*) + 204
6   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
7   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 27:: DartWorker
0   libsystem_kernel.dylib                 0x10250ca70 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x10260f9f8 _pthread_cond_wait + 1260
2   Flutter                                0x106a107a8 dart::Monitor::WaitMicros(long long) + 128
3   Flutter                                0x106a7e248 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) + 488
4   Flutter                                0x106a7e3fc dart::ThreadPool::Worker::Main(unsigned long) + 116
5   Flutter                                0x106a0ff2c dart::ThreadStart(void*) + 204
6   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
7   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 28:
0   libsystem_pthread.dylib                0x10260a5cc start_wqthread + 0

Thread 29:
0   libsystem_pthread.dylib                0x10260a5cc start_wqthread + 0

Thread 30:: DartWorker
0   libsystem_kernel.dylib                 0x10250ca70 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x10260f9f8 _pthread_cond_wait + 1260
2   Flutter                                0x106a107a8 dart::Monitor::WaitMicros(long long) + 128
3   Flutter                                0x106a7e248 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) + 488
4   Flutter                                0x106a7e3fc dart::ThreadPool::Worker::Main(unsigned long) + 116
5   Flutter                                0x106a0ff2c dart::ThreadStart(void*) + 204
6   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
7   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 31:: caulk::deferred_logger
0   libsystem_kernel.dylib                 0x1025094ec semaphore_wait_trap + 8
1   caulk                                  0x1b0453900 caulk::semaphore::timed_wait(double) + 208
2   caulk                                  0x1b045a94c caulk::concurrent::details::worker_thread::run() + 32
3   caulk                                  0x1b045a9c0 void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*>>>(void*) + 48
4   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
5   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 32:: caulk.messenger.shared:high
0   libsystem_kernel.dylib                 0x1025094ec semaphore_wait_trap + 8
1   caulk                                  0x1b0453900 caulk::semaphore::timed_wait(double) + 208
2   caulk                                  0x1b045a94c caulk::concurrent::details::worker_thread::run() + 32
3   caulk                                  0x1b045a9c0 void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*>>>(void*) + 48
4   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
5   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 33:: com.apple.audio.toolbox.AUScheduledParameterRefresher
0   libsystem_kernel.dylib                 0x1025094ec semaphore_wait_trap + 8
1   caulk                                  0x1b0453900 caulk::semaphore::timed_wait(double) + 208
2   caulk                                  0x1b045a94c caulk::concurrent::details::worker_thread::run() + 32
3   caulk                                  0x1b045a9c0 void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*>>>(void*) + 48
4   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
5   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 34:
0   libsystem_pthread.dylib                0x10260a5cc start_wqthread + 0

Thread 35:: com.apple.audio.IOThread.client
0   libsystem_kernel.dylib                 0x102509570 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x10251ab80 mach_msg2_internal + 76
2   libsystem_kernel.dylib                 0x102511798 mach_msg_overwrite + 532
3   libsystem_kernel.dylib                 0x1025098e8 mach_msg + 20
4   CoreAudio                              0x18220c3f0 HALC_ProxyIOContext::IOWorkLoop() + 5160
5   CoreAudio                              0x18220a8e0 invocation function for block in HALC_ProxyIOContext::HALC_ProxyIOContext(unsigned int, unsigned int) + 104
6   CoreAudio                              0x1822dd69c HALC_IOThread::Entry(void*) + 80
7   libsystem_pthread.dylib                0x10260f414 _pthread_start + 104
8   libsystem_pthread.dylib                0x10260a5e0 thread_start + 8

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x00000001802ab173   x5: 0x000000016dbad140   x6: 0x000000000000006e   x7: 0x0000000000000000
    x8: 0x00000001026fc240   x9: 0x977845d5b1c798aa  x10: 0x0000000000000200  x11: 0x000000016dbacc70
   x12: 0x0000000000000000  x13: 0x00000001802ab19b  x14: 0x0000000000000010  x15: 0x0000000084c3c802
   x16: 0x0000000000000148  x17: 0x0000000084e3c008  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x00000001026fc240  x21: 0x0000000000000103  x22: 0x00000001026fc320  x23: 0x0000000000000114
   x24: 0x000060000172f000  x25: 0x000060000172f000  x26: 0x0000000000000000  x27: 0x0000000000000000
   x28: 0x0000000000000000   fp: 0x000000016dbad0b0   lr: 0x000000010260f124
    sp: 0x000000016dbad090   pc: 0x00000001025113b0 cpsr: 0x40001000
   far: 0x0000000000000000  esr: 0x56000080  Address size fault

Larpoux commented 5 months ago

Thank you @vickychu for this very clear and complete issue. I will try to look to this, this afternoon

Larpoux commented 5 months ago

@vickychu You call startRecorder() during the execution of setSubscriptionDuration(). setSubscriptionDuration returns a Future . You can try to await the future completion of setSubscriptionDuration() before startRecorder().

Larpoux commented 5 months ago

@vickychu

Do you use startRecorder fromStream ? I have a major problem with streams on iOS that I haven't figured of.

I want to rewrite all the code about streams but this is a major work and I have not much time.

I am really found of streams on Flutter Sound. This is a really important feature that I want to run flowlessly.

In the mean time you can try to await the end of setSubscriptionDuration before startRecorder. There is a possibility that it will fix your crash.

vickychu commented 5 months ago

@Larpoux Yeah, I use startRecorder fromStream. Thanks for your suggestion. I have tried to put await on setSubscriptionDuration, but it didn't work.

await _mRecorder!.setSubscriptionDuration(_duration);
await _mRecorder!.startRecorder(
  toStream: recordingDataController.sink,
  codec: Codec.pcm16,
  numChannels: 1,
  sampleRate: 16000,
  bitRate: 16000,
);
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder.openRecorder (package:flutter_sound/public/flutter_sound_recorder.dart:370:13)
flutter: │ #1   AsrState.openRecorder (package:beta_ai_app/states/asr.dart:77:27)
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 FS:---> openAudioSession
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder._openAudioSession (package:flutter_sound/public/flutter_sound_recorder.dart:379:13)
flutter: │ #1   FlutterSoundRecorder.openRecorder.<anonymous closure> (package:flutter_sound/public/flutter_sound_recorder.dart:372:11)
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 ---> openAudioSession
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder._openAudioSession (package:flutter_sound/public/flutter_sound_recorder.dart:394:17)
flutter: │ #1   FlutterSoundRecorder.openRecorder.<anonymous closure> (package:flutter_sound/public/flutter_sound_recorder.dart:372:11)
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 Resetting flutter_sound Recorder Plugin
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder.openRecorder (package:flutter_sound/public/flutter_sound_recorder.dart:374:13)
flutter: │ #1   <asynchronous suspension>
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 FS:<--- openAudioSession
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder.openRecorderCompleted (package:flutter_sound/public/flutter_sound_recorder.dart:169:13)
flutter: │ #1   MethodChannelFlutterSoundRecorder.channelMethodCallHandler (package:flutter_sound_platform_interface/method_channel_flutter_sound_recorder.dart:94:22)
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 ---> openRecorderCompleted: true
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder.openRecorderCompleted (package:flutter_sound/public/flutter_sound_recorder.dart:180:13)
flutter: │ #1   MethodChannelFlutterSoundRecorder.channelMethodCallHandler (package:flutter_sound_platform_interface/method_channel_flutter_sound_recorder.dart:94:22)
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 <--- openRecorderCompleted: true
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder._openAudioSession (package:flutter_sound/public/flutter_sound_recorder.dart:410:13)
flutter: │ #1   <asynchronous suspension>
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 <--- openAudioSession
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
AddInstanceForFactory: No factory registered for id <CFUUID 0x6000002c8a40> F8BB1C28-BAE8-11D6-9C31-00039315CD46
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder.setSubscriptionDuration (package:flutter_sound/public/flutter_sound_recorder.dart:512:13)
flutter: │ #1   AsrState.record (package:beta_ai_app/states/asr.dart:119:25)
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 FS:---> setSubscriptionDuration
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder.setSubscriptionDuration (package:flutter_sound/public/flutter_sound_recorder.dart:519:13)
flutter: │ #1   <asynchronous suspension>
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 FS:<--- setSubscriptionDuration
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder.startRecorder (package:flutter_sound/public/flutter_sound_recorder.dart:588:13)
flutter: │ #1   AsrState.record (package:beta_ai_app/states/asr.dart:120:25)
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 FS:---> startRecorder
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   FlutterSoundRecorder._startRecorder (package:flutter_sound/public/flutter_sound_recorder.dart:616:13)
flutter: │ #1   FlutterSoundRecorder.startRecorder.<anonymous closure> (package:flutter_sound/public/flutter_sound_recorder.dart:590:13)
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 FS:---> _startRecorder.
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
           AURemoteIO.cpp:1162  failed: -10851 (enable 1, outf< 2 ch,      0 Hz, Float32, deinterleaved> inf< 2 ch,      0 Hz, Float32, deinterleaved>)
           AVAEInternal.h:76    required condition is false: [AVAEGraphNode.mm:832:CreateRecordingTap: (IsFormatSampleRateAndChannelCountValid(format))]
*** Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: IsFormatSampleRateAndChannelCountValid(format)'
*** First throw call stack:
(
    0   CoreFoundation                      0x00000001804ae138 __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x0000000180087db4 objc_exception_throw + 56
    2   CoreFoundation                      0x00000001804adfdc +[NSException raise:format:] + 0
    3   AVFAudio                            0x00000001c6393e70 _Z19AVAE_RaiseExceptionP8NSStringz + 48
    4   AVFAudio                            0x00000001c63eb7a4 _ZN17AUGraphNodeBaseV318CreateRecordingTapEmjP13AVAudioFormatU13block_pointerFvP16AVAudioPCMBufferP11AVAudioTimeE + 724
    5   AVFAudio                            0x00000001c645b8cc -[AVAudioNode installTapOnBus:bufferSize:format:block:] + 1344
    6   flutter_sound_core                  0x00000001010dfd10 _ZN19AudioRecorderEngineC2E7t_CODECP8NSStringP19NSMutableDictionarylbP14FlautoRecorder + 2084
    7   flutter_sound_core                  0x00000001010e060c _ZN19AudioRecorderEngineC1E7t_CODECP8NSStringP19NSMutableDictionarylbP14FlautoRecorder + 152
    8   flutter_sound_core                  0x00000001010de7d0 -[FlautoRecorder startRecorderCodec:toPath:channels:sampleRate:bitRate:bufferSize:enableVoiceProcessing:] + 996
    9   Runner                              0x0000000100a3427c -[FlutterSoundRecorder startRecorder:result:] + 1696
    10  Runner                              0x0000000100a3568c -[FlutterSoundRecorderManager handleMethodCall:result:] + 1136
    11  Flutter                             0x00000001056b5eec __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 164
    12  Flutter                             0x00000001050e8300 ___ZN7flutter25PlatformMessageHandlerIos21HandlePlatformMessageENSt3_fl10unique_ptrINS_15PlatformMessageENS1_14default_deleteIS3_EEEE_block_invoke + 108
    13  libdispatch.dylib                   0x000000010226bec4 _dispatch_call_block_and_release + 24
    14  libdispatch.dylib                   0x000000010226d73c _dispatch_client_callout + 16
    15  libdispatch.dylib                   0x000000010227d3f8 _dispatch_main_queue_drain + 1228
    16  libdispatch.dylib                   0x000000010227cf1c _dispatch_main_queue_callback_4CF + 40
    17  CoreFoundation                      0x000000018040e9a0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
    18  CoreFoundation                      0x00000001804090b8 __CFRunLoopRun + 1936
    19  CoreFoundation                      0x0000000180408514 CFRunLoopRunSpecific + 572
    20  GraphicsServices                    0x000000018ef06ae4 GSEventRunModal + 160
    21  UIKitCore                           0x00000001853e8040 -[UIApplication _run] + 868
    22  UIKitCore                           0x00000001853ebcc8 UIApplicationMain + 124
    23  Runner                              0x0000000100a2b18c main + 64
    24  dyld                                0x0000000101101544 start_sim + 20
    25  ???                                 0x0000000100af20e0 0x0 + 4306444512
    26  ???                                 0x5c40000000000000 0x0 + 6647313049998852096
)
libc++abi: terminating due to uncaught exception of type NSException

Still thanks for you suggestion. The real device is ok. I can still work with the real device.

bayasdev commented 5 months ago

I have the same problem when starting the recorder on iOS to a stream

Larpoux commented 5 months ago

There is actually a big problem on iOS when recording to Streams or when recording to Raw PCM. If you want Raw PCM, a turn around is to record to WAV and call Flutter Sound helper to remove the WAV envelop.

It used to work, but not anymore (regression). I have not found the reason of the problem. I have not much time to spend on Flutter Sound maintenance and someone else should try to debug that.

I am actually in the process of rewriting all the code about RAW PCM on iOS, but this is much work and do not expect to have this issue fixed soon. Sorry

jamesshen-svt commented 1 month ago

hi I found it could be due to the audio session, I encountered the same issue when using the recorder to write to a stream. I am able to fix it by activating an audio session like below:

import 'package:audio_session/audio_session.dart';
import 'package:permission_handler/permission_handler.dart';

// call this function during the recorder opening process
Future<void> openTheStreamRecorder() async {
  if (!kIsWeb) {
    var status = await Permission.microphone.request();
    if (status != PermissionStatus.granted) {
      logInfo(status);
      throw RecordingPermissionException('Microphone permission not granted');
    }
  }

  final session = await AudioSession.instance;
  await session.configure(AudioSessionConfiguration(
    avAudioSessionCategory: AVAudioSessionCategory.playAndRecord,
    avAudioSessionCategoryOptions:
    AVAudioSessionCategoryOptions.allowBluetooth |
    AVAudioSessionCategoryOptions.defaultToSpeaker | AVAudioSessionCategoryOptions.mixWithOthers,
    avAudioSessionMode: AVAudioSessionMode.spokenAudio,
    avAudioSessionRouteSharingPolicy:
    AVAudioSessionRouteSharingPolicy.defaultPolicy,
    avAudioSessionSetActiveOptions: AVAudioSessionSetActiveOptions.none,
    androidAudioAttributes: const AndroidAudioAttributes(
      contentType: AndroidAudioContentType.speech,
      flags: AndroidAudioFlags.none,
      usage: AndroidAudioUsage.voiceCommunication,
    ),
    androidAudioFocusGainType: AndroidAudioFocusGainType.gain,
    androidWillPauseWhenDucked: true,
  ));
  await session.setActive(true); // <--- very important this line, without set active, the crash still happened to me.
  await soundStreamRecorder!.openRecorder();
  // await soundStreamRecorder.setSubscriptionDuration(const Duration(milliseconds: 100));

  streamRecorderOpened = true;
}