2 Replies
      Latest reply on Apr 15, 2019 4:40 PM by tankista
      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