iphone application crashes only in device and when profiling with instruments - iphone

I am not able to find the reason of a crash in my iphone app.it crashes only when it is in device.however when the breakpoints are on ,it doesnt crash.After crashing the following log is printed in the organiser console.
Mar 21 15:43:16 abc-Ss-iPhone com.apple.SpringBoard[15] <Notice>: CoreAnimation: timed out fence 1f4
Mar 21 15:43:18 abc-Ss-iPhone ReportCrash[1771] <Notice>: Formulating crash report for process aaa[1770]
Mar 21 15:43:18 abc-Ss-iPhone com.apple.launchd[1] (UIKitApplication:com.xxx.aaa[0x3989][1770]) <Warning>: (UIKitApplication:com.xxx.aaa[0x3989]) Job appears to have crashed: Segmentation fault: 11
Mar 21 15:43:18 abc-Ss-iPhone SpringBoard[15] <Warning>: Application 'aaa' exited abnormally with signal 11: Segmentation fault: 11
I have put NSLog to find where it is crashing.it is pointing to an area where i am reloading the tableview.
I am doing some calculations in the bg thread and reloading the table in the main thread using the following code:
//////////////////////////////in bg thread
if(needToReload){
NSLog(#"calc end---table refresh called");
[self performSelectorOnMainThread:#selector(updateTable) withObject:nil waitUntilDone:YES];
}

Are you profiling a Release or Debug version of the app? If Release then I believe you should still be able to decode the crashlog. Please check by opening XCode Organizer -> Device Logs for that device.

Related

xcode 5 - debug on device failed using jailcoder

Using xcode 5.1.1, and trying to debug my app on a jailbroken iphone 4 (7.1.2).
I installed Jailcoder (from the facebook page) and patched both my xcode and my project with it.
The project is just a simple view application (trying to get that to work first).
I run the app using my iphone as the build setting, the app loads on my phone but then it exits with
2014-07-28 16:00:42.831 testLiveDebug[11384:60b] otherApps (null)
Opening the console in the organizer i see this error:
Jul 28 15:51:45 my-iPhone com.apple.launchd[1] (UIKitApplication:com.debug.testLiveDebug[0xe02e][11348]) <Error>: (UIKitApplication:com.debug.testLiveDebug[0xe02e]) Exited with code: 45
Jul 28 15:51:45 my-iPhone com.apple.launchd[1] (UIKitApplication:com.debug.testLiveDebug[0xe02e]) <Notice>: (UIKitApplication:com.debug.testLiveDebug[0xe02e]) Throttling respawn: Will start in 2147483641 seconds
Jul 28 15:51:45 my-iPhone com.apple.debugserver-310.2[11346] <Warning>: 38 +6.392165 sec [2c52/1307]: error: ::read ( -1, 0x35a9ec, 18446744069414585344 ) => -1 err = Bad file descriptor (0x00000009)
Jul 28 15:51:45 my-iPhone com.apple.debugserver-310.2[11346] <Warning>: Exiting.
Jul 28 15:51:45 my-iPhone backboardd[11188] <Warning>: Application 'UIKitApplication:com.debug.testLiveDebug[0xe02e]' exited abnormally with exit status 45
I have Appsync for 7.0+ and also tried with AppSync Unified....but still i get the same error.
In the past (ios6) this whole process worked fine with jailcoder.
Any idea why i cant live debug on the device ?
-Thanks
Resupported 4+ was causing the error....after i uninstalled it everything was working fine.

Flurry analytics doesn't seem to log events in ios 4.2

In the past days I'm having issues with flurry api, and it seems that it
stopped working.
My build ios version is 4.2 and the Flurry version is Flurry iPhone SDK v4.0.4
In my code I'm doing this:
[Flurry setDebugLogEnabled:YES];
[Flurry startSession:#"MY_API_KEY"];
[Flurry logEvent:#"Entered app"];
And I'm getting:
Oct 12 18:17:40 unknown myApp[2981] <Warning>: Flurry: startSession
called for the first time
Oct 12 18:17:40 unknown myApp[2981] <Warning>: Flurry: Start session
called with apiKey[MY_API_KEY]
Oct 12 18:17:40 unknown myApp[2981] <Warning>: Flurry: Trim white space
and use apiKey[MY_API_KEY]
Oct 12 18:17:40 unknown myApp[2981] <Warning>: initial network status [1]
=========
Oct 12 18:17:40 unknown myApp[2981] <Warning>: FlurrySession: Add session
with startTime[2012-10-11 19:36:13 +0000] to saved sessions
Oct 12 18:17:40 unknown myApp[2981] <Error>: -[__NSCFNumber length]:
unrecognized selector sent to instance 0x4504a0
Oct 12 18:17:40 unknown myApp[2981] <Warning>: Flurry: Finish starting
session with apiKey[MY_API_KEY]
Oct 12 18:17:40 unknown myApp[2981] <Warning>: FlurrySession: dealloc
session
And no event Entered app seems to be logged or viewed in debug, except:
Oct 12 18:23:11 unknown myApp[2981] <Warning>: Flurry: setGender[M]
Oct 12 18:25:03 unknown myApp[3001] <Warning>: Flurry: setUserID[5]
Also if running it in xcode it stopped in this line
[Flurry startSession:#"MY_API_KEY"];
And only after pressing twice the continue program execution the program
continues to run.
In the iphone (without the xcode) it runs smoothly but the debug log is the
same, and no events seems to be logged.
Any suggestions?
p.s. Tried to talk to flurry support about this, no one got back to me for 3 days now...
Good to see that the issue got resolved. It seems that for some reason your mail did not reach Flurry. For any further issues, please feel free to write to support#flurry.com. We'll make sure your query is answered within 24 hours. (Full disclosure: I work in the Support team at Flurry)
It seems that [Flurry setUserID:currUserId] when currUserId was NSNumber* (due to passing of id currUserId), caused the problem.
Always make sure that you pass the value NSString* to Flurry, also in events values....
If we use flurry event in background,we should enable
[Flurry setBackgroundSessionEnabled:YES]; under didFinishLaunchingWithOptions in Appdelegate.
To enable background session the error of [_NSCF Number length] is avoided,it can able to track the event.

App crashing after returning from background on iOS6

I have an app that has been running fine on iOS 5, but after some testing on iOS 6, it runs fine except for when returning to the app after it has been running. Once it returns from the background it is unresponsive and then crashes about 10 seconds later.
WillEnterForeground() is executed fine and there is only some simple code in there.
Checking the console on the phone, I see the following:
Sep 20 16:41:07 Seans-iPhone-4 kernel[0] <Debug>: launchd[985] Builtin profile: container (sandbox)
Sep 20 16:41:07 Seans-iPhone-4 kernel[0] <Debug>: launchd[985] Container: /private/var/mobile/Applications/F73BBA70-90D1-4CB6-B7F3-FF10289396A9 (sandbox)
Sep 20 16:41:29 Seans-iPhone-4 backboardd[52] <Warning>: TrekkTrakker failed to resume in time
Sep 20 16:41:29 Seans-iPhone-4 backboardd[52] <Warning>: Forcing crash report of TrekTrakkerSimp[985]...
Sep 20 16:41:30 Seans-iPhone-4 backboardd[52] <Warning>: Finished crash reporting.
Sep 20 16:41:30 Seans-iPhone-4 com.apple.launchd[1] (UIKitApplication:TrekkTrakker[0x28c2][985]) <Notice>: (UIKitApplication:TrekkTrakker[0x28c2]) Exited: Killed: 9
Sep 20 16:41:30 Seans-iPhone-4 backboardd[52] <Warning>: Application 'UIKitApplication:TrekkTrakker[0x28c2]' exited abnormally with signal 9: Killed: 9
Sep 20 16:41:30 Seans-iPhone-4 ReportCrash[987] <Error>: libMobileGestalt copySystemVersionDictionaryValue: Could not lookup ReleaseType from system version dictionary
Sep 20 16:41:31 Seans-iPhone-4 ReportCrash[987] <Notice>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/TrekTrakkerSimple_2012-09-20-164129_Seans-iPhone-4.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
Anyone experiencing similar issues, or have any idea what might be happening?
If your not using ARC it is in all likelihood an issue with something being released that your sending a message to. Just about every version of iOS that has come out has exposed some bug that was always there but which for whatever reason was not surfaced until the new Version.
Run in the debugger and look at all the code in the levels near where it crashed for something stupid like an object that is not retained or which you though was but isn't.
Your app is crashing or rather being forced to exit by WatchDog because the app is not responsive in the 10 second window. This means that your app is taking too long to launch, this could be due to a call that is getting stuck on iOS 6 or more likely the iOS 6 device is running slightly slower for one reason or another. Use the Time Profiler instrument to look at where your startup time is going and ensure that applicationDidFinishLaunching: is returning as quickly as possible, most cases of WatchDog crashes are due to hangups in that method.

AppleFairplayTextCrypterSession::fairplayOpen() rashing iPhone on startup

I'm trying to find out if anyone here had mysterious crash on startup and peeking into the console logs, you see AppleFairplayTextCrypterSession::fairplayOpen() failed ?
The iPhone app will connect to remote server for xml data and if the server is down this will crash the app. On subsequent startup, it will always crash until I reboot and sync to iTunes again.
I appreciate it very much if somebody can give me some clue as to how to prevent the crash or catch it and exit gracefully.
Sun Dec 6 22:50:31 unknown kernel[0] <Debug>: AppleFairplayTextCrypterSession::fairplayOpen() failed, error -42184
Sun Dec 6 22:50:31 unknown SpringBoard[25] <Warning>: Failed to spawn MyApp. Unable to obtain a task name port right for pid 140: (os/kern) failure
Sun Dec 6 22:50:31 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.--.MyApp[0x554b]) Exited: Killed
Sun Dec 6 22:50:31 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.--.MyApp[0x554b]) Throttling respawn: Will start in 2147483647 seconds
Sun Dec 6 22:50:31 unknown SpringBoard[25] <Warning>: Application 'MyApp' exited abnormally with signal 9: Killed
I think the issue might be with this line
Application 'MyApp' exited abnormally
with signal 9: Killed
Please, see this discussion
http://discussions.apple.com/thread.jspa?messageID=9908695
Hope that helps

iPhone SDK strange console message launchd_core_logic.c

I am running release version of the app on the iPhone, it works fine. There is no error messages in the XCode debugger:
Running…
Switching to thread 11779
Switching to thread 11779
sharedlibrary apply-load-rules all
(gdb) continue
Switching to thread 12291
Switching to thread 11779
Switching to thread 13059
Debugger stopped.
Program exited with status value:0.
However I see these messages in the console of iPhone when connect to it via Organizer:
WWed Oct 7 15:37:01 unknown com.apple.launchd[1] : (UIKitApplication:com.blah.blah[0x830c]) Bug: launchd_core_logic.c:2649 (23909):10
Wed Oct 7 15:37:01 unknown com.apple.launchd[1] : (UIKitApplication:com.blah.blah[0x830c]) Working around 5020256. Assuming the job crashed.
Wed Oct 7 15:37:01 unknown com.apple.launchd[1] : (UIKitApplication:com.blah.blah[0x830c]) Job appears to have crashed: Segmentation fault
Wed Oct 7 15:37:01 unknown com.apple.debugserver-43[6124] : 1 [17ec/1603]: error: ::read ( 7, 0x28091c, 1024 ) => -1 err = Bad file descriptor (0x00000009)
Wed Oct 7 15:37:01 unknown SpringBoard[25] : Application 'blah' exited abnormally with signal 11: Segmentation fault
I have tried Apple's UICatalog sample and empty view based app generated by the XCode. They both report exactly the same message as my code in the console. So this is NOT my app related.
There is no crash logs created, so I don't think it is a crash.
What is it? Is it a problem, even though application works perfectly fine?
Thanks
I had the same problem and it gave me problems when testing in app purchases. In the end I found out that I was running the program with an iPhone Distribution code signing instead of an iPhone Development code signing. When I changed that for the Debug configuration (and removed the Entitlements.plist) it worked again. Hope it helps.
It's not a problem. I have similar messages on my console all the time. And as you said it's not your apps fault, so as long as you app runs ok there is no problem.
The message is not from your app, it's from the com.apple.launchd. I think that only the xcode console output is really relevant for you.