I'm getting very strange behavior when I run my app. In the simulator, the app runs fine. On the device, an exception is thrown. I'm new to iOS, so I'm lost on this one. I have breakpoints set for all exceptions and my output prints only lldb.
Also, I'm not sure if this is relevant, but when this first occurred yesterday, my device crashed and deleted all my apps. I had to restore this morning. I tried restarting both my mac and my device.
I didn't realize there is a "continue" button in the console. When clicked, it printed my error.
Related
I am facing an issue with iOS 9. My app crashes randomly with EXC_BAD_ACCESS at random location. I tried using the debugger and putting breakpoints to check for any errors.Also tried with exception breakpoints but to no help. My app runs fine on iOS 8.4 and below without any error.
I tried enabling Zombie Objects.On enabling them the App does not crashes till it is connected with the computer for debugging. As soon as the cable is disconnected the app starts crashing.
Also while debugging with Zombie Object with or without breakpoints I don't get any crashes or exception or any log on the console.
If anymore information is required please revert back .
There is a bunch of questions like this one and no general answer since the problem is that it can be caused by numerous reasons. I believe that in my case it was a bug because it has happened on random places. Luckily for me to clean a project has helped me.
So hit Shift+CMD+K and believe.
I am facing a weird issue.NSLog statements are not getting printed to the console when i am debugging my application using the device.I even pulled the log files using the organizer even there they are not having the logs. When i debug it in the Simulator they are getting logged to the console properly.
I tried using both the GD debugger and lldb debugger.. That did not work
Any ideas what might be causing the issue??
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)
The iOS simulator is issuing a SIGABRT signal attributed to main.m.
I am confused since I did not change main.m. Backtracing the debugger always returns the main function, which is not useful to me.
How does one go about debugging a SIGABRT signal in iOS? I wish XCode could let me know which line I wrote caused the signal to fire.
Here is what the console issues after terminating my program.
Couldn't register com.inimicalme.me.iosapp43 with the bootstrap server. Error: unknown error code.
This generally means that another instance of this process was already running or is hung in the debugger.
I'm not quite sure though what this means or if it is directly related to the issuing of the SIGABRT.
The error in the console usually means you need to restart your device, restart Xcode or restart your Mac. Or some combination of those.
Although, that's not usually associated with a SIGABRT, but give it a try.
The hang usually happens between two pieces - xcode and your device. If the device is a simulator, a restart will be needed. If not...
unplug your device
reset it
close xcode
reopen xcode
start again!
Good luck in the future.
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.)