Crash in background for iOS 17.3.0 and later devices

We found crash reports from Xcode organizer about some crashes happening only in iOS and iPadOS version 17.3.0 and later across all our releases mostly in background state related to Network SDK.

Unfortunately, we are unable to reproduce the issue. On the crashed thread, it seems to refer to process from Network SDK but we never import and use it directly in our project.

Most of the functions found in the main thread in the crash report can't be accessed from the project, it seems to be internal framework calls in iOS SDK. The crash pointing to this line of code: nw_protocol_error

Bug number: FB13661192

Somehow I cannot attach any crash report here, it always return error This post contains sensitive language. Please revise it in order to continue. whenever I try to submit it. If I remove it, I can submit the post.

Answered by DTS Engineer in 781424022

I rechecked again just now and it seems to start since 17.2.0.

Thanks for clarifying.

Earlier you wrote:

On the crashed thread, it seems to refer to process from Network SDK but we never import and use it directly in our project.

Right. Network framework is our low-level networking API. It’s used by URLSession, so most apps have a strong, albeit indirect, dependency on it.

Looking at your bug the story is… well… complex. You are not the only app seeing a crash like this. There are lots of other apps, and system components, seeing it as well. And there’s some evidence that it arrived in iOS 17.2, although there I see similar issues from older systems.

There are a number of fixes associated with this bug, some in 17.3 and some in 17.4. I thought that the 17.3 fixes might’ve helped here, but it seems that you’re seeing it on 17.3 as well.

Anyway, I don’t think there’s much you can do about this, other than to file a bug (which you’ve already done). Also, please monitor your crash reports to see if any start coming in from 17.4.

ps While it’s probably unrelated to this, one of your crashes has this:

0   vvvvv     … fb_swizzledMethod_2 + 0 (FBSDKSwizzler.m:89)
1   UIKitCore … -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1716 (UIView.m:17516)

which doesn’t inspire me wth confidence )-: Swizzling on classes you don’t own, like UIView, is not the path to long-term binary compatibility.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Somehow I cannot attach any crash report here

I’ve seen a number of reports about that recently. I’d appreciate you posting the details to this thread.

Bug number: FB13661192

Thanks for that. I was able to get a crash report from that. You uploaded a number of crash reports, and so I picked the first one. The weird thing is this:

OS Version:          iPhone OS 17.2.1 (21C66)

That doesn’t gel with your comment:

some crashes happening only in iOS and iPadOS version 17.3.0

Can you double check the range of OS releases where you’re seeing this crash?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I’ve seen a number of reports about that recently. I’d appreciate you posting the details to this thread.

Noted, I'll post the details later there.

Can you double check the range of OS releases where you’re seeing this crash?

Ah, that was a miss on my side, my apologies. I rechecked again just now and it seems to start since 17.2.0.

Accepted Answer

I rechecked again just now and it seems to start since 17.2.0.

Thanks for clarifying.

Earlier you wrote:

On the crashed thread, it seems to refer to process from Network SDK but we never import and use it directly in our project.

Right. Network framework is our low-level networking API. It’s used by URLSession, so most apps have a strong, albeit indirect, dependency on it.

Looking at your bug the story is… well… complex. You are not the only app seeing a crash like this. There are lots of other apps, and system components, seeing it as well. And there’s some evidence that it arrived in iOS 17.2, although there I see similar issues from older systems.

There are a number of fixes associated with this bug, some in 17.3 and some in 17.4. I thought that the 17.3 fixes might’ve helped here, but it seems that you’re seeing it on 17.3 as well.

Anyway, I don’t think there’s much you can do about this, other than to file a bug (which you’ve already done). Also, please monitor your crash reports to see if any start coming in from 17.4.

ps While it’s probably unrelated to this, one of your crashes has this:

0   vvvvv     … fb_swizzledMethod_2 + 0 (FBSDKSwizzler.m:89)
1   UIKitCore … -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1716 (UIView.m:17516)

which doesn’t inspire me wth confidence )-: Swizzling on classes you don’t own, like UIView, is not the path to long-term binary compatibility.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Anyway, I don’t think there’s much you can do about this, other than to file a bug (which you’ve already done). Also, please monitor your crash reports to see if any start coming in from 17.4.

Noted, thanks for the explanation. I just checked again and there was 1 incident happening in iOS 17.4 on 24th February 2024. So in other words, I can only wait for the fix in upcoming iOS versions ya.

Swizzling on classes you don’t own, like UIView, is not the path to long-term binary compatibility.

Thanks for the advice. It seems that the code comes from 3rd party SDK that we used. Will try to review with the team again regarding this.

Crash in background for iOS 17.3.0 and later devices
 
 
Q