Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash -[__NSArrayI doubleValue]: unrecognized selector sent... #77

Open
kcorey opened this issue Apr 23, 2016 · 2 comments
Open

crash -[__NSArrayI doubleValue]: unrecognized selector sent... #77

kcorey opened this issue Apr 23, 2016 · 2 comments

Comments

@kcorey
Copy link

kcorey commented Apr 23, 2016

Hi All,

I have two awesome menus side by side. They are providing selection services for two image widgets, and allow the user to select from camera or gallery for each image.

When I tap slowly or fast on a single Awesomemenu, it works fine.
When I wait for the animation on the first Awesome menu to complete, and then tap on the second, it's fine.
When I tap on the first menu, and then immediately tap on the second while the animation is going, I get a crash as shown below.

I'm a bit mystified...as far as I can tell, my code isn't really being touched here. I've tried returning during touches if the animation is still running...but...well...it doesn't seem to be touching my guards...just dying before I can trap it.

Any ideas?

-Ken


2016-04-23 16:08:55.476 CrowdLab[62630:48536049] -[**NSArrayI doubleValue]: unrecognized selector sent to instance 0x7ff04850d5d0
2016-04-23 16:09:04.303 CrowdLab[62630:48536049] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI doubleValue]: unrecognized selector sent to instance 0x7ff04850d5d0'
* First throw call stack:
(
0 CoreFoundation 0x000000010dcdbd85 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010d2e5deb objc_exception_throw + 48
2 CoreFoundation 0x000000010dce4d3d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x000000010dc2acfa __forwarding
+ 970
4 CoreFoundation 0x000000010dc2a8a8 _CF_forwarding_prep_0 + 120
5 QuartzCore 0x000000010b562b13 -[NSNumber(CAAnimatableValue) CA_interpolateValue:byFraction:] + 54
6 QuartzCore 0x000000010b55eed1 -[CABasicAnimation applyForTime:presentationObject:modelObject:] + 686
7 QuartzCore 0x000000010b562723 -[CAAnimationGroup applyForTime:presentationObject:modelObject:] + 195
8 QuartzCore 0x000000010b57cd4c _ZN2CA5Layer18presentation_layerEPNS_11TransactionE + 408
9 UIKit 0x000000010b8b7fb5 _UIViewEatsTouches + 107
10 UIKit 0x000000010b8b81c5 -[UIView(Geometry) hitTest:withEvent:] + 150
11 UIKit 0x000000010b8b86ff -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 85
12 UIKit 0x000000010b8b85c3 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 181
13 CoreFoundation 0x000000010dc03d32 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 114
14 CoreFoundation 0x000000010dc034af -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 335
15 UIKit 0x000000010b8b831d -[UIView(Geometry) hitTest:withEvent:] + 494
16 UIKit 0x000000010b8b86ff -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 85
17 UIKit 0x000000010b8b85c3 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 181
18 CoreFoundation 0x000000010dc03d32 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 114
19 CoreFoundation 0x000000010dc034af -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 335
20 UIKit 0x000000010b8b831d -[UIView(Geometry) hitTest:withEvent:] + 494
21 UIKit 0x000000010b8b86ff -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 85
22 UIKit 0x000000010b8b85c3 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 181
23 CoreFoundation 0x000000010dc03d32 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 114
24 CoreFoundation 0x000000010dc034af -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 335
25 UIKit 0x000000010b8b831d -[UIView(Geometry) hitTest:withEvent:] + 494
26 UIKit 0x000000010b8b86ff -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 85
27 UIKit 0x000000010b8b85c3 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 181
28 CoreFoundation 0x000000010dc03d32 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 114
29 CoreFoundation 0x000000010dc034af -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 335
30 UIKit 0x000000010b8b831d -[UIView(Geometry) hitTest:withEvent:] + 494
31 UIKit 0x000000010b8b86ff -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 85
32 UIKit 0x000000010b8b85c3 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 181
33 CoreFoundation 0x000000010dc03d32 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 114
34 CoreFoundation 0x000000010dc034af -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 335
35 UIKit 0x000000010b8b831d -[UIView(Geometry) hitTest:withEvent:] + 494
36 UIKit 0x000000010b8b86ff -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 85
37 UIKit 0x000000010b8b85c3 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 181
38 CoreFoundation 0x000000010dc03d32 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 114
39 CoreFoundation 0x000000010dc034af -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 335
40 UIKit 0x000000010b8b831d -[UIView(Geometry) hitTest:withEvent:] + 494
41 UIKit 0x000000010b97f436 -[UITransitionView hitTest:withEvent:] + 47
42 UIKit 0x000000010b8b86ff -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 85
43 UIKit 0x000000010b8b85c3 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 181
44 CoreFoundation 0x000000010dc03d32 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 114
45 CoreFoundation 0x000000010dc034af -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 335
46 UIKit 0x000000010b8b831d -[UIView(Geometry) hitTest:withEvent:] + 494
47 UIKit 0x000000010b8b86ff -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 85
48 UIKit 0x000000010b89b11f __70+[UIWindow _hitTestToPoint:forEvent:windowServerHitTestWindow:screen:]_block_invoke + 247
49 UIKit 0x000000010b89ae9d +[UIWindow _topVisibleWindowPassingTest:] + 206
50 UIKit 0x000000010b89afde +[UIWindow _hitTestToPoint:forEvent:windowServerHitTestWindow:screen:] + 211
51 UIKit 0x000000010b89b337 -[UIWindow _targetWindowForPathIndex:atPoint:forEvent:windowServerHitTestWindow:onScreen:] + 200
52 UIKit 0x000000010b844d27 _UIApplicationHandleDigitizerEvent + 12802
53 UIKit 0x000000010b80edd9 _UIApplicationHandleEventQueue + 4746
54 CoreFoundation 0x000000010dc01301 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
55 CoreFoundation 0x000000010dbf722c __CFRunLoopDoSources0 + 556
56 CoreFoundation 0x000000010dbf66e3 __CFRunLoopRun + 867
57 CoreFoundation 0x000000010dbf60f8 CFRunLoopRunSpecific + 488
58 GraphicsServices 0x000000010f882ad2 GSEventRunModal + 161
59 UIKit 0x000000010b814f09 UIApplicationMain + 171
60 CrowdLab 0x0000000108e9baaf main + 111
61 libdyld.dylib 0x000000010e1d092d start + 1

@kcorey
Copy link
Author

kcorey commented Apr 23, 2016

Just for giggles, after a little bit of reading, I tried putting this at the top of AwesomeMenu.m:

@interface CAAnimationGroup (Antihit)

     - (UIView*)hitTest:(CGPoint)point withEvent:(UIEvent *)event;
 @end

@implementation CAAnimationGroup (Antihit)

- (UIView*)hitTest:(CGPoint)point withEvent:(UIEvent *)event; {

    return nil;
}
@end

Predictably, it didn't work as the hitTest seems to be a method on UIView(Geometry). Any other ideas?

@singleD
Copy link

singleD commented Oct 17, 2019

Hi All,

I have two awesome menus side by side. They are providing selection services for two image widgets, and allow the user to select from camera or gallery for each image.

When I tap slowly or fast on a single Awesomemenu, it works fine.
When I wait for the animation on the first Awesome menu to complete, and then tap on the second, it's fine.
When I tap on the first menu, and then immediately tap on the second while the animation is going, I get a crash as shown below.

I'm a bit mystified...as far as I can tell, my code isn't really being touched here. I've tried returning during touches if the animation is still running...but...well...it doesn't seem to be touching my guards...just dying before I can trap it.

Any ideas?

-Ken

2016-04-23 16:08:55.476 CrowdLab[62630:48536049] -[NSArrayI doubleValue]: unrecognized selector sent to instance 0x7ff04850d5d0
2016-04-23 16:09:04.303 CrowdLab[62630:48536049] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI doubleValue]: unrecognized selector sent to instance 0x7ff04850d5d0'
*** First throw call stack: ( 0 CoreFoundation 0x000000010dcdbd85 __exceptionPreprocess + 165 1 libobjc.A.dylib 0x000000010d2e5deb objc_exception_throw + 48 2 CoreFoundation 0x000000010dce4d3d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205 3 CoreFoundation 0x000000010dc2acfa __forwarding
+ 970
4 CoreFoundation 0x000000010dc2a8a8 _CF_forwarding_prep_0 + 120
5 QuartzCore 0x000000010b562b13 -[NSNumber(CAAnimatableValue) CA_interpolateValue:byFraction:] + 54
6 QuartzCore 0x000000010b55eed1 -[CABasicAnimation applyForTime:presentationObject:modelObject:] + 686
7 QuartzCore 0x000000010b562723 -[CAAnimationGroup applyForTime:presentationObject:modelObject:] + 195
8 QuartzCore 0x000000010b57cd4c _ZN2CA5Layer18presentation_layerEPNS_11TransactionE + 408
9 UIKit 0x000000010b8b7fb5 _UIViewEatsTouches + 107
10 UIKit 0x000000010b8b81c5 -[UIView(Geometry) hitTest:withEvent:] + 150
11 UIKit 0x000000010b8b86ff -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 85
12 UIKit 0x000000010b8b85c3 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 181
13 CoreFoundation 0x000000010dc03d32 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 114
14 CoreFoundation 0x000000010dc034af -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 335
15 UIKit 0x000000010b8b831d -[UIView(Geometry) hitTest:withEvent:] + 494
16 UIKit 0x000000010b8b86ff -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 85
17 UIKit 0x000000010b8b85c3 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 181
18 CoreFoundation 0x000000010dc03d32 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 114
19 CoreFoundation 0x000000010dc034af -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 335
20 UIKit 0x000000010b8b831d -[UIView(Geometry) hitTest:withEvent:] + 494
21 UIKit 0x000000010b8b86ff -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 85
22 UIKit 0x000000010b8b85c3 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 181
23 CoreFoundation 0x000000010dc03d32 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 114
24 CoreFoundation 0x000000010dc034af -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 335
25 UIKit 0x000000010b8b831d -[UIView(Geometry) hitTest:withEvent:] + 494
26 UIKit 0x000000010b8b86ff -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 85
27 UIKit 0x000000010b8b85c3 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 181
28 CoreFoundation 0x000000010dc03d32 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 114
29 CoreFoundation 0x000000010dc034af -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 335
30 UIKit 0x000000010b8b831d -[UIView(Geometry) hitTest:withEvent:] + 494
31 UIKit 0x000000010b8b86ff -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 85
32 UIKit 0x000000010b8b85c3 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 181
33 CoreFoundation 0x000000010dc03d32 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 114
34 CoreFoundation 0x000000010dc034af -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 335
35 UIKit 0x000000010b8b831d -[UIView(Geometry) hitTest:withEvent:] + 494
36 UIKit 0x000000010b8b86ff -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 85
37 UIKit 0x000000010b8b85c3 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 181
38 CoreFoundation 0x000000010dc03d32 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 114
39 CoreFoundation 0x000000010dc034af -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 335
40 UIKit 0x000000010b8b831d -[UIView(Geometry) hitTest:withEvent:] + 494
41 UIKit 0x000000010b97f436 -[UITransitionView hitTest:withEvent:] + 47
42 UIKit 0x000000010b8b86ff -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 85
43 UIKit 0x000000010b8b85c3 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 181
44 CoreFoundation 0x000000010dc03d32 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 114
45 CoreFoundation 0x000000010dc034af -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 335
46 UIKit 0x000000010b8b831d -[UIView(Geometry) hitTest:withEvent:] + 494
47 UIKit 0x000000010b8b86ff -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 85
48 UIKit 0x000000010b89b11f __70+[UIWindow _hitTestToPoint:forEvent:windowServerHitTestWindow:screen:]_block_invoke + 247
49 UIKit 0x000000010b89ae9d +[UIWindow _topVisibleWindowPassingTest:] + 206
50 UIKit 0x000000010b89afde +[UIWindow _hitTestToPoint:forEvent:windowServerHitTestWindow:screen:] + 211
51 UIKit 0x000000010b89b337 -[UIWindow _targetWindowForPathIndex:atPoint:forEvent:windowServerHitTestWindow:onScreen:] + 200
52 UIKit 0x000000010b844d27 _UIApplicationHandleDigitizerEvent + 12802
53 UIKit 0x000000010b80edd9 _UIApplicationHandleEventQueue + 4746
54 CoreFoundation 0x000000010dc01301 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
55 CoreFoundation 0x000000010dbf722c __CFRunLoopDoSources0 + 556
56 CoreFoundation 0x000000010dbf66e3 __CFRunLoopRun + 867
57 CoreFoundation 0x000000010dbf60f8 CFRunLoopRunSpecific + 488
58 GraphicsServices 0x000000010f882ad2 GSEventRunModal + 161
59 UIKit 0x000000010b814f09 UIApplicationMain + 171
60 CrowdLab 0x0000000108e9baaf main + 111
61 libdyld.dylib 0x000000010e1d092d start + 1

try to change the
animation.fromValue = [value1, value2]
to
animation.toValue = NSValue(...)
for example:
animation.fromValue = [0, 0] //keyPath: "position" may cause crash sometimes
so I change to animation.fromValue = NSValue(cgPoint: CGPoint(x: 0, y: 0))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants