View Full Version : Error Loading
Feb 25, 2013, 09:42 PM
I just transferred my project between computers - from one running Xcode version 3.2.6 to one running version 4.6 (4H127). When running the program, I get a simple "Error loading" message. The main window appears to load ok visually, but everything is frozen. I can't even move the window. However, I can still access the main menu. The project compiles fine with no warnings. I am relatively new to Xcode 4. What could be causing this error? Let me know if I can provide any more information. (Since the error message is so terse, I can't think of any useful information.)
Feb 25, 2013, 10:57 PM
Well, try the usual stuff… First, trash the Xcode preferences and see if that helps. If not, try creating a new project and then copy all of the source code files, XIBs, and resources into that project (you'll probably have to do some reconfiguration of the project settings, but so much changed between Xcode 3 and 4 that you probably need to do that anyway).
You might also try opening up Console.app and see if there are any error messages being thrown up by Xcode in there.
Feb 26, 2013, 07:39 PM
Turns out the message was logged by one of my own classes (Doh! don't log vague messages), but the problem still remains and is not related to the message.
If I bypass the frozen window, and then escape back to it, everything works fine, and then freezes again when it loses focus. I also commented out the creation of the window and still had freezing problems (except the main menu is always accessible), so it may not be related to the window at all.
I exported the app to my old machine and it worked fine. Conversely, I exported the app from my old machine (using Xcode 3.2) and it still had problems on the new machine. So I don't think it is an Xcode problem.
New machine: Intel 2 (64-bit) Mountain Lion
Old machine: Intel (32-bit) Snow Leopard
I checked the console - nothing. I may recreate the project when I have more time, but I don't expect that to work because of the reason mentioned above.
Feb 26, 2013, 07:55 PM
Oops, I misread this originally and thought you were talking about a problem with loading the project in Xcode, not actually running the compiled program.
Not sure how to help you with this one. Step through your program with the debugger and see if it's getting into an infinite loop or something? Sprinkle printf statements around and see which ones get executed?
Did you do a full clean on your project after bringing it over to the new system?
Feb 26, 2013, 08:00 PM
I did do a full clean. I have had no luck finding the problem by tracing the program's execution so far.
Feb 26, 2013, 08:38 PM
I uncovered a strange artifact which is both in the program compiled on the new machine and old machine (while running on new machine). If the window loses focus everything freezes but the main menu. I can't even click on any app window showing. Except, if I move the mouse over to the left, at some point a double arrow cursor <-> will appear, and if I move to the left of that point and the cursor returns to normal, then I can click on another app window below to unfreeze things and bring that window up. :confused:
Feb 26, 2013, 08:50 PM
Aha! That double arrow <-> means something. If I click and drag when that appears, the unfrozen portion of the screen moves with it. In fact, I can click and drag towards the right until the <-> becomes <- and then my window is accessible on one side. This reminds me of something weird that showed up when I first migrated my project over. A control in my nib suddenly had a width of 10,001. I changed that, of course, but maybe there is something else funky.
Feb 26, 2013, 09:52 PM
It turned out to be "the case of the invisible window". Apparently, Snow Leopard doesn't allow a window with 0 alpha become key, but Mountain Lion does.