Crash on iOS
Hi,
My app occasionally crashes on iOS and I am not entirely sure how to go about resolving it. I've narrowed it down to this library causing the crash but I am not entirely sure of why that would happen. Here is that trace from XCode.
I'm also not an expert with the Xcode debugger, so I sometimes insert NSLog statements into the code for debugging purposes. You can find various other NSLog statements already in the code to see what they look like, or putting a try catch around the code in the routeChange method.
- (void) routeChange:(NSNotification*)notification {
NSNumber *routeChangeReasonType = (NSNumber*)[notification.userInfo valueForKey:AVAudioSessionRouteChangeReasonKey];
//NSLog(@"routeChange detected");
[self invokeMethod:@"onRouteChange" arguments:@[@([routeChangeReasonType integerValue])]];
}
If this callback usually succeeds and sometimes fails, have you narrowed down the circumstances of the crash, suggesting what state things might be in? Maybe it is when the app is being closed, or one of your FlutterEngines is being destroyed? Otherwise if you would like me to take a look, you'll need to create a minimal reproduction project and share it.
Hi, I haven't seen this issue pop up again so I think we can close it
I also encountered this problem, the call stack is exactly the same. audio_session 0.1.10 flutter 3.0.5 iOS 16.1.1
I have reopened. @CyrilHu if you are willing to either provide a minimal reproduction project or would be willing to help participating in the debugging, I will be able to investigate it.