Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 22, 2008, 02:38 PM   #1
kashmoney2006
macrumors regular
 
Join Date: Dec 2007
Build and Go not launching app in Xcode???

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.
kashmoney2006 is offline   0 Reply With Quote
Old Apr 22, 2008, 03:03 PM   #2
lee1210
macrumors 68040
 
lee1210's Avatar
 
Join Date: Jan 2005
Location: Dallas, TX
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
lee1210 is offline   0 Reply With Quote
Old Apr 22, 2008, 03:03 PM   #3
caveman_uk
Guest
 
caveman_uk's Avatar
 
Join Date: Feb 2003
Location: Hitchin, Herts, UK
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.
caveman_uk is offline   0 Reply With Quote
Old Apr 22, 2008, 03:06 PM   #4
Sayer
macrumors 6502a
 
Sayer's Avatar
 
Join Date: Jan 2002
Location: Austin, TX
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.
Attached Thumbnails
Click image for larger version

Name:	Picture 4.png
Views:	96
Size:	37.4 KB
ID:	113117  
__________________
Obama is a true statesman whose experience as a state senator, half-term US Senator & guest lecturer in a Constitutional Law class has fully prepared him to take control of our nuclear arsenal.-Me
Sayer is offline   0 Reply With Quote
Old Apr 22, 2008, 03:12 PM   #5
caveman_uk
Guest
 
caveman_uk's Avatar
 
Join Date: Feb 2003
Location: Hitchin, Herts, UK
Quote:
Originally Posted by Sayer View Post
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.
caveman_uk is offline   0 Reply With Quote
Old Apr 22, 2008, 03:38 PM   #6
lee1210
macrumors 68040
 
lee1210's Avatar
 
Join Date: Jan 2005
Location: Dallas, TX
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
lee1210 is offline   0 Reply With Quote
Old Apr 22, 2008, 03:54 PM   #7
kashmoney2006
Thread Starter
macrumors regular
 
Join Date: Dec 2007
Quote:
Originally Posted by caveman_uk View Post
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.

Quote:
Originally Posted by Sayer View Post
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.
kashmoney2006 is offline   0 Reply With Quote
Old Apr 22, 2008, 04:40 PM   #8
Thomas Harte
macrumors 6502
 
Join Date: Nov 2005
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.
Thomas Harte is offline   0 Reply With Quote
Old Apr 22, 2008, 04:43 PM   #9
kashmoney2006
Thread Starter
macrumors regular
 
Join Date: Dec 2007
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.
kashmoney2006 is offline   0 Reply With Quote
Old Apr 23, 2008, 11:20 PM   #10
bridgeyman
macrumors member
 
Join Date: Mar 2008
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.
bridgeyman is offline   0 Reply With Quote
Old Apr 24, 2008, 11:00 AM   #11
Muncher
macrumors 65816
 
Muncher's Avatar
 
Join Date: Apr 2007
Location: California
Whenever it doesn't work, build it without launching then double-click on the app icon in the project window.
__________________
2.4Ghz 20" Rev. A iMac, Wii, crimson DS, intuos3 4x6, PS3
iPod touch 2G 16GB > Fiio E1 > Hifiman RE0
Muncher is offline   0 Reply With Quote
Old Apr 24, 2008, 02:37 PM   #12
kashmoney2006
Thread Starter
macrumors regular
 
Join Date: Dec 2007
Quote:
Originally Posted by Muncher View Post
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.
kashmoney2006 is offline   0 Reply With Quote
Old Apr 24, 2008, 03:53 PM   #13
yeroen
macrumors 6502a
 
yeroen's Avatar
 
Join Date: Mar 2007
Location: Cambridge, MA
In Instruments, or in the terminal, just run a trace on the executable. See what comes out of stderr.
__________________
all Jarvis, all the time
yeroen is offline   0 Reply With Quote
Old Apr 24, 2008, 04:43 PM   #14
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
Quote:
Originally Posted by yeroen View Post
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.
kainjow is offline   0 Reply With Quote
Old Apr 26, 2008, 01:40 AM   #15
Columbo X
macrumors member
 
Join Date: Jun 2007
Location: UK
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!

Last edited by Columbo X; Apr 26, 2008 at 05:39 AM. Reason: New info
Columbo X is offline   0 Reply With Quote
Old Apr 26, 2008, 01:16 PM   #16
kashmoney2006
Thread Starter
macrumors regular
 
Join Date: Dec 2007
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.
kashmoney2006 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
The App Store app thinks Xcode is installed, but I deleted Xcode. moonman239 Mac Applications and Mac App Store 3 May 6, 2014 05:53 PM
Xcode build target jmfel1926 Mac Programming 1 Mar 2, 2014 02:26 PM
Launching IOS 5.1 Simulator in XCode 4.4.1 crashes (tried direct start too) Varsuuk iPhone/iPad Programming 4 Sep 9, 2012 02:04 AM
xcode build not possible, The timestamp service is not available. md11 Mac Programming 10 Jul 17, 2012 04:45 AM
Xcode 4.5 Replaces Public Build? drummerdude1390 iOS 6 0 Jun 11, 2012 04:26 PM

Forum Jump

All times are GMT -5. The time now is 05:53 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC