iOS Simulator Crash Logs - objective-c

When I use the iOS simulator and the app crashes, I can't find the crash logs. I've been looking all over the internets and can't figure out how to enable them. I know I can just run on an actual device and get the crash logs that way, but the bug I'm trying to fix right now tends to cause the program to be hung in the debugger. Then there's no qlaunchsuccess packet sending and it's a huge pain, especially when I have to run the program over and over. The only advice I've been able to find says the use CrashReporterPrefs, but a search of my hard drive reveals nothing named something even close to this. I've also dug into the package contents of XCode and the files of the iOS simulator. The iOS simulator has a crash logs folder, but it is empty. Anyone know how to get this working? Thanks.

Run your App with Xcode to install the App to iOS Simulator
Launch your App on Simulator without Xcode
reproduce steps for crash
the Crash log should show up under this directory
~/Library/Logs/DiagnosticReports/

It appears if you aren't running Xcode (mine is 4.5.2) but just the simulator (mine is 6.0) that when an app crashes it does save a crash report. To view it bring up the Application/Utilities/Console and
(1) make sure it shows the log list (see top left of console to make sure not hidden)
(2) under "DIAGNOSTIC AND USAGE INFORMATION" there is a "User Diagnostic Reports" that if you open up should have your crash reports
(3) the area on the right of the console has the log

A Crash log is just an output of what the debugger already gives you. When you are running in the simulator attached to the debugger, and you hit the crash, you can view the back trace information in the debug navigator (default key binding is cmd+5)

Related

Application stuck at "Powered by Titanium screen"

I'm trying to run an app made on Titanium in my cellphone. At first it was working fine, until i decided to debug my code. After that whenever i try to run it on my cellphone, it gets stuck # the powered by titanium screen (that red one).
I tried to delete my build folder as some people said after a bit o research but it won't work.
How can i solve this?
What I would try to do is:
clean the project (it also deletes the build folder, but I think it also cleans some more stuff in there).
when the app starts try to set an alert in app.js as the first thing - see if this alert shows, and if it does - move it to the next step until you find a place where it is no longer shown which might indicate that this is where you problem is.
Look at the device logs - if it's an android device open ddms and look at the logs while you run the app - see if anything pops up. If it's an iPhone on xCode you have some sort of console viewer for the phone (sorry - can't remember the name right now).
make sure you are not still running under debug mode.
BTW - you didn't mention if it happens on iPhone or Android? does it happens on the simulator as well?
I was having the same issue. From digging through Appcelerator's Jira I found we weren't alone, and also got a workaround that allows us to get past the splash screen. Check to see if there is a deploy.json file located in your application's directory on the device. If so delete it!
Here is more info on the issue https://jira.appcelerator.org/browse/TIMOB-16086.
It's rated as a high priority to be corrected for the 3.3.0 SDK release.

App crashes on iPod

I have created one application for iPhone. Application does a search for all watersports around the world. It is webservice based application.
My application runs smooth on Simulator without any crash report but when I create ipa file and launch same application on my iPod (I dont have my own iPhone) the application crashes after some time. Scenario of crash is not fixed so I assume this is because of Memory Leak or memory warning.
I used this function didReceiveMemoryWarning to identify memory warning but the function doesn't get called on simulator.
My Xcode version is 4.3 and unfortunately I updated the version of my iPod to iOS 6.0 so I can not test the app by connecting my iPod to the Mac. I am going to update my Mac and Xcode very soon but not soon enough to make this issue resolve/test.
Any ideas?
You can get the crash log from device using the following approaches. Check how-to-find-crash-logs or get-crash-reports-logs-from-iphone-ipad. You can symbolicate the crash log to find out the root cause. Check this question here for more details on that part Symbolicating iPhone App Crash Reports. Once you got the issue, you should be able to fix it.
Try this, put a temporary label then modify it when the didRecieveMemoryWarning is called or make an alert view that pops up when didRecieveMemoryWarning is called.
Also, run with Instruments app, its a great way to monitor your memory usage and identify memory leaks. Also try Product -> Analyze to find memory leaks from in-Xcode. Instruments is part of the SDK just search for it in spotlight.

Is there an output log like Xcode's available locally in my iPhone?

I am developing an iOS application and thanks to Xcode's "output log" I've been able to fix lots of bugs and such.
When I run my iOS application without Xcode, sometimes it crashes. However, it is hard to tell why did it crash since my device was not connected to Xcode. So I was wondering, when I run my iOS application, is there an output log like Xcode's stored somewhere within the iOS device I can retrieve? Or do I definitely need Xcode? Or perhaps there are other ways?
When you connect your device to your computer, open up the Organizer in XCode. There will be a device log tab that you can select to view device & crash logs.
Go in the organizer then on devices. You'll get logs in there.
If you are jailbroken you can use the syslog in /var/log/. I find it useful.
edit: You need to download syslogd to /var/log/syslog package on cydia also.

iOS application crash when started

I have such problem
I am making an application with xcode 4.3.1 iOS 4.0 as target.
I have default picture as starting image.
I am using core data.
When I start application then type some info into it and then push it to background. Its all ok. If I try to start after I went to background it become crash after start image is loaded. Second launch is good without crashes. When I try to start application with some delay it does not crash.
The problem that I have no errors in debbuger and no logs about crash in iPod. All seems well.
If you had such problems, please say how you fix this issue.
P.S. Sorry for my English
You can try using logs and check out Xcode's organizer's console for your device so you can get additional info about functions that were called last.

iPod App crashes on launch

Is it normal that when i try to test my app it crashes on launch?
I explain.
I have my app that works fine in the simulator. I wanted to try to test it on my iPod Touch 4g.
I built and run from XCode, and that's what happened: the app launches fine (it shows me a black splash screen),but then suddenly it comes back to the springboard,with no reason.
If i open up the app manually,after it crashed,it works without any problems. It happens only one time,just when i build and run,and i don't know why.
How can i do to avoid this? On simulator it works with any crashes,but when i run it over my iPod,it crashes.
Program ended with exit code: 0 // on simulator
The app is likely to be failing to run on the device as xcode is trying to attach the debugger to it but doesn't have permission to do so.
Check your entitlements.plist within your project; you probably have one that has get-task-allow set to NO. This needs to be 'YES' to allow the debugger to attach. (It does need to be 'NO' for adhoc builds though - one solution is to exclude the entitlements.plist file from the debug build.)