I'v just got this error in my app.
2010-04-06 03:58:55.505 EasyPay DPS[6530:207] *** -[NTItems tableView]:
unrecognized selector sent to instance 0x397af90
2010-04-06 03:58:55.515 EasyPay DPS[6530:207] ***
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:
'*** -[NTItems tableView]: unrecognized selector sent to instance 0x397af90'
This error is extremely unuseful - where do I start in my code?
Here's the stack:
2010-04-06 03:58:55.522 EasyPay DPS[6530:207] Stack: (
29283419,
2541614345,
29665339,
29234806,
29087426,
14309,
3233602,
3226942,
3269216,
3265242,
3271699,
3252934,
3274087,
3252583,
12030,
3029574,
3012740,
266666,
29067968,
29064264,
37373461,
37373658,
2756527,
9456,
9310
)
#0 0x01c20004 in ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___ ()
#1 0x977df509 in objc_exception_throw ()
#2 0x01c4a83b in -[NSObject doesNotRecognizeSelector:] ()
#3 0x01be1676 in ___forwarding___ ()
#4 0x01bbd6c2 in __forwarding_prep_0___ ()
#5 0x00003809 in -[NTItems viewDidLoad] (self=0x3965490, _cmd=0x15ee1bc) at /Users/shamilnunhuck/Documents/EasyPay DPS/Classes/NTItems.m:38
#6 0x00315742 in -[UIViewController view] ()
#7 0x00313d3e in -[UIViewController contentScrollView] ()
#8 0x0031e260 in -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] ()
#9 0x0031d2da in -[UINavigationController _layoutViewController:] ()
#10 0x0031ec13 in -[UINavigationController _startTransition:fromViewController:toViewController:] ()
#11 0x0031a2c6 in -[UINavigationController _startDeferredTransitionIfNeeded] ()
#12 0x0031f567 in -[UINavigationController pushViewController:transition:forceImmediate:] ()
#13 0x0031a167 in -[UINavigationController pushViewController:animated:] ()
#14 0x00002f22 in -[RootViewController tableView:didSelectRowAtIndexPath:] (self=0x391f1d0, _cmd=0x15e67b4, tableView=0x4071c00, indexPath=0x3977540 at /Users/shamilnunhuck/Documents/EasyPay DPS/Classes/RootViewController.m:167
#15 0x002e3a46 in -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] ()
#16 0x002df884 in -[UITableView _userSelectRowAtIndexPath:] ()
#17 0x000411aa in __NSFireDelayedPerform ()
#18 0x01bb8ac0 in CFRunLoopRunSpecific ()
#19 0x01bb7c48 in CFRunLoopRunInMode ()
#20 0x023a4615 in GSEventRunModal ()
#21 0x023a46da in GSEventRun ()
#22 0x002a0faf in UIApplicationMain ()
#23 0x00002514 in main (argc=1, argv=0xbfffefb8) at /Users/shamilnunhuck/Documents/EasyPay DPS/main.m:14
Your problem is in viewDidLoad on line 38.
Double-check method names, receiver names, etc.
Try adding a tableView property or method to NTItems before calling it, or derive from UITableViewController so the method is defined for you.
Related
I'm getting a strange error with CAKeyframeAnimation, the strange part is the "SwiftDeferredNSArray doubleValue" why would I get that when dealing with an Key frame animation?
I get the following trace, with these errors:
-[_TtCs21_SwiftDeferredNSArray doubleValue]: unrecognized selector sent to instance 0x12b55e060
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_TtCs21_SwiftDeferredNSArray doubleValue]: unrecognized selector sent to instance 0x12b55e060'
#0 0x0000000182ec0d58 in -[NSObject(NSObject) doesNotRecognizeSelector:] ()
#1 0x0000000182ebddcc in ___forwarding___ ()
#2 0x0000000182dbcc6c in _CF_forwarding_prep_0 ()
#3 0x0000000185b86b24 in CAObject_setValueForKeyPath_ ()
#4 0x0000000185b5b9e0 in -[CALayer setValue:forKeyPath:] ()
#5 0x0000000185c6ebd8 in -[CAKeyframeAnimation applyForTime:presentationObject:modelObject:] ()
#6 0x0000000185b5aabc in CA::Layer::presentation_layer(CA::Transaction*) ()
#7 0x0000000187f68b6c in _UIViewEatsTouches ()
#8 0x0000000187f68830 in -[UIView(Geometry) hitTest:withEvent:] ()
#9 0x000000018823f300 in -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] ()
#10 0x0000000187f68e2c in __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke ()
#11 0x0000000182dab954 in __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke ()
#12 0x0000000182dab84c in -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] ()
#13 0x0000000187f68950 in -[UIView(Geometry) hitTest:withEvent:] ()
#14 0x000000018823f300 in -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] ()
#15 0x0000000187f68e2c in __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke ()
#16 0x0000000182dab954 in __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke ()
#17 0x0000000182dab84c in -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] ()
#18 0x0000000187f68950 in -[UIView(Geometry) hitTest:withEvent:] ()
#19 0x00000001881f4cc8 in _UIApplicationHandleDigitizerEvent ()
#20 0x0000000187f2aab8 in _UIApplicationHandleEventQueue ()
#21 0x0000000182e703a4 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
#22 0x0000000182e6fe38 in __CFRunLoopDoSources0 ()
#23 0x0000000182e6db38 in __CFRunLoopRun ()
#24 0x0000000182d98c60 in CFRunLoopRunSpecific ()
#25 0x000000018466c088 in GSEventRunModal ()
#26 0x0000000187f95fe4 in UIApplicationMain ()
#27 0x00000001001dd614 in main at /Users/MyApp/AppDelegate.swift:20
Additional code as requested:
override func didUpdateFocusInContext(context: UIFocusUpdateContext, withAnimationCoordinator coordinator: UIFocusAnimationCoordinator) {
self.opacityView.layer.removeAnimationForKey("a")
if (self.focused)
{
self.opacityView.layer.addAnimation(a1, forKey: "a")
}
}
// Animation a1
let ani = CAKeyframeAnimation(keyPath: "transform.scale")
ani.timingFunctions = [CAMediaTimingFunction(controlPoints: 0.06,0.756,0.223,1.0)]
ani.values = [[1.0,1.0,1.0],[1.0*scaleFactor,1.0*scaleFactor,1.0*scaleFactor]]
ani.duration = 0.267
ani.fillMode = kCAFillModeForwards
ani.removedOnCompletion = false
I know this is a bit late, but figured I'd give an answer anyways for other folks running into this error. As far as I can see, I'd guess that you're seeing this because ani.values should be an array of individual keyframe values, not an array of arrays. E.g.,
ani.values = [1.0, 1.0*scaleFactor]
Can anyone help in analysing this crash issue?
The program did receive memory warning when webview was opened.
2011-05-10 10:52:44.882 [17713:207] *** -[CALayer retain]: message sent to deallocated instance 0xd0ee720
(gdb) where
#0 0x017d7057 in ___forwarding___ ()
#1 0x017d6f22 in __forwarding_prep_0___ ()
#2 0x017780bc in CFRetain ()
#3 0x0185edb5 in +[__NSArrayI __new::] ()
#4 0x013328f6 in -[CALayerArray copyWithZone:] ()
#5 0x017c67ca in -[NSObject(NSObject) copy] ()
#6 0x007378d7 in -[UIView dealloc] ()
#7 0x007ac52a in -[UIViewController setView:] ()
#8 0x007aeeec in -[UIViewController unloadViewForced:] ()
#9 0x007aab0a in -[UIViewController unloadViewIfReloadable] ()
#10 0x007b6194 in -[UINavigationController purgeMemoryForReason:] ()
#11 0x007aa15b in -[UIViewController didReceiveMemoryWarning] ()
#12 0x004686c1 in _nsnote_callback ()
#13 0x0183df99 in __CFXNotificationPost_old ()
#14 0x017bd33a in _CFXNotificationPostNotification ()
#15 0x0045e266 in -[NSNotificationCenter postNotificationName:object:userInfo:] ()
#16 0x0046a5a9 in -[NSNotificationCenter postNotificationName:object:] ()
#17 0x00703108 in -[UIApplication _performMemoryWarning] ()
#18 0x0181724c in __CFNotificationCenterDarwinCallBack ()
#19 0x017a7872 in __CFMachPortPerform ()
#20 0x01847064 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#21 0x017a76f7 in __CFRunLoopDoSource1 ()
#22 0x017a4983 in __CFRunLoopRun ()
#23 0x017a4240 in CFRunLoopRunSpecific ()
#24 0x017a4161 in CFRunLoopRunInMode ()
#25 0x01daa268 in GSEventRunModal ()
#26 0x01daa32d in GSEventRun ()
#27 0x0070d42e in UIApplicationMain ()
#28 0x0000272e in main (argc=1, argv=0xbfffee7c)
You are trying to access a CALayer object that has already been released. Make sure you release the objects properly. Also ensure that [super dealloc]; is not called before other objects are released
There were already a couple of similar questions, but it wasn’t exactly the same as in my case. Just start a new view based project, add viewDidLoad and awakeFromNib with NSLog statements and do the following changes in MainWindow.xib:
Remove the view controller connection in the application delegate.
Connect UIWindow’s rootViewController delegate to the App View Controller instance.
The stack trace from the first call:
#0 0x000025c0 in -[foozaViewController viewDidLoad] at /Users/rafael/Downloads/fooza/fooza/foozaViewController.m:38
#1 0x000cd089 in -[UIViewController view] ()
#2 0x00040d42 in -[UIWindow addRootViewControllerViewIfPossible] ()
#3 0x0079d5e5 in -[NSObject(NSKeyValueCoding) setValue:forKey:] ()
#4 0x00050ff6 in -[UIView(CALayerDelegate) setValue:forKey:] ()
#5 0x0021930c in -[UIRuntimeOutletConnection connect] ()
#6 0x00d418cf in -[NSArray makeObjectsPerformSelector:] ()
#7 0x00217d23 in -[UINib instantiateWithOwner:options:] ()
#8 0x00219ab7 in -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] ()
#9 0x0001f17a in -[UIApplication _loadMainNibFile] ()
#10 0x0001fcf4 in -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] ()
#11 0x0002a617 in -[UIApplication handleEvent:withNewEvent:] ()
#12 0x00022abf in -[UIApplication sendEvent:] ()
#13 0x00027f2e in _UIApplicationHandleEvent ()
#14 0x01004992 in PurpleEventCallback ()
#15 0x00dac944 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#16 0x00d0ccf7 in __CFRunLoopDoSource1 ()
#17 0x00d09f83 in __CFRunLoopRun ()
#18 0x00d09840 in CFRunLoopRunSpecific ()
#19 0x00d09761 in CFRunLoopRunInMode ()
#20 0x0001f7d2 in -[UIApplication _run] ()
#21 0x0002bc93 in UIApplicationMain ()
#22 0x000020d9 in main ()
And here’s the trace from the second call:
#0 0x000025c0 in -[foozaViewController viewDidLoad] at /Users/rafael/Downloads/fooza/fooza/foozaViewController.m:38
#1 0x00002555 in -[foozaViewController awakeFromNib] ()
#2 0x00217f26 in -[UINib instantiateWithOwner:options:] ()
#3 0x00219ab7 in -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] ()
#4 0x0001f17a in -[UIApplication _loadMainNibFile] ()
#5 0x0001fcf4 in -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] ()
#6 0x0002a617 in -[UIApplication handleEvent:withNewEvent:] ()
#7 0x00022abf in -[UIApplication sendEvent:] ()
#8 0x00027f2e in _UIApplicationHandleEvent ()
#9 0x01004992 in PurpleEventCallback ()
#10 0x00dac944 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#11 0x00d0ccf7 in __CFRunLoopDoSource1 ()
#12 0x00d09f83 in __CFRunLoopRun ()
#13 0x00d09840 in CFRunLoopRunSpecific ()
#14 0x00d09761 in CFRunLoopRunInMode ()
#15 0x0001f7d2 in -[UIApplication _run] ()
#16 0x0002bc93 in UIApplicationMain ()
#17 0x000020d9 in main ()
Is this desired behavior or a bug? Should we still use the more traditional
way of connecting an outlet to the root view controller in the
application delegate to maintain a sane viewDidLoad/viewDidUnload ratio
or should we ignore Apple’s rules and do not call super in awakeFromNib and use the new rootViewController property of UIWindow?
It looks like a bug, because it’s only reproducible in Xcode 4. I will file a bug.
See also http://shurl.at/5u (Apple Developer Forums)
In my app that you can download here: http://ge.tt/2DDqfJa
I've started a discussion but is died here iOS TableView crash loading different data
The problem is when I back from viewing the YouTube video to the recipes list, the app crash...
And when i select a category for the second time, where have to load a tableview with different data source, it crash.
This is the crash log
Program received signal: “EXC_BAD_ACCESS”.
(gdb) bt
#0 0x00f0da63 in objc_msgSend ()
#1 0x04b27ca0 in ?? ()
#2 0x00002665 in -[RecipesListController viewWillAppear:] (self=0x4b38a00, _cmd=0x6d81a2, animated=1 '\001') at /Users/claudiocanino/Documents/iOS/CottoMangiato/Classes/RecipesListController.m:67
#3 0x00370c9a in -[UINavigationController _startTransition:fromViewController:toViewController:] ()
#4 0x0036b606 in -[UINavigationController _startDeferredTransitionIfNeeded] ()
#5 0x0037283e in -[UINavigationController pushViewController:transition:forceImmediate:] ()
#6 0x04f49549 in -[UINavigationControllerAccessibility(SafeCategory) pushViewController:transition:forceImmediate:] ()
#7 0x0036b4a0 in -[UINavigationController pushViewController:animated:] ()
#8 0x00003919 in -[CategoryViewController tableView:didSelectRowAtIndexPath:] (self=0x4b27ca0, _cmd=0x6d19e3, tableView=0x500c200, indexPath=0x4b2d650) at /Users/claudiocanino/Documents/iOS/CottoMangiato/Classes/CategoryViewCotroller.m:104
#9 0x0032a794 in -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] ()
#10 0x00320d50 in -[UITableView _userSelectRowAtPendingSelectionIndexPath:] ()
#11 0x000337f6 in __NSFireDelayedPerform ()
#12 0x00d8cfe3 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ ()
#13 0x00d8e594 in __CFRunLoopDoTimer ()
#14 0x00ceacc9 in __CFRunLoopRun ()
#15 0x00cea240 in CFRunLoopRunSpecific ()
#16 0x00cea161 in CFRunLoopRunInMode ()
#17 0x016e0268 in GSEventRunModal ()
#18 0x016e032d in GSEventRun ()
#19 0x002c342e in UIApplicationMain ()
#20 0x00001c08 in main (argc=1, argv=0xbfffef58) at /Users/claudiocanino/Documents/iOS/CottoMangiato/main.m:15
Another bt log:
(gdb) bt
#0 0x00cd76a1 in __CFBasicHashDeallocate ()
#1 0x00cc2bcb in _CFRelease ()
#2 0x00002dd6 in -[RecipesListController setRecipesArray:] (self=0x6834d50, _cmd=0x4293, _value=0x4e3bc70) at /Users/claudiocanino/Documents/iOS/CottoMangiato/Classes/RecipesListController.m:16
#3 0x00002665 in -[RecipesListController viewWillAppear:] (self=0x6834d50, _cmd=0x6d81a2, animated=1 '\001') at /Users/claudiocanino/Documents/iOS/CottoMangiato/Classes/RecipesListController.m:67
#4 0x00370c9a in -[UINavigationController _startTransition:fromViewController:toViewController:] ()
#5 0x0036b606 in -[UINavigationController _startDeferredTransitionIfNeeded] ()
#6 0x0037283e in -[UINavigationController pushViewController:transition:forceImmediate:] ()
#7 0x091ac549 in -[UINavigationControllerAccessibility(SafeCategory) pushViewController:transition:forceImmediate:] ()
#8 0x0036b4a0 in -[UINavigationController pushViewController:animated:] ()
#9 0x00003919 in -[CategoryViewController tableView:didSelectRowAtIndexPath:] (self=0x4b12970, _cmd=0x6d19e3, tableView=0x5014400, indexPath=0x4b2bd00) at /Users/claudiocanino/Documents/iOS/CottoMangiato/Classes/CategoryViewCotroller.m:104
#10 0x0032a794 in -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] ()
#11 0x00320d50 in -[UITableView _userSelectRowAtPendingSelectionIndexPath:] ()
#12 0x000337f6 in __NSFireDelayedPerform ()
#13 0x00d8cfe3 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ ()
#14 0x00d8e594 in __CFRunLoopDoTimer ()
#15 0x00ceacc9 in __CFRunLoopRun ()
#16 0x00cea240 in CFRunLoopRunSpecific ()
#17 0x00cea161 in CFRunLoopRunInMode ()
#18 0x016e0268 in GSEventRunModal ()
#19 0x016e032d in GSEventRun ()
#20 0x002c342e in UIApplicationMain ()
#21 0x00001c08 in main (argc=1, argv=0xbfffef58) at /Users/claudiocanino/Documents/iOS/CottoMangiato/main.m:15
Thanks
You have probably tried to access an object which has been released. Search for "NSZombieEnabled" and read up on how to debug over-release problems.
The problem is you are over-releasing objects. Since you're using retain-properties you haven't to release the object when assigning a new object to the property. The old object will be released automatically. So these lines make no sense, delete them:
if (self.recipesArray != nil) {
// Release the arrays
[self.recipesArray release];
[self.recipesNames release];
}
In cellForRowAtIndexPath (RecipesListController) you are releasing rowString. There's no need to do that here. Delete that line and everything should work properly.
NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:path];
self.recipesArray = dict;
[dict release];
in your RecipesListController.m file check 55 line in viewwill appear you are release the object that you never give memory
when i make comment to
//[self.recipesArray release];
//[self.recipesNames release];
then it crash on tableview row check it
I have a iPhone/iPad app (universal binary) with a regular UIWebView that displays webpages on the Internet. When the user presses on a Youtube embed, the iPhone app performs normally -- opening up the video player, when you close it, it returns to the app. However, on the iPad it crashes with
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UIWindow addEventMonitor:]: unrecognized selector sent to instance 0x1219c0'
#0 0x30c8e0a0 in __kill ()
#1 0x30c8e096 in kill ()
#2 0x30c8e088 in raise ()
#3 0x30ca2210 in abort ()
#4 0x32944a22 in __gnu_cxx::__verbose_terminate_handler ()
#5 0x335657ca in _objc_terminate ()
#6 0x32942df4 in __cxxabiv1::__terminate ()
#7 0x32942e48 in std::terminate ()
#8 0x32942f18 in __cxa_throw ()
#9 0x335646aa in objc_exception_throw ()
#10 0x32c9517a in -[NSObject doesNotRecognizeSelector:] ()
#11 0x32c94b00 in ___forwarding___ ()
#12 0x32c316d0 in __forwarding_prep_0___ ()
#13 0x32810492 in -[MPInactivityMonitor initForWindow:inactivityDuration:delegate:] ()
#14 0x32831dfe in -[MPFullScreenVideoViewController _createInactivityMonitor] ()
#15 0x328324bc in -[MPFullScreenVideoViewController showOverlayAnimated:] ()
#16 0x32833612 in -[MPAbstractFullScreenVideoViewController setControlsOverlayVisible:animate:] ()
#17 0x3281fca4 in -[UIMoviePlayerController setControlsOverlayVisible:disableAutohide:animate:] ()
#18 0x330bb444 in -[YTMovieView _switchToVideo:] ()
#19 0x330bb028 in -[YTMovieView willShowForVideo:inList:orVideoID:] ()
#20 0x04b8d142 in dyld_stub_time ()
#21 0x04b8b82e in dyld_stub_time ()
#22 0x32c2616c in -[NSObject performSelector:withObject:withObject:] ()
#23 0x3152716c in -[UIApplication sendAction:to:from:forEvent:] ()
#24 0x3152710c in -[UIApplication sendAction:toTarget:fromSender:forEvent:] ()
#25 0x315270de in -[UIControl sendAction:to:forEvent:] ()
#26 0x31526e30 in -[UIControl(Internal) _sendActionsForEvents:withEvent:] ()
#27 0x3152747e in -[UIControl touchesEnded:withEvent:] ()
#28 0x31525e54 in -[UIWindow _sendTouchesForEvent:] ()
#29 0x3152579c in -[UIWindow sendEvent:] ()
#30 0x315213be in -[UIApplication sendEvent:] ()
#31 0x31520d2a in _UIApplicationHandleEvent ()
#32 0x30d62b32 in PurpleEventCallback ()
#33 0x32c23d9c in CFRunLoopRunSpecific ()
#34 0x32c234e0 in CFRunLoopRunInMode ()
#35 0x30d620da in GSEventRunModal ()
#36 0x30d62186 in GSEventRun ()
#37 0x314d54c8 in -[UIApplication _run] ()
#38 0x314d39f2 in UIApplicationMain ()
(I don't even see my app in the stack trace (except for the top level main.m)
In iPad Mobile Safari, on the same webpage, the video will play in-place on the webpage. Is there anything I have to do to enable that? Or did I forget to enable something?
As i understand this problem appers only on the universal binaries, that compiled under iPhone OS 3.1.3 and less. And not only youtube videos, but also for all kinds of media files loaded into the UIWebView.
As a solution you may override UIWindow and add some dummy methods.
#interface MyWindow : UIWindow {
}
#end
#implementation MyWindow {
- (void)addEventMonitor:(void *)monitor {}
- (void)pendingMouseUpCount {}
}