DetoxSync icon indicating copy to clipboard operation
DetoxSync copied to clipboard

[NSNull __detox_sync_untrackAnimation]: unrecognized selector sent to instance

Open Kudo opened this issue 2 years ago • 4 comments

hi there!

we came across a crash issue from detox and in the call https://github.com/wix/DetoxSync/blob/962b297bf77f4c98decac40a2daa7b90394abe54/DetoxSync/DetoxSync/Spies/CAAnimation%2BDTXSpy.m#L30

this function is called after [UIViewPropertyAnimator stopAnimation:] but ios passing NSNull as the (CAAnimation *)anim parameter. does it make sense to check if the anim is NSNull like this?

the crash stacktrace is like this:

{
  messageId: -10000,
  params: {
    exceptionName: 'NSInvalidArgumentException',
    errorDetails: 'Exception was thrown: \n' +
      'NSInvalidArgumentException\n' +
      '-[NSNull __detox_sync_untrackAnimation]: unrecognized selector sent to instance 0x119d45fb0\n' +
      '(\n' +
      '\t0   CoreFoundation                      0x0000000119a54ba4 __exceptionPreprocess + 226\n' +
      '\t1   libobjc.A.dylib                     0x0000000110ad5be7 objc_exception_throw + 48\n' +
      '\t2   CoreFoundation                      0x0000000119a63821 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0\n' +
      '\t3   CoreFoundation                      0x0000000119a590bc ___forwarding___ + 1433\n' +
      '\t4   CoreFoundation                      0x0000000119a5b1e8 _CF_forwarding_prep_0 + 120\n' +
      '\t5   DetoxSync                           0x00000001446f9d75 -[_DTXCAAnimationDelegateHelper __detox_sync_animationDidStop:finished:] + 101\n' +
      '\t6   UIKitCore                           0x0000000132da183d __63-[UIViewPropertyAnimator finalizeStoppedAnimationWithPosition:]_block_invoke.978 + 493\n' +
      '\t7   UIKitCore                           0x0000000132da15b4 -[UIViewPropertyAnimator finalizeStoppedAnimationWithPosition:] + 847\n' +
      '\t8   UIKitCore                           0x0000000132d9b949 -[UIViewPropertyAnimator _runCompletions:finished:] + 37\n' +
      '\t9   BareExpoDetox                       0x00000001023fcef0 EXBlur.BlurEffectView.__deallocating_deinit + 160\n' +
      '\t10  BareExpoDetox                       0x00000001023fcf38 @objc EXBlur.BlurEffectView.__deallocating_deinit + 24\n' +
      '\t11  UIKitCore                           0x0000000132d4aeb9 __destroy_helper_block_e8_32s40s48s56s64s72s80s + 59\n' +
      '\t12  libsystem_blocks.dylib              0x0000000112b51434 _Block_release + 130\n' +
      '\t13  libsystem_blocks.dylib              0x0000000112b51434 _Block_release + 130\n' +
      '\t14  CoreFoundation                      0x000000011995335b __RELEASE_OBJECTS_IN_THE_ARRAY__ + 115\n' +
      '\t15  CoreFoundation                      0x00000001199532a1 -[__NSArrayM dealloc] + 275\n' +
      '\t16  libobjc.A.dylib                     0x0000000110ad39f7 objc_object::sidetable_release(bool, bool) + 177\n' +
      '\t17  UIKitCore                           0x0000000132d9b6d7 -[UIViewPropertyAnimator _clearAnimationState] + 358\n' +
      '\t18  UIKitCore                           0x0000000132d9a68b __61-[UIViewPropertyAnimator _setupAssociatedViewAnimationState:]_block_invoke + 168\n' +
      '\t19  UIKitCore                           0x0000000133f6758a -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 779\n' +
      '\t20  UIKitCore                           0x0000000133f37f81 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 231\n' +
      '\t21  UIKitCore                           0x0000000133f38526 -[UIViewAnimationState animationDidStop:finished:] + 263\n' +
      '\t22  UIKit                               0x0000000153569e2f -[UIViewAnimationStateAccessibility animationDidStop:finished:] + 195\n' +
      '\t23  DetoxSync                           0x00000001446f9d64 -[_DTXCAAnimationDelegateHelper __detox_sync_animationDidStop:finished:] + 84\n' +
      '\t24  QuartzCore                          0x00000001128cd9b2 CA::Layer::run_animation_callbacks(void*) + 308\n' +
      '\t25  libdispatch.dylib                   0x0000000118bd1c0c _dispatch_client_callout + 8\n' +
      '\t26  libdispatch.dylib                   0x0000000118be0376 _dispatch_main_queue_callback_4CF + 1195\n' +
      '\t27  CoreFoundation                      0x00000001199c285d __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9\n' +
      '\t28  CoreFoundation                      0x00000001199bd0ba __CFRunLoopRun + 2772\n' +
      '\t29  CoreFoundation                      0x00000001199bc103 CFRunLoopRunSpecific + 567\n' +
      '\t30  GraphicsServices                    0x000000011ccfacd3 GSEventRunModal + 139\n' +
      '\t31  UIKitCore                           0x00000001339b2e63 -[UIApplication _run] + 928\n' +
      '\t32  DetoxSync                           0x00000001446fc235 __detox_sync_UIApplication_run + 517\n' +
      '\t33  UIKitCore                           0x00000001339b7a53 UIApplicationMain + 101\n' +
      '\t34  BareExpoDetox                       0x00000001023414af main + 63\n' +
      '\t35  dyld                                0x000000010ffbfe1e start_sim + 10\n' +
      '\t36  ???                                 0x0000000207b9c4fe 0x0 + 8719549694\n' +
      '\t37  ???                                 0x0000000207b97000 0x0 + 8719527936\n' +
      '\t38  BareExpoDetox                       0x000000010233b000 __dso_handle + 0\n' +
      ')',
    queueName: 'com.apple.main-thread',
    exceptionReason: '-[NSNull __detox_sync_untrackAnimation]: unrecognized selector sent to instance 0x119d45fb0',
    threadNumber: 1
  },
  type: 'AppWillTerminateWithError'
}

Kudo avatar Dec 03 '21 10:12 Kudo