Re: doesNotRecognizeSelector exception
Re: doesNotRecognizeSelector exception
- Subject: Re: doesNotRecognizeSelector exception
- From: Jeffrey Walton <email@hidden>
- Date: Sat, 26 Mar 2011 22:21:01 -0400
On Sat, Mar 26, 2011 at 9:56 PM, Kyle Sluder <email@hidden> wrote:
> On Sat, Mar 26, 2011 at 6:39 PM, Jeffrey Walton <email@hidden> wrote:
>> // FilePicker.m - try both
>> BOOL responds = [delegate respondsToSelector:@selector(userSelectedFile:)];
>> BOOL responds = [delegate
>> respondsToSelector:@selector(userSelectedFile:fileSystemObject:suppliedContext:)];
>
> You need to provide context for this code, and you need to post the
> entire exception and stack trace. Are you sure you're even messaging a
> FilePickerDelegate?
I believe so, since MyViewController is declared as a
FilePickerDelegate. When MyViewController instance creates a picker,
it does so as follows:
// MyViewController.m. MyViewController is a FilePickerDelegate.
- (void) changeSrcFileTapped:(id)sender
{
FilePicker* picker = [[FilePicker alloc] initWithDelegate:self
withContext:0];
[self presentModalViewController:picker animated:YES];
}
Back trace is below. Its basically useless to me since there is a call
graph, but very few symbols (I did a full install of Xcode???).
Is there anything special that needs to be done with IB? Perhaps a
missing IBOutlet?
Thanks for any help.
Jeff
(gdb) continue
2011-03-26 22:12:50.029 CryptoSandbox[123:707] -[UIView
userSelectedFile:fileSystemObject:suppliedContext:]: unrecognized
selector sent to instance 0x1dbd00
2011-03-26 22:12:50.051 CryptoSandbox[123:707] *** Terminating app due
to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView
userSelectedFile:fileSystemObject:suppliedContext:]: unrecognized
selector sent to instance 0x1dbd00'
*** Call stack at first throw:
(
0 CoreFoundation 0x329af64f __exceptionPreprocess + 114
1 libobjc.A.dylib 0x31b23c5d objc_exception_throw + 24
2 CoreFoundation 0x329b31bf
-[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3 CoreFoundation 0x329b2649 ___forwarding___ + 508
4 CoreFoundation 0x32929180 _CF_forwarding_prep_0 + 48
5 CryptoSandbox 0x000065e1 -[FilePicker
doneButtonPressed:] + 504
6 CoreFoundation 0x3291f571
-[NSObject(NSObject) performSelector:withObject:withObject:] + 24
7 UIKit 0x32cd0ec9 -[UIApplication
sendAction:to:from:forEvent:] + 84
8 UIKit 0x32d5dc21
-[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 92
9 CoreFoundation 0x3291f571
-[NSObject(NSObject) performSelector:withObject:withObject:] + 24
10 UIKit 0x32cd0ec9 -[UIApplication
sendAction:to:from:forEvent:] + 84
11 UIKit 0x32cd0e69 -[UIApplication
sendAction:toTarget:fromSender:forEvent:] + 32
12 UIKit 0x32cd0e3b -[UIControl
sendAction:to:forEvent:] + 38
13 UIKit 0x32cd0b8d
-[UIControl(Internal) _sendActionsForEvents:withEvent:] + 356
14 UIKit 0x32cd1423 -[UIControl
touchesEnded:withEvent:] + 342
15 UIKit 0x32ccfbf5 -[UIWindow
_sendTouchesForEvent:] + 368
16 UIKit 0x32ccf56f -[UIWindow sendEvent:] + 262
17 UIKit 0x32cb8313 -[UIApplication
sendEvent:] + 298
18 UIKit 0x32cb7c53
_UIApplicationHandleEvent + 5090
19 GraphicsServices 0x30e97e77 PurpleEventCallback + 666
20 CoreFoundation 0x32986a97
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
21 CoreFoundation 0x3298883f __CFRunLoopDoSource1 + 166
22 CoreFoundation 0x3298960d __CFRunLoopRun + 520
23 CoreFoundation 0x32919ec3 CFRunLoopRunSpecific + 230
24 CoreFoundation 0x32919dcb CFRunLoopRunInMode + 58
25 GraphicsServices 0x30e9741f GSEventRunModal + 114
26 GraphicsServices 0x30e974cb GSEventRun + 62
27 UIKit 0x32ce2d69 -[UIApplication _run] + 404
28 UIKit 0x32ce0807 UIApplicationMain + 670
29 CryptoSandbox 0x000054d7 main + 74
30 CryptoSandbox 0x00002b8c start + 40
)
terminate called after throwing an instance of 'NSException'
Program received signal: “SIGABRT”.
Current language: auto; currently objective-c
(gdb) bt full
#0 0x33062a1c in __pthread_kill ()
No symbol table info available.
#1 0x339ff3ba in pthread_kill ()
No symbol table info available.
#2 0x339f7bfe in abort ()
No symbol table info available.
#3 0x3134da6a in __gnu_cxx::__verbose_terminate_handler ()
No symbol table info available.
#4 0x31b25072 in _objc_terminate ()
No symbol table info available.
#5 0x3134be3c in __cxxabiv1::__terminate ()
No symbol table info available.
#6 0x3134be90 in std::terminate ()
No symbol table info available.
#7 0x3134bf60 in __cxa_throw ()
No symbol table info available.
#8 0x31b23c8a in objc_exception_throw ()
No symbol table info available.
#9 0x329b31be in -[NSObject(NSObject) doesNotRecognizeSelector:] ()
No symbol table info available.
#10 0x329b2648 in ___forwarding___ ()
No symbol table info available.
#11 0x32929180 in __forwarding_prep_0___ ()
No symbol table info available.
#12 0x000065e0 in -[FilePicker doneButtonPressed:] (self=0x1a94c0,
_cmd=0xa996, sender=0x1dbd50) at
/Users/jeffrey/Desktop/cryptosandbox/iphone/Classes/FilePicker.m:178
fso = (FileSystemObject *) 0x0
responds = 0 '\000'
__func__ = "-[FilePicker doneButtonPressed:]"
#13 0x3291f570 in -[NSObject(NSObject)
performSelector:withObject:withObject:] ()
No symbol table info available.
#14 0x32cd0ec8 in -[UIApplication sendAction:to:from:forEvent:] ()
No symbol table info available.
#15 0x32d5dc20 in -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] ()
No symbol table info available.
#16 0x3291f570 in -[NSObject(NSObject)
performSelector:withObject:withObject:] ()
No symbol table info available.
#17 0x32cd0ec8 in -[UIApplication sendAction:to:from:forEvent:] ()
No symbol table info available.
#18 0x32cd0e68 in -[UIApplication sendAction:toTarget:fromSender:forEvent:] ()
No symbol table info available.
#19 0x32cd0e3a in -[UIControl sendAction:to:forEvent:] ()
No symbol table info available.
#20 0x32cd0b8c in -[UIControl(Internal) _sendActionsForEvents:withEvent:] ()
No symbol table info available.
#21 0x32cd1422 in -[UIControl touchesEnded:withEvent:] ()
No symbol table info available.
#22 0x32ccfbf4 in -[UIWindow _sendTouchesForEvent:] ()
No symbol table info available.
#23 0x32ccf56e in -[UIWindow sendEvent:] ()
No symbol table info available.
#24 0x32cb8312 in -[UIApplication sendEvent:] ()
No symbol table info available.
#25 0x32cb7c52 in _UIApplicationHandleEvent ()
No symbol table info available.
#26 0x30e97e76 in PurpleEventCallback ()
No symbol table info available.
#27 0x32986a96 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
No symbol table info available.
#28 0x3298883e in __CFRunLoopDoSource1 ()
No symbol table info available.
#29 0x3298960c in __CFRunLoopRun ()
No symbol table info available.
#30 0x32919ec2 in CFRunLoopRunSpecific ()
No symbol table info available.
#31 0x32919dca in CFRunLoopRunInMode ()
No symbol table info available.
#32 0x30e9741e in GSEventRunModal ()
No symbol table info available.
#33 0x30e974ca in GSEventRun ()
No symbol table info available.
#34 0x32ce2d68 in -[UIApplication _run] ()
No symbol table info available.
#35 0x32ce0806 in UIApplicationMain ()
No symbol table info available.
#36 0x000054d6 in main (argc=1, argv=0x2fdff538) at
/Users/jeffrey/Desktop/cryptosandbox/iphone/Other Sources/main.m:40
pool = (NSAutoreleasePool *) 0x17d520
retVal = 803213408
(gdb)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden