[CFXPreferencesSearchListSource tryLock] - iphone

I'm implementing ShareKit, and so far so good on iOS5.1 and 6.0, however 5.0 is giving me a bit of problems in the simulator.
Whenever I execute my actionsheet and leave the program (for example to launch Facebook in browser), my app will crash with:
-[CFXPreferencesSearchListSource tryLock]: unrecognized selector sent to instance 0x957e120
What is going on? Couldn't find any similar errors out there when searching. Thanks

It's a bug of simulator 5. After UIAlertView dismissed, press CMD+SHIFT+H, the bug occurs.
In fact, it doesn't occur in physical devices. So don't panic

Related

"unrecognized selector" crash on IOS 7 simulator

I am testing my music application compatibility on IOS7 by running it on Xcode 5 iPhone simulator(IOS7) but it crashes on retrieving all the music items using following code.
MPMediaQuery *allSongs = [[MPMediaQuery alloc] init];
NSArray *itemsFromGenericQuery = [allSongs items]; // Here application crashes
Crash log :
[__NSCFNumber libraryCompletionHandler]: unrecognized selector sent to instance 0xdd66840
This is snapshot for the threads running at the time of crash:
I am suspecting that there is some bug in Xcode5..!
EDIT : I could run the same application using Xcode 4.6.3 on simulator/device without any issue/crash.
[__NSCFNumber libraryCompletionHandler]: unrecognized selector sent to instance 0xdd66840
This error says that an object of type NSNumber was passed the message -libraryCompletionHandler. NSNumber doesn't have a -libraryCompletionHandler method, hence the crash. Obviously, something bad is going on.
Usually this is an indication of a bad cast, or a zombie. In this case, I would suspect a zombie object.
Congratz, you may have found a defect in the iOS 7 Simulator. Woo Hoo!
I am suspecting that there is some bug in Xcode5..!
There are clearly some bugs in the developer preview versions of Xcode 5, but it sounds like it's your app that's crashing rather than Xcode or the simulator itself. That would lead one to believe that the problem is more likely to be either in your app, or possibly in the operating system.
[__NSCFNumber libraryCompletionHandler]: unrecognized selector sent to instance 0xdd66840
Bad pointers are a common cause of unrecognized selector errors, especially when they involve classes that don't seem to be involved in the code that's crashing. Turn on NSZombieEnabled and set a breakpoint on all exceptions to track down the problem.
Maybe it's the project settings
Try to add -ObjC

iPhone crash logs

I have an app in ad-hoc mode and it crash right after starts. I have access to Xcode and i try to find crash log like here: iPhone crash log?
But i have no crash log from this app. Why?
Right after app starts i can see Default.png and few second later it crash, i've never even see the mainViewController. How do get a crashlog? How to detect this error? I don't have an access to source code. I have only ad-hoc distribution.
Problem not occurs on every devices. AFAIK this is only 3GS problem. Strange.
Instead of looking for the crash log, try connecting your phone to xcode but look at the Console screen instead, run the app and you should see output on the console, see if you get an error message there.
For users who don't have access to Xcode or are running on a PC you can download Apple's iPhone Configuration Utility which also gives you access to the device console.

Why my app is not closing even after a crash

I am working on an iPad app. Sometimes it get crashed (I know the reason) but I am wondering why the app does not close even after a crash! When the app crash I got some error related to crash in console but the app does not close. It even appear in the multitasking bar (I can see that when I press home button two times). I am wondering is there some kind of setting for this? or this is a normal behavior?
If you are running the App from Xcode, the debugger will still be attached so the crash will not terminate the process. You can use the Xcode debugger to take a look at the stack, inspect variables etc. Only when you stop the app in Xcode will the process be completely terminated.
#Mike Weller is correct.
It is typical behavior of the simulator to not close the app upon a crash as the debugger is designed to stop at the point of code where the crash occurs (for obvious reasons!).
If you want to check it on device for your satisfaction. Connect your device, run the app once on it via xcode. Close app (stop on xcode). Then disconnect the device.
The app will be now installed on your device like any other normal app. Run this app and do whatever causes it to crash. You will see that the app will close and you will be thrown back to the iphone springboard screen.
As for app appearing in the multitasking bar, it has already been mentioned here that the presence of the app in the multitasking bar does not mean that it is still running. This is vital difference in architectures between ios and android.
The multitasking bar is NOT a task manager. The ios philosophy is that the user does not need to know that an app is running or not. He only needs to know which apps he has run in the past.
The reason that it doesn't close, is probably that the app is actually not crashing.
Could it be so that the print you are seeing is an Exception that is printed to the log?
Could it be that you are catching this exception after it is printed?
Like this:
#try {
[test characterAtIndex:6];
}
#catch (NSException * e) {
NSLog(#"Exception: %#", e);
}
The above code would not crash, since the exception is caught. Catching an exception is telling the platform that you took care of the problem so the app does not need to crash.
There could be many other reasons, but with the info you provided this is my best guess.
You could post the log print that you are seeing, that would certainly give a better clue...

More unspecified crashes on Xcode 4.2

I've been using Xcode to develop iPhone Apps for a couple of years now. In the last couple of months I've updated to Xcode 4.2 for iOS 5 development.
On previous versions of Xcode I've found it very rare that I get a crash without any log of where the error happened. With Xcode 4.2 / iOS 5 I find that I regularly get crashes without any log. I just end up with the code stopped in main.m with a message like "program received signal SIGABRT" (or a couple of other messages) but no log messages at all. (I'm looking in the "All Output" window at the bottom of the Xcode gui).
For example, my last one was where I used the initWithNibName:bundle: method but typed in the incorrect nib name. The code passed this line without error, but when I got to the pushViewController:animated: method the code crashed with the SIGABRT message but no log messages. It took a while for me to find my typo...
I'm sure in previous versions of Xcode I would see a far more informative message...
Is there something I'm missing in Xcode 4.2? Should I enable some extra debugging feature? Any way to get it to give more useful crash information? Or is this a know problem with iOS 5 / Xcode 4.2?
Thanks for any pointers...
You are not alone, I have found this too. I often find there is not enough information in the log to diagnose the crash with the lastest xcode. I have two tips that might help.
Run on the actual device. I often find for some reason I get more detailed logs when it crashes on the device.
Worst case, you can go into the organiser and check the crash logs of the device, this will give you what thread crashed and what you call stacks looked like when it crashed.
Switch between the GDB and LLVM compiler and or debugger. I havent experitmented enough with this but I believe this has helped on occasion.

updated to iOS4.1 and iAd "test advertisment" not showing up on simulator

I added the iAd as written in tutorials and in my app it always calls didFailToReceiveAdWithError. bannerViewDidLoadAd is never invoked. I know I'm supposed to see a "test advertisment" Ad, but nothing shows up, because the function bannerViewDidLoadAd is never being invoked.
I've looked into other questions, but didn't find an answer...
I would have added code, but I suspect this is more of a misunderstanding between me and Steve.
Thanks.
UPDATE:
Can someone please let me know if this problem also shows him in the console:
Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0xfdd4070 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
First of all, check your iAd status for your application in your iPhone Development Portal. You must enable iAd access for your application there. This might take a couple of hours to activate (in my experience).
Also, I think the provisioning profile used for the application determines which ads should be shown. It states in the documentation that development and ad-hoc profiles show test ads and that the distributed version of your app shows the normal ads.
it seems that xcode 3.2.4 with iOS4.1 does not support iAd.
but i am downgrading the xcode to 3.2.3 with iOS4.0 and
still facing the problem of iAds testing does not display.
Any other reason.
I encountered the same problem. It turns out that my certificates / provisioning profiles were all out of date. Once I updated them, the problem went away without any further work.