[SKStoreProductViewController sceneDisconnected:] crash on iOS 15.7

Hello.

We are experiencing come crashes on iOS 15.7 (both beta and release version). Our crashes are spiking with the release of iOS 15.7.

This issue happened before on iOS 15.6 beta but on 15.6 release it was fixed.

Here is the stack trace:

NSInvalidArgumentException ___CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__

NSInvalidArgumentException: -[SKStoreProductViewController sceneDisconnected:]: unrecognized selector sent to instance 0x10bb15e00

0  CoreFoundation     ___exceptionPreprocess
1  libobjc.A.dylib    _objc_exception_throw
2  CoreFoundation     -[NSObject(NSObject) doesNotRecognizeSelector:]
3  UIKitCore          -[UIResponder doesNotRecognizeSelector:]
4  CoreFoundation     ____forwarding___
5  CoreFoundation     ___forwarding_prep_0___
6  CoreFoundation     ___CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__
7  CoreFoundation     ____CFXRegistrationPost_block_invoke
8  CoreFoundation     __CFXRegistrationPost
9  CoreFoundation     __CFXNotificationPost
10 Foundation         -[NSNotificationCenter postNotificationName:object:userInfo:]
11 UIKitCore          -[UIScene _invalidate]
12 UIKitCore          -[UIWindowScene _invalidate]
13 UIKitCore          -[UIApplication workspace:willDestroyScene:withTransitionContext:completion:]
14 UIKitCore          -[UIApplicationSceneClientAgent scene:willInvalidateWithEvent:completion:]
15 FrontBoardServices -[FBSScene _callOutQueue_agent_willDestroyWithTransitionContext:completion:]
16 FrontBoardServices ___84-[FBSWorkspaceScenesClient _queue_invalidateScene:withTransitionContext:completion:]_block_invoke_2
17 FrontBoardServices -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:]
18 FrontBoardServices ___84-[FBSWorkspaceScenesClient _queue_invalidateScene:withTransitionContext:completion:]_block_invoke
19 libdispatch.dylib  __dispatch_client_callout
20 libdispatch.dylib  __dispatch_block_invoke_direct$VARIANT$mp
21 FrontBoardServices __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__
22 FrontBoardServices -[FBSSerialQueue _targetQueue_performNextIfPossible]
23 FrontBoardServices -[FBSSerialQueue _performNextFromRunLoopSource]
24 CoreFoundation     ___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
25 CoreFoundation     ___CFRunLoopDoSource0
26 CoreFoundation     ___CFRunLoopDoSources0
27 CoreFoundation     ___CFRunLoopRun
28 CoreFoundation     _CFRunLoopRunSpecific
29 GraphicsServices   _GSEventRunModal
30 UIKitCore          -[UIApplication _run]
31 UIKitCore          _UIApplicationMain
32 XXXXXXXXXXX        main (main.m:8:22)
33 dyld               start

Regards!

Answered by Frameworks Engineer in 729646022

Thanks everyone for reporting an increased number of crash reports for an unrecognized selector in [SKStoreProductViewController sceneDisconnected:] or [SKStoreProductViewController appWillTerminate].

This crash happens in the public release of iOS/iPadOS 15.7, and seed releases of iOS/iPadOS 16 prior to seed 4 [1]. It does not occur in the public release of iOS 16.

The crash primarily happens when the app is in the background and is about to be terminated by the operating system. As a result, these crashes are not expected to be visible to the majority of end users. (One exception is on iPad with an app that supports multiple scenes, and a user manually terminates a scene.)

Your analytics will show an increased in crash rate, however your customers should not be affected by this issue. 

We are actively working to address the crash.

[1] In which case you should update to the most recent release.

Hi! We are having the same problem in our applications. Hoping Apple will address that in 15.7.* patch release.

It looks like it has been fixed again in iOS version 15.7.3. So far we haven't had any crashes reported with this new version.

[SKStoreProductViewController sceneDisconnected:] crash on iOS 15.7
 
 
Q