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 on iOS #53

Open
Wackymax opened this issue Feb 7, 2022 · 4 comments
Open

Crash on iOS #53

Wackymax opened this issue Feb 7, 2022 · 4 comments

Comments

@Wackymax
Copy link

Wackymax commented Feb 7, 2022

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.

image

@ryanheise
Copy link
Owner

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.

@Wackymax
Copy link
Author

Hi, I haven't seen this issue pop up again so I think we can close it

@CyrilHu
Copy link

CyrilHu commented Nov 26, 2022

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

@ryanheise ryanheise reopened this Nov 26, 2022
@ryanheise
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants