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

Thethuthinang

macrumors member
Original poster
Jan 3, 2011
39
0
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.)
 

ytk

macrumors 6502
Jul 8, 2010
252
5
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.
 

Thethuthinang

macrumors member
Original poster
Jan 3, 2011
39
0
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.
 

ytk

macrumors 6502
Jul 8, 2010
252
5
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?
 

Thethuthinang

macrumors member
Original poster
Jan 3, 2011
39
0
I did do a full clean. I have had no luck finding the problem by tracing the program's execution so far.
 

Thethuthinang

macrumors member
Original poster
Jan 3, 2011
39
0
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:
 

Thethuthinang

macrumors member
Original poster
Jan 3, 2011
39
0
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.
 

Thethuthinang

macrumors member
Original poster
Jan 3, 2011
39
0
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.