Afnetworking: AFURLSessionManager af_resume infinite recursive call

Created on 19 Jun 2015  路  7Comments  路  Source: AFNetworking/AFNetworking

I use AFNetworking 2.5.3

in AFURLSessionManager , I do not know why you recursive call af_resume method. From your code

  • (void)af_resume {
    NSURLSessionTaskState state = self.state;
    [self af_resume];

if (state != NSURLSessionTaskStateRunning) {
[[NSNotificationCenter defaultCenter] postNotificationName:AFNSURLSessionTaskDidResumeNotification object:self];
}
}

it will infinite recursive call af_resume.

And in my app, some people crashed by this problem.

image

hope you can fix it.

duplicate

Most helpful comment

screen shot 2016-10-05 at 6 28 07 pm
Same crash on iOS 10

All 7 comments

I'm seeing the same crashes in 2.5.4 on iOS 8 only.

I'm really stumped on this one.

This has also been reported in https://github.com/AFNetworking/AFNetworking/issues/2743. Can you let me know what other third party libraries are included in your app? We have unit tests that specifically test and confirm the swizzling is properly setup for AF, but it appears some outside library is also creating a problem.

Can you add your information to #2743?

I am getting the same issue after OneSky integration. Is there any solution to resolve this conflict with third party library?

Same problem on 2.6.3 in ios9 above

screen shot 2016-10-05 at 6 28 07 pm
Same crash on iOS 10

same problem when using Dynatrace integrated in the app. Did anyone find the fix to this crash?

Now we use Swift

Was this page helpful?
0 / 5 - 0 ratings