Canardoux / flutter_sound

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

[BUG]: Start recorder crashes on iOS 17.2 simulator #1007

Closed jtdLab closed 6 months ago

jtdLab commented 9 months ago

On latest flutter_sound on Simulator using iOS 17.2 start recorder crashes with

*** Terminating app due to uncaught exception 'Invalid Audio Session state', reason: 'The Audio Session is not in a correct state to do Recording.'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007ff80049b761 __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x00007ff800063904 objc_exception_throw + 48
    2   CoreFoundation                      0x00007ff80049b63f -[NSException initWithCoder:] + 0
    3   flutter_sound_core                  0x000000010c66c581 _ZN19AudioRecorderEngineC2E7t_CODECP8NSStringP19NSMutableDictionaryP14FlautoRecorder + 385
    4   flutter_sound_core                  0x000000010c66bcce -[FlautoRecorder startRecorderCodec:toPath:channels:sampleRate:bitRate:] + 476
    5   Runner                              0x0000000109d8eb53 -[FlutterSoundRecorder startRecorder:result:] + 705
    6   Runner                              0x0000000109d8f725 -[FlutterSoundRecorderManager handleMethodCall:result:] + 718
    7   Flutter                             0x00000001122182eb __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 168
    8   Flutter                             0x0000000111bce472 ___ZN7flutter25PlatformMessageHandlerIos21HandlePlatformMessageENSt21_LIBCPP_ABI_NAMESPACE10unique_ptrINS_15PlatformMessageENS1_14default_deleteIS3_EEEE_block_invoke + 94
    9   libdispatch.dylib                   0x000000010cb5a747 _dispatch_call_block_and_release + 12
    10  libdispatch.dylib                   0x000000010cb5b9f7 _dispatch_client_callout + 8
    11  libdispatch.dylib                   0x000000010cb6b856 _dispatch_main_queue_drain + 1362
    12  libdispatch.dylib                   0x000000010cb6b2f6 _dispatch_main_queue_callback_4CF + 31
    13  CoreFoundation                      0x00007ff8003f7dc4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    14  CoreFoundation                      0x00007ff8003f26ff __CFRunLoopRun + 2463
    15  CoreFoundation                      0x00007ff8003f197d CFRunLoopRunSpecific + 557
    16  GraphicsServices                    0x00007ff80fe9d08f GSEventRunModal + 137
    17  UIKitCore                           0x00007ff805bbb53d -[UIApplication _run] + 972
    18  UIKitCore                           0x00007ff805bbffab UIApplicationMain + 123
    19  Runner                              0x00000001099c411f main + 63
    20  dyld                                0x000000010aa5e3e0 start_sim + 10
    21  ???                                 0x000000010e992386 0x0 + 4539884422
)
libc++abi: terminating due to uncaught exception of type NSException

Might be related to #517

github-actions[bot] commented 8 months ago

This issue is stale because it has been open 365 days with no activity. Leave a comment or this will be closed in 7 days.

vickychu commented 6 months ago

I've met the same issue, is there any solutions?

Larpoux commented 6 months ago

Hello @vickychu Please open a new issue. This one is not clear. Thank you.