I have an app that is using the open source PSStackedView to implement a twitter-like interface. The app is working great on simulator, but when I run it on the device, as soon as I try to add a view controller to the stack the app crashes and highlights viewController.view.height = [self screenHeight]; that line as Thread 1: breakpoint 1.1
The app then just hangs on the device. I have tried debugging with zombies enabled, but it shows nothing problematic.
I am sick over this because I just finally got things going on the device, I have poured so much time into this app! Any advice would be greatly appreciated.
Your app isn't hanging - it's just hitting a breakpoint at that line, which most likely you set by accident. Go to the line where your code stops, and press Cmd + \ to disable the breakpoint. You can also press Ctrl+Cmd+Y to continue running the app past the breakpoint. There are other hotkeys and commands you can try under Xcode's Debug menu.
Related
I am getting the following crash when I run the app on my device, but it works fine on the simulator:
Any idea of where I should probably start looking? This is super abstract to me
Also it seems that every time I run the app, I am getting a different error.
Here's a bigger image link
It might be because of zombie. Put the exception breakpoint in xcode and analyse.
In case if you don't know how to put exception breakpoint follow below steps:
Press cmd + 6 to open breakpoint navigator
Tap on "+" put present at the bottom left of the screen and select "Add Exception Breakpoint..."
Press Done.
Now run the program.
The program stops at the point where the exception is thrown. Analyse the problem and fix it.
I have this navigation app with several views and no data yet.. however I had a small break from coding over the weekend and have come back to it only to have it not load in the ios simulator.
There are no errors in the xcode output while it runs but as soon as i click to run button it loads the app up but as soon as it opens it closes and goes to the home screen.
I have tried cleaning the build and opening closing everything but just cannot figure this thing out...
Since there is no error messages or indication as to what is wrong I am going to suggest
a few other things you can try out:
Have you tried "iOS Simulator" -> "Rest content and settings".
In Xcode click the "Product" menu in the menubar, hold down the Option key and
you should see "Clean" change to "Clean Build Folder".
Lastly pull up Organizer (Shift+Command+2), select the "Projects" and the then click "Delete Derived Data".
The two last ones should not be directly related to the simulator, but they won't hurt either.
Does your app requires internet connection to run.. if it does, check ur internet connection as well.
I have this kind of problem last time and turn out, if there's no internet connection and you didn't put any exception on that, the app will straight away crash with no errors..
I've noticed this weird behaviour, with virtually any (well 5 different) Xcode/iOS project I'm debugging.
From Xcode (4.0.2) Run the project (into iOS simulator)
In the simulator, click the Home button.
Quit the simulator (by Cmd+Q)
==> The Xcode enters the debugger, and the stack trace shows:
mach_msg_trp
UIApplicationMain
main
The weird thing is that if I slightly alter the sequence, as follows:
1. From Xcode (4.0.2) Run the project (into iOS simulator)
2. In the simulator, click the Home button.
3. Click my application icon (the one I'm debugging) on the iOS simulator
4. Quit the simulator (by Cmd+Q)
==> No problem...
Anyone else experience this?
Any idea what this is and what's causing it?
Thanks
It's not weird, just the way how xcode debug works.. When you start for debug it just link the debug session with instance running on the simulator.. So if you press home button, it stops debugging session because at that time there is no app running on ios.
I am hoping someone can help me. I have just started running xcode 4.01 and for some reason whenever I run an app, it does not stop on breakpoints or display the NSlog messages. I have a message in my viewDidLoad and it never shows. I even breakpoint on this log and the best I can get in the output window is:
pending breakpoint 1 - "universalTestAppDelegate_iPad.m:15" resolved
pending breakpoint 2 - "universalTestAppDelegate_iPhone.m:16" resolved
Actual code is:
-(void) viewDidload
{
NSLog("in viewDidLoad");
}
So it appears it sees the breakpoint but never stops on it. As I said, brand new to xcode 4 so any idea on what I am doing wrong? Uninstalled and reinstalled and still nothing. Also, if it means anything, in the Scheme to choose where to run, I can select IOS devie, iPad 43 simulator and iPhone 4.3 simulator. Tried both and still nothing. Why can't I select/see other versions of the IOS?
BTW: The above is because I do not have my iPad or iPhone connected. Thanks in advance for any and all help.
Geo...
Your method is just never called.
Make it
-(void) viewDidLoad
with big "L" and your chances of "breaking" will sky rocket. ;)
Two possibilities:
You don't have breakpoints turned on. Use the Product->Debug->Activate Breakpoints command to rectify this.
You have breakpoints turned on but you placed your breakpoints on lines that haven't been executed. If your log statement doesn't appear in the console, that would indicate that the method containing that statement isn't executing, so it's no surprise that the breakpoint on that line has no effect.
I had similar issue where the debugger would not stop on breakpoints in the simulator using Xcode 4C199. Turns out the simulator was just buggered and restarting it resolved the issue.
I also had the issue with XCode 3 where I had localized the name of the app to a set of Japanese characters. The debugger didn't like that. I solved that one by having english name for debug configuration and japanese name for release.
I'm running my application on the simulator but as soon as it starts it just closes I guess it crashes, however I dont get any error message or reason why it's crashing, I'm running it as debug also, is there anyplace or anyway to get an error message?
Try switching to "debugger" view, and look at the console from gdb, if it crashes you will see the error, and hopefuly the call stack.
Example of crash message: EXC_BAD_ACCESS.
If you don't have the call stack visible, you can try to type 'bt' (for back trace) at the gdb prompt.
A lot of times when my application randomly crashes before launching, there is a problem in an interface builder file (such as a connection to a now non-existant object). Check your interface builder files to see any potential bad connections or errors and if you can't find any, put an NSLog in your applicationDidFinishLaunching method to see if the application is actually being started before it crashes.
In Xcode, choose Run menu, then choose Debug — Breakpoints On. Xcode should now point you to the location in code where your app crashes in the Debugger view.