7 Replies
      Latest reply on Feb 10, 2020 7:21 PM by last one
      AndrewExploreFun Level 1 Level 1 (0 points)

        Hi everyone,

         

        Anyone else seeing crashes like this:

         

        Fatal Exception: NSInvalidArgumentException. -[_UISnapshotWindow actualSceneBounds]: unrecognized selector sent to instance

         

        Seems to be happening in low memory situations.

         

        Any easy fix? Our app isn't using a huge amount of RAM.

         

        Thanks

        • Re: [_UISnapshotWindow actualSceneBounds]: unrecognized selector
          AppsByC Level 1 Level 1 (0 points)

          We've also just started seeing this crash in our app in the last week... the app seems to crash within a few seconds of starting up and usually after being backgrounded/foregrounded. Both crashes were on iPhone X devices running 12.0.1 or 12.1. Haven't been able to reproduce and there isn't a lot of references to the UISnapshotWindow class but probably related to the device capturing a screen shot of the app state when going into the background (if I had to guess).

           

          The crash is being captured by BuddyBuild crash reporting but not the AppStore crash reporting.

           

          Application Specific Information:

          *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_UISnapshotWindow actualSceneBounds]: unrecognized selector sent to instance 0x11650f380'

           

          Last Exception Backtrace:

          0   CoreFoundation                      0x000000019fc27ef8 <redacted> + 228

          1   libobjc.A.dylib                     0x000000019edf5a40 objc_exception_throw + 56

          2   CoreFoundation                      0x000000019fb3f154 <redacted> + 0

          3   UIKitCore                           0x00000001cca865c0 <redacted> + 280

          4   CoreFoundation                      0x000000019fc2d810 <redacted> + 1412

          5   CoreFoundation                      0x000000019fc2f4bc _CF_forwarding_prep_0 + 92

          6   UIKitCore                           0x00000001cc857d2c <redacted> + 620

          7   UIKitCore                           0x00000001cc85a108 <redacted> + 5736

          8   UIKitCore                           0x00000001cc86662c <redacted> + 52

          9   UIKitCore                           0x00000001cc85df80 <redacted> + 656

          10  UIKitCore                           0x00000001cc8665ec <redacted> + 80

          11  UIKitCore                           0x00000001cc85d8fc <redacted> + 56

          12  UIKitCore                           0x00000001cc8d9548 <redacted> + 144

          13  UIKitCore                           0x00000001cc8f5030 <redacted> + 280

          14  UIKitCore                           0x00000001cc8d93f4 <redacted> + 140

          15  UIKitCore                           0x00000001cc8d9b0c <redacted> + 168

          16  UIKitCore                           0x00000001cc8e7b98 <redacted> + 552

          17  CoreFoundation                      0x000000019fb94d14 <redacted> + 20

          18  CoreFoundation                      0x000000019fb94ce0 <redacted> + 64

          19  CoreFoundation                      0x000000019fb941d0 <redacted> + 392

          20  CoreFoundation                      0x000000019fb93e7c <redacted> + 96

          21  CoreFoundation                      0x000000019fb0c1c0 <redacted> + 1404

          22  CoreFoundation                      0x000000019fb93908 _CFXNotificationPost + 696

          23  Foundation                          0x00000001a05a2eb0 <redacted> + 68

          24  UIKitCore                           0x00000001cca71904 <redacted> + 232

          25  UIKitCore                           0x00000001cc2f8684 <redacted> + 2180

          26  UIKitCore                           0x00000001cc2f6334 <redacted> + 772

          27  UIKitCore                           0x00000001cc2f5fe0 <redacted> + 432

          28  UIKitCore                           0x00000001cc2fb1a0 <redacted> + 220

          29  UIKitCore                           0x00000001cc2fc100 _performActionsWithDelayForTransitionContext + 112

          30  UIKitCore                           0x00000001cc2fb058 <redacted> + 248

          31  UIKitCore                           0x00000001cc2ffd9c <redacted> + 368

          32  UIKitCore                           0x00000001cc641118 <redacted> + 468

          33  FrontBoardServices                  0x00000001a26585a0 <redacted> + 228

          34  libdispatch.dylib                   0x000000019f660484 <redacted> + 16

          35  libdispatch.dylib                   0x000000019f6373f0 <redacted> + 216

          36  FrontBoardServices                  0x00000001a2696640 <redacted> + 40

          37  FrontBoardServices                  0x00000001a26962cc <redacted> + 416

          38  FrontBoardServices                  0x00000001a26968e8 <redacted> + 56

          39  CoreFoundation                      0x000000019fbb65b8 <redacted> + 24

          40  CoreFoundation                      0x000000019fbb6538 <redacted> + 88

          41  CoreFoundation                      0x000000019fbb5e1c <redacted> + 176

          42  CoreFoundation                      0x000000019fbb0ce8 <redacted> + 1040

          43  CoreFoundation                      0x000000019fbb05b8 CFRunLoopRunSpecific + 436

          44  GraphicsServices                    0x00000001a1e24584 GSEventRunModal + 100

          45  UIKitCore                           0x00000001cca58bc8 UIApplicationMain + 212

          46  <OUR_APP>                     0x000000010044e0f0 _mh_execute_header + 24816

          47  libdyld.dylib                       0x000000019f670b94 <redacted> + 4

          • Re: [_UISnapshotWindow actualSceneBounds]: unrecognized selector
            tankista Level 1 Level 1 (0 points)

            I am seeing exactly this issue on all iOS 12 devices, 100% when in background. I use state preservation/restoration. I even filed this as a bug here https://bugreport.apple.com/web/?problemID=49255115

             

            Fatal Exception: NSInvalidArgumentException

            -[_UISnapshotWindow actualSceneBounds]: unrecognized selector sent to instance

             

            Fatal Exception: NSInvalidArgumentException

            0  CoreFoundation                 0x1a9200ec4 __exceptionPreprocess

            1  libobjc.A.dylib                0x1a83d1a40 objc_exception_throw

            2  CoreFoundation                 0x1a9119c24 -[NSOrderedSet initWithSet:copyItems:]

            3  UIKitCore                      0x1d6544558 -[UIResponder doesNotRecognizeSelector:]

            4  CoreFoundation                 0x1a92067dc ___forwarding___

            5  CoreFoundation                 0x1a920848c _CF_forwarding_prep_0

            6  UIKitCore                      0x1d6317310 -[UIInputWindowController _aligningInsetsForChildInputViewController:includeSceneBounds:]

            7  UIKitCore                      0x1d6317d60 -[UIInputWindowController updateConstraintInsets]

            8  UIKitCore                      0x1d631ab34 -[UIInputWindowController hostAppSceneBoundsChanged]

            9  UIKitCore                      0x1d67f6068 -[UITextEffectsWindow _updateTransformLayer]

            10 UIKitCore                      0x1d67f6830 -[UITextEffectsWindow _willSnapshot]

            11 UIKitCore                      0x1d652324c -[UIApplication _beginSnapshotSessionForScene:withSnapshotBlock:]

            12 UIKitCore                      0x1d6524398 -[UIApplication _saveSnapshotWithName:]

            13 UIKitCore                      0x1d652f9ec __125-[UIApplication _updateStateRestorationArchiveForBackgroundEvent:saveState:exitIfCouldNotRestoreState:updateSnapshot:canvas:]_block_invoke.3034

            14 libdispatch.dylib              0x1a8c396c8 _dispatch_call_block_and_release

            15 libdispatch.dylib              0x1a8c3a484 _dispatch_client_callout

            16 libdispatch.dylib              0x1a8c19b34 _dispatch_main_queue_callback_4CF$VARIANT$armv81

            17 CoreFoundation                 0x1a9190df4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__

            18 CoreFoundation                 0x1a918bcbc __CFRunLoopRun

            19 CoreFoundation                 0x1a918b1f0 CFRunLoopRunSpecific

            20 GraphicsServices               0x1ab404584 GSEventRunModal

            21 UIKitCore                      0x1d6516d40 UIApplicationMain

            22 Trak                           0x100a938f8 main (main.m:16)

            23 libdyld.dylib                  0x1a8c4abb4 start

            • Re: [_UISnapshotWindow actualSceneBounds]: unrecognized selector
              nhuanvuduc Level 1 Level 1 (0 points)
              Issue still happended on iOS 13.1.3
              LAST EXCEPTION BACKTRACE
              CoreFoundation__exceptionPreprocess
              libobjc.A.dylibobjc_exception_throw
              CoreFoundation-[NSObject(NSObject) doesNotRecognizeSelector:]
              UIKitCore-[UIResponder doesNotRecognizeSelector:]
              CoreFoundation___forwarding___
              CoreFoundation_CF_forwarding_prep_0
              UIKitCore-[UIInputWindowControllerHostingItem _aligningInsetsForChildInputViewController:includeSceneBounds:]
              UIKitCore-[UIInputWindowControllerHostingItem updateViewConstraints]
              UIKitCore-[UIInputWindowControllerHosting updateViewConstraints]
              UIKitCore-[UIInputWindowController updateViewConstraints]
              UIKitCore-[UIInputWindowController setInputViewSet:]
              UIKitCore-[UIInputWindowController performOperations:withAnimationStyle:]
              UIKitCore-[UIInputResponderController setKeyWindowSceneInputViews:animationStyle:]
              UIKitCore-[UIInputResponderController setInputViews:animationStyle:]
              UIKitCore-[UIInputResponderController setInputViews:animated:]
              UIKitCore-[UIInputResponderController setInputViews:]
              UIKitCore-[UIInputResponderController _reloadInputViewsForKeyWindowSceneResponder:]
              UIKitCore-[UIInputResponderController _reloadInputViewsForResponder:]
              UIKitCore-[UIResponder(UIResponderInputViewAdditions) reloadInputViews]
              UIKitCore-[UIResponder becomeFirstResponder]
              UIKitCore-[UIResponder resignFirstResponder]
              UIKitCore-[UITextView resignFirstResponder]
              UIKitCore-[UIView(Hierarchy) _willMoveToWindow:]
              UIKitCore-[UIScrollView _willMoveToWindow:]
              UIKitCore_makeSubTreePerformSelector
              UIKitCore_makeSubTreePerformSelector
              UIKitCore_makeSubTreePerformSelector
              UIKitCore_makeSubTreePerformSelector
              UIKitCore__UIViewWillBeRemovedFromSuperview
              UIKitCore-[UIView(Hierarchy) removeFromSuperview]
              UIKitCore___moveViewToTemporaryWindow_block_invoke.206
              UIKitCore_performAfterCommitUnderCoverAllowDefer
              UIKitCore_UISnapshotViewRectAfterCommit
              UIKitCore-[UIView resizableSnapshotViewFromRect:afterScreenUpdates:withCapInsets:]
              UIKitCore+[UIKBViewTreeSnapshotter snapshotterForKeyboardView:afterScreenUpdates:]
              UIKitCore-[UIInputViewAnimationControllerViewControllerContext initWithHost:startPlacement:endPlacement:transitionContext:]
              UIKitCore+[UIInputViewAnimationControllerViewControllerContext contextWithHost:startPlacement:endPlacement:transitionContext:]
              UIKitCore-[UIInputViewAnimationControllerViewController prepareAnimationWithHost:startPlacement:endPlacement:]
              UIKitCore-[UIInputWindowController moveFromPlacement:toPlacement:starting:completion:]
              UIKitCore-[_UIRemoteKeyboards ignoreLayoutNotifications:]
              UIKitCore-[UIInputWindowController moveFromPlacement:toPlacement:starting:completion:]
              UIKitCore-[UIInputWindowController setInputViewSet:]
              UIKitCore-[UIInputWindowController performOperations:withAnimationStyle:]
              UIKitCore-[UIInputResponderController setKeyWindowSceneInputViews:animationStyle:]
              UIKitCore-[UIInputResponderController setInputViews:animationStyle:]
              UIKitCore-[UIInputResponderController setInputViews:animated:]
              UIKitCore-[UIInputResponderController setInputViews:]
              UIKitCore-[UIInputResponderController _reloadInputViewsForKeyWindowSceneResponder:]
              UIKitCore-[UIInputResponderController _reloadInputViewsForResponder:]
              UIKitCore-[UIResponder(UIResponderInputViewAdditions) reloadInputViews]
              UIKitCore-[UITextView becomeFirstResponder]
              PegasusDriverclosure #1 () -> () in Core.ChatViewController.viewDidLoad() -> () ChatViewController.swift:36
              PegasusDriverreabstraction thunk helper from @escaping @callee_guaranteed () -> () to @escaping @callee_unowned @convention(block) () -> () :0
              libdispatch.dylib_dispatch_client_callout
              libdispatch.dylib_dispatch_continuation_pop$VARIANT$armv81
              libdispatch.dylib_dispatch_source_invoke$VARIANT$armv81
              libdispatch.dylib_dispatch_main_queue_callback_4CF$VARIANT$armv81
              CoreFoundation__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
              CoreFoundation__CFRunLoopRun
              CoreFoundationCFRunLoopRunSpecific
              GraphicsServicesGSEventRunModal
              UIKitCoreUIApplicationMain
              PegasusDrivermain AppDelegate.swift:13
              libdyld.dylibstart
              
              
                • Re: [_UISnapshotWindow actualSceneBounds]: unrecognized selector
                  AlertSenseGeek Level 1 Level 1 (0 points)

                  Since iOS 13 I've seen a large number of app crashes with the error:

                   

                  Crash, -[_UISnapshotWindow actualSceneBounds]: unrecognized selector sent to instance 0x10ea79be0

                   

                  I wonder if it's the OS taking a snapshot of the app in it's last state for use in the App Switcher.

                   

                   

                  CoreFoundation

                  __exceptionPreprocess (CoreFoundation)

                  libobjc.A.dylib

                  objc_exception_throw (libobjc.A.dylib)

                  CoreFoundation

                  -[NSObject(NSObject) doesNotRecognizeSelector:] (CoreFoundation)

                  UIKitCore

                  -[UIResponder doesNotRecognizeSelector:] (UIKitCore)

                  CoreFoundation

                  ___forwarding___ (CoreFoundation)

                  CoreFoundation

                  _CF_forwarding_prep_0 (CoreFoundation)

                  UIKitCore

                  -[UIUndoGestureInteraction didMoveToView:] (UIKitCore)

                  UIKitCore

                  _setInteractionView (UIKitCore)

                  UIKitCore

                  -[UIView(Dragging) addInteraction:] (UIKitCore)

                  UIKitCore

                  -[UIEditingOverlayViewController _addInteractions] (UIKitCore)

                  UIKitCore

                  -[UIViewController _setViewAppearState:isAnimating:] (UIKitCore)

                  UIKitCore

                  __52-[UIViewController _setViewAppearState:isAnimating:]_block_invoke (UIKitCore)

                  CoreFoundation

                  __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ (CoreFoundation)

                  CoreFoundation

                  -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] (CoreFoundation)

                  UIKitCore

                  -[UIViewController _setViewAppearState:isAnimating:] (UIKitCore)

                  UIKitCore

                  __64-[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:]_block_invoke (UIKitCore)

                  UIKitCore

                  -[UIViewController _executeAfterAppearanceBlock] (UIKitCore)

                  UIKitCore

                  _runAfterCACommitDeferredBlocks (UIKitCore)

                  UIKitCore

                  _cleanUpAfterCAFlushAndRunDeferredBlocks (UIKitCore)

                  UIKitCore

                  _afterCACommitHandler (UIKitCore)

                  CoreFoundation

                  __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ (CoreFoundation)

                  CoreFoundation

                  __CFRunLoopDoObservers (CoreFoundation)

                  CoreFoundation

                  __CFRunLoopRun (CoreFoundation)

                  CoreFoundation

                  CFRunLoopRunSpecific (CoreFoundation)

                  GraphicsServices

                  GSEventRunModal (GraphicsServices)

                  UIKitCore

                  UIApplicationMain (UIKitCore)

                  AlertSense

                   

                  AppDelegate.swift line 31 in main (AppDelegate.swift:31)

                   

                  libdyld.dylib

                  start (libdyld.dylib)

                • Re: [_UISnapshotWindow actualSceneBounds]: unrecognized selector
                  last one Level 1 Level 1 (0 points)

                  We've got the same crash and it is hard to replicated. It happened on ios 12.4.0 device with low memory available.
                  Any update here?

                  Crash: Fatal Exception: NSInvalidArgumentException -[_UISnapshotWindow actualSceneBounds]: unrecognized selector sent to instance 0x135e99f80


                  Stack Trace:

                  Fatal Exception: NSInvalidArgumentException
                  0  CoreFoundation                 0x1f7d7a98c __exceptionPreprocess
                  1  libobjc.A.dylib                0x1f6f539f8 objc_exception_throw
                  2  CoreFoundation                 0x1f7c971c8 -[NSOrderedSet initWithSet:copyItems:]
                  3  UIKitCore                      0x2247fd220 -[UIResponder doesNotRecognizeSelector:]
                  4  CoreFoundation                 0x1f7d801d4 ___forwarding___
                  5  CoreFoundation                 0x1f7d81e6c _CF_forwarding_prep_0
                  6  UIKitCore                      0x2245dde88 -[UIInputWindowController _aligningInsetsForChildInputViewController:includeSceneBounds:]
                  7  UIKitCore                      0x2245e01c4 -[UIInputWindowController updateViewConstraints]
                  8  UIKitCore                      0x2245e2c2c -[UIInputWindowController updateForKeyplaneChangeWithContext:]
                  9  UIKitCore                      0x2246730f0 -[_UIRemoteKeyboards performOnControllers:]
                  10 UIKitCore                      0x2245db7e0 -[UIInputSetHostView _didChangeKeyplaneWithContext:]
                  11 UIKitCore                      0x2244f4100 -[_UIKBCompatInputView _didChangeKeyplaneWithContext:]
                  12 UIKitCore                      0x2245f2254 -[UIKeyboard _didChangeKeyplaneWithContext:]
                  13 UIKitCore                      0x22460eb24 -[UIKeyboardImpl didMoveToSuperview]
                  14 UIKitCore                      0x224c540a0 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke
                  15 Foundation                     0x1f86f59f4 -[NSISEngine withBehaviors:performModifications:]
                  16 UIKitCore                      0x224c53ca8 -[UIView(Hierarchy) _postMovedFromSuperview:]
                  17 UIKitCore                      0x224c630f8 -[UIView(Internal) _addSubview:positioned:relativeTo:]
                  18 UIKitCore                      0x2245efe08 -[UIKeyboard activate]
                  19 UIKitCore                      0x224666990 -[UIKeyboardAutomatic activate]
                  20 UIKitCore                      0x2245ef1dc -[UIKeyboard setFrame:]
                  21 UIKitCore                      0x2245f2234 -[UIKeyboard _didChangeKeyplaneWithContext:]
                  22 UIKitCore                      0x224666508 -[UIKeyboardAutomatic willResume:]
                  23 CoreFoundation                 0x1f7ceba28 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__
                  24 CoreFoundation                 0x1f7ceb9f4 ___CFXRegistrationPost_block_invoke
                  25 CoreFoundation                 0x1f7ceaee8 _CFXRegistrationPost
                  26 CoreFoundation                 0x1f7ceab94 ___CFXNotificationPost_block_invoke
                  27 CoreFoundation                 0x1f7c64474 -[_CFXNotificationRegistrar find:object:observer:enumerator:]
                  28 CoreFoundation                 0x1f7cea644 _CFXNotificationPost
                  29 Foundation                     0x1f86d36f4 -[NSNotificationCenter postNotificationName:object:userInfo:]
                  30 UIKitCore                      0x2247e8f80 -[UIApplication _sendWillEnterForegroundCallbacks]
                  31 UIKitCore                      0x224093be4 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:]
                  32 UIKitCore                      0x224091b64 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke
                  33 UIKitCore                      0x22409182c -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]
                  34 UIKitCore                      0x22409636c __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke
                  35 UIKitCore                      0x224097150 _performActionsWithDelayForTransitionContext
                  36 UIKitCore                      0x224096224 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]
                  37 UIKitCore                      0x22409af24 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:]
                  38 UIKitCore                      0x2243cb2b0 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:]
                  39 FrontBoardServices             0x1fa6f75d8 __80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke_3
                  40 libdispatch.dylib              0x1f77b97d4 _dispatch_client_callout
                  41 libdispatch.dylib              0x1f77911ec _dispatch_block_invoke_direct$VARIANT$armv81
                  42 FrontBoardServices             0x1fa731040 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__
                  43 FrontBoardServices             0x1fa730cdc -[FBSSerialQueue _performNext]
                  44 FrontBoardServices             0x1fa731294 -[FBSSerialQueue _performNextFromRunLoopSource]
                  45 CoreFoundation                 0x1f7d0c728 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
                  46 CoreFoundation                 0x1f7d0c6a8 __CFRunLoopDoSource0
                  47 CoreFoundation                 0x1f7d0bf90 __CFRunLoopDoSources0
                  48 CoreFoundation                 0x1f7d06ecc __CFRunLoopRun
                  49 CoreFoundation                 0x1f7d067c0 CFRunLoopRunSpecific
                  50 GraphicsServices               0x1f9f0779c GSEventRunModal
                  51 UIKitCore                      0x2247d1c38 UIApplicationMain
                  52 OjO                            0x102afbf64 main + 21 (MappableObject.swift:21)
                  53 libdyld.dylib                  0x1f77ca8e0 start