Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kashmoney2006

macrumors regular
Original poster
Dec 12, 2007
232
0
So Ive been using Xcode to build this app ive been working on using openGL and GLUT. For some odd reason, starting yesterday after class, clicking on build and go will not launch the application. This has not been a problem as it has been working fine for weeks now, but now it will no longer show the app. It does say "<Application Name> Launched" at the bottom of the Xcode project window, and after clicking on the Stop button it will change to "Debugging Terminated". So it seems as though it is working except for the fact that the app is not being displayed. Can anybody help me? is there some kind of setting that may have gotten changed by accident, that is causing this to happen? and if it helps I am using Xcode 3.1. Thanks.
 
set breakpoints in the debugger. One at the entry and exit point of each major function. See if they get triggered.

Litter these places with nslog messages as well.

Doing these things you should be able to see where the program is or is not going.

-Lee
 
I've had this happen quite a bit on Xcode 3.1 too. I don't know of a proper fix or what causes it. I usually just reboot and relaunch Xcode and it works again. Just relaunching xCode doesn't do the trick.
 
Sounds like you set a breakpoint on some code somewhere and the debuger has stopped at that breakpoint waiting for you to continue or whatever.

Along the top of the file editing window you should see a row of controls. One looks like a Pause/Play button for audio players. Try clicking on it.

The other alternative is some code was deleted that starts up the GUI. Check the startup portions of your app and see if something doesn't look right.

There's a new feature of Xcode 3 that allows you to make a "snapshot" of your project at any arbitrary point (kinda like Time Machine I guess). In the File menu select "Make Snapshot" and then you have a kind of backup of your project. You can make changes and roll them back later. View the snapshots in the "Organizer" in the Window menu.
 

Attachments

  • Picture 4.png
    Picture 4.png
    37.4 KB · Views: 240
Sounds like you set a breakpoint on some code somewhere and the debuger has stopped at that breakpoint waiting for you to continue or whatever.
I don't. I can close Xcode. Reboot the computer and then open the project and Build and Go works. There's nothing weird about the code. It also runs perfectly fine if I launch the built app from the finder.
 
This could be a bug w/ the debugger in XCode 3.1 if this spans projects and installations, and without any changes to the project a reboot corrects this. I'd file the bug with Apple. I would still try getting some NSLogs in there to see if the program is running at all.

-Lee
 
I've had this happen quite a bit on Xcode 3.1 too. I don't know of a proper fix or what causes it. I usually just reboot and relaunch Xcode and it works again. Just relaunching xCode doesn't do the trick.

That was the first thing i tried. nothing.

Sounds like you set a breakpoint on some code somewhere and the debuger has stopped at that breakpoint waiting for you to continue or whatever.

Along the top of the file editing window you should see a row of controls. One looks like a Pause/Play button for audio players. Try clicking on it.

The other alternative is some code was deleted that starts up the GUI. Check the startup portions of your app and see if something doesn't look right.

There's a new feature of Xcode 3 that allows you to make a "snapshot" of your project at any arbitrary point (kinda like Time Machine I guess). In the File menu select "Make Snapshot" and then you have a kind of backup of your project. You can make changes and roll them back later. View the snapshots in the "Organizer" in the Window menu.

I couldnt find a breakpoint set anywhere. I did click on the pause/play button and it didnt do anything. the only thing it showed in the organizer window was my iphone? I set a cout messages throughout my main function and none of them showed in the console. this is really frustrating. I can double click on the app under products and that will launch it, but id rather fix the problem than use a workaround. I even just made a new project that should just create a new window and that wont show either, nor do the cout messages show out to the console. no different. :(
 
I'm getting the exact same thing with the Xcode 3.1 beta and the Allegro game library. I believe it to be a bug in Xcode, which wouldn't be so frustrating had I not only moved to the 3.1 beta because Shark was broken against 3.0.

I find that if I build and launch a debugging session with no breakpoints set, then the application launches correctly — Xcode seems able to launch gdb and gdb isn't broken so it launches your app correctly. The only annoyance is that it takes several extra seconds as gdb does it's extreme slow loading thing.
 
i have no idea why, but it seems to want to work again. I dont think I did anything special. wow. anyways, Thanks for the help.
 
I was having the same problem. I went through my whole project and removed all the breakpoints, and then it seemed to work (or, at least I think that is what made it work). It is good to note that going to Run->Debug never seems to fail in launching the app, although not as convenient as the toolbar button.
 
Whenever it doesn't work, build it without launching then double-click on the app icon in the project window.

yea i was doing that, but that isnt a fix, just a lame work around. I mean come on, this isnt windows now, things should work as theyre supposed to. plus, doing it that way doesnt output anything to the console. so if you have things going out to the console for debugging purposes, it wont work.
 
In Instruments, or in the terminal, just run a trace on the executable. See what comes out of stderr.

AFAIK it's a bug in 3.1, not something to do with the debugger or anything else. I had this problem the other day and just launched the app manually.
 
Application Build and Go

I've had very similar experiences since I installed beta 4 (I've been using beta 1 since it came out and never had this problem). As an experiment, I've managed to get a sample set of projects to build and run consistently if I start a new project from within Xcode 3.1 beta 4 rather than open a project created with an earlier version.

Edit: Actually scratch that - After 50+ test builds of new projects I now get mixed results for both new and old projects - so much for empirical data!
 
what seems to be working for me when i get that problem, is setting a breakpoint somewhere will cause the app to open. also sometimes the breakpoints seem to be overridden by Xcode? after setting the breakpoints Ill run the program, and the breakpoints will turn orange and wont do anything. the app will go on as if they were never there? anyone else have that problem? If I restart my comp. it will usually go back to working correctly.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.