Getting crash in CMDActivityViewController for iOS8.
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ArtViewController activityViewController:dataTypeIdentifiersForActivityType:]: unrecognized selector sent to instance 0x7acb0b80'
Solution to this-
In dataTypesForActivityType method of "CMDActivityViewController.m", return nil , instead of the array dataTypes.
Use this Method as it is
- (NSArray *)dataTypesForActivityType:(NSString *)type {
return nil;
}
Related
Not really understand what the exception is and there is no back trace for me to look into it.
- (CLCircularRegion *)regionWithGeotification:(Geotification *)geotification{
NSLog(#"Set region with geotification");
*********
CLCircularRegion *region = [[CLCircularRegion alloc] initWithCenter:geotification.coordinate radius:geotification.radius identifier:geotification.identifier];
*********
[region setNotifyOnEntry:geotification.eventType==OnEntry];
[region setNotifyOnExit:!region.notifyOnEntry];
NSLog(#"region notify on %d",region.notifyOnExit);
NSLog(#"Done setting region");
return region;
}
What I found out is the crashes start in code above.
2018-11-01 17:25:52.412643+0800 Loud Speaker[12276:1296047] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFNumber getCString:maxLength:encoding:]: unrecognized selector sent to instance 0x85aec1991d2b50a2'
*** First throw call stack: (0x193ff7ef8 0x1931c5a40 0x193f0f154 0x193ffd810 0x193fff4bc 0x19aeb0904 0x19aeb1cbc 0x100d2b024
0x100d2b5ec 0x100d2a478 0x100d2a12c 0x100d29418 0x100d9986c
0x100d449b4 0x100de136c 0x102be7840 0x102be8de4 0x102bf6830
0x193f861bc 0x193f81084 0x193f805b8 0x1961f4584 0x1c0dfcbc8
0x100d93164 0x193a40b94) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)
Hi I am using Apple CATALOG Source code for displaying search bar controller on navigation controller.
It does load, but when i click on search, it get crash due to UISearchResultsUpdating-
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AAPLSearchBarEmbeddedInNavigationBarViewController updateSearchResultsForSearchController:]: unrecognized selector sent to instance 0x15db8ab0'
Suggest me the reason for crash.
code for crash -
- (void)updateSearchResultsForSearchController:(UISearchController *)searchController {
if (!searchController.active) {
return;
}
self.filterString = searchController.searchBar.text;
}
Your error is self-explanative. You're crash is not on this method, but in place where you call it. You're sending message to a wrong object.
I am receiving an "EXEC_BAD_ACCESS" error when I attempt to
instantiate [anImage] in iOS8.
The same code works fine in iOS 7.1 and below.
Any suggestions are greatly appreciated.
//In .h file:
UIImage *img;
//in .m file:
img = [UIImage imageNamed:#"image.png"];
UIImageView *anImage = [[UIImageView alloc] initWithImage:img];
/*
* Here is the stack Trace:
*/
-[__NSCFDictionary _isDecompressing]: unrecognized selector sent to instance 0x16e49740
2014-10-07 08:56:35.319 [AppName] [222:7088] *** Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '-[__NSCFDictionary _isDecompressing]: unrecognized
selector sent to instance 0x16e49740'
*** First throw call stack:
(0x27e50e3f 0x35528c8b 0x27e56189 0x27e540a7 0x27d86208 0x2b2faf55 0x1011bb 0x103d27
0xfe759 0x1029d7 0x10060d 0x2b31fd4b 0x2b31fcf1 0x2b30a96b 0x2b32827f 0x2b2e45cd
0x27e175cd 0x27e14c8b 0x27e15093 0x27d63621 0x27d63433 0x2f0d20a9 0x2b34e359 0xe9b05
0x35aa8aaf)
libc++abi.dylib: terminating with uncaught exception of type NSException
I'm having some trouble understanding why this is happening but for some reason when the NSNotification gets triggered for the second time this happens:
-[UITableViewCel lContentView imageFound:]: unrecognized selector sent to instance 0x1cd837e0 2013-08-12 16:32:24.340 poundtaxi[7483:907] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITableViewCellContentView imageFound:]: unrecognized selector sent to instance 0x1cd837e0'
* First throw call stack: (0x344d92a3 0x3c17e97f 0x344dce07 0x344db531 0x34432f68 0x3442a037 0x34d40599 0xd7d9f 0x33d64145 0x3c59611f 0x3c5954b7 0x3c596dcb 0x344acf3b 0x3441febd 0x3441fd49 0x37fe32eb 0x36335301 0xb963d 0x3c5b5b20) libc++abi.dylib: terminate called throwing an exception
Here is the block of code that gets executed:
-(void)imageFound:(NSNotification *)aNotification {
NSDictionary* userInfo = [aNotification userInfo];
Picture *aPicture = (Picture *) [userInfo objectForKey:#"picture"];
UIImage *image = (UIImage *) [userInfo objectForKey:#"image"];
aPicture.highResPicture = image;
self.count++;
}
It is likely that a registered observer object was released before being removed as an observer. Always remember to remove notification center observers in dealloc.
I have a subview, called DataViewController, and a parent viewcontroller, called RootViewController.
Everytime is try to call a function or set a property that is defined in my RootViewController, from my subview, I get these errors:
Error:
Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '-[UIPageViewController
setDetailsDataObject:]: unrecognized selector sent to instance
0x6aa2df0'
Code:
RootViewController.h:
#property (strong, nonatomic) id detailsDataObject;
DataViewController.m:
((RootViewController *)self.parentViewController).detailsDataObject = self.dataObject;
And...
Error:
Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '-[UIPageViewController
showDetails]: unrecognized selector sent to instance 0x6880db0'
Code:
RootViewController.h:
- (void)showDetails;
RootViewController.m:
- (void)showDetails
{
NSLog(#"Hello");
}
DataViewController.m:
[((RootViewController *)self.parentViewController) showDetails];
Does anyone know how to fix these exceptions?
do an Nsaasert statement to check if the self.parentViewController is actually RootViewController instance
NSAssert([self.parentViewController isKindOfClass:[RootViewController class]], #"Not RootViewController");
Try this..correct if there are any spelling mistakes.