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

darkpaw

macrumors 6502a
Original poster
Sep 13, 2007
760
1,451
London, England
I installed Xcode 3.1 and the iPhone SDK beta 1 when it was released. I had no problems with it.

Apple released beta 2 the other day and I installed that over the top of the previous install.

Since then - on both a new 2.8GHz 8-core Mac Pro (Early 2008) and a 2.6GHz C2D 17" MBP SR (Nov 2007) - the iPhone simulator will sometimes fail to launch.

When this happens, GDB (the debugger) says it failed to launch the simulator, then I'll be unable to launch ANY application as I get a -10810 error from the Finder. Applications already running continue to run but I can't start any new processes.

Once that happens, it's about 20 seconds before everything disappears and I'm thrown back to the login screen.

No other software has been installed on these machines other than whatever security updates Apple released, and the new firmware for the Mac Pro. (Given that this is seen on the MBP as well, the firmware cannot have been the cause.)

Any ideas?

Here's what the Console says:
Code:
30/03/2008 15:57:29 [0x0-0x2a02a].com.apple.Xcode[502] Xcode(502,0xb0103000) malloc: free_garbage: garbage ptr = 0x37f08f0, has non-zero refcount = 1 
30/03/2008 15:57:56 Xcode[502] !!! _NSGlyphTreeInsertGlyphs invalid char index 
30/03/2008 15:57:56 Xcode[502] !!! _NSGlyphTreeSetIntAttributeForGlyphAtIndex invalid glyph index 54471

I'm definitely freeing memory as and when necessary, but I can't see how that might crash the entire system?!
 

digitoxin

macrumors newbie
Mar 30, 2008
3
0
ditto, same problem for me, and this is after a fresh OS install.

i can open the simulator if my code isn't buggy, but after a few times of my app crashing Aspen, Aspen will fail to load, and the whole OS crashes.

I'm running a mac mini 1.66GHz core duo, 2GB RAM with OS 10.5.2
 

darkpaw

macrumors 6502a
Original poster
Sep 13, 2007
760
1,451
London, England
...after a few times of my app crashing Aspen, Aspen will fail to load, and the whole OS crashes.

I'm running a mac mini 1.66GHz core duo, 2GB RAM with OS 10.5.2
Are you using beta 1 or 2 of the SDK? Apple renamed the Aspen Simulator to iPhone Simulator in beta 2.

Glad (if that's the right word) to see it's not just me experiencing this annoyingly serious error.

Every time it crashes, I send the crash report to Apple. Hopefully, someone's going to pull their finger out and fix this.
 

darkpaw

macrumors 6502a
Original poster
Sep 13, 2007
760
1,451
London, England
I think something is changing permissions when this happens. This might explain why we can't launch applications afterwards.

When the iPhone Simulator fails to launch, this is the start of it. At that point, there are loads of those messages in the Console.

If iTunes is playing something at the time, and you quit Xcode, the Finder will throw you out to the login screen, but iTunes is still playing your music.

When you login again, iTunes cannot load the library because it's locked by another user or process.

I let Disk Utility repair permissions - something I had done last night, too. This time though, the following appeared:
Code:
Repairing permissions for "X"
Permissions differ on "private/var/log/secure.log", should be -rw------- , they are -rw-r----- .
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/frontline.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/frontline.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/indicator_large.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/indicator_large.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/indicator_medium.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/indicator_medium.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/indicator_medium_simple.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/indicator_medium_simple.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/indicator_small.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/indicator_small.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/indicator_small_simple.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/indicator_small_simple.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/left1.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/left1.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/left2.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/left2.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/left3.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/left3.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/left4.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/left4.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/left5.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/left5.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/openinfinder.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/openinfinder.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/pileArrow.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/pileArrow.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/pileLeftArrow.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/pileLeftArrow.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/pileRightArrow.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/pileRightArrow.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/poof.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/poof.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/resizecursor.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/resizecursor.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/resizecursorv.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/resizecursorv.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/right1.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/right1.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/right2.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/right2.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/right3.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/right3.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/right4.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/right4.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/right5.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/right5.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/scurve-l.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/scurve-l.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/scurve-m.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/scurve-m.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/scurve-sm.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/scurve-sm.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/scurve-xl.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/scurve-xl.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/separator.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/separator.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/separatorstraight-horizontal.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/separatorstraight-horizontal.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/separatorstraight.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/separatorstraight.png", should be 0, group is 20.
User differs on "System/Library/CoreServices/Dock.app/Contents/Resources/shadow.png", should be 0, user is 501.
Group differs on "System/Library/CoreServices/Dock.app/Contents/Resources/shadow.png", should be 0, group is 20.
Group differs on "Library/PreferencePanes", should be 0, group is 80.
Permissions differ on "Library/PreferencePanes", should be drwxr-xr-x , they are drwxrwxr-x .
User differs on "System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/jvm.cfg", should be 0, user is 95.
User differs on "System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Libraries/classlist", should be 0, user is 95.
Group differs on "Library/Widgets", should be 0, group is 80.
Permissions differ on "Library/Widgets", should be drwxr-xr-x , they are drwxrwxr-x .
ACL found but not expected on "Library".

Permissions repair complete

This doesn't fix it, as I still have to reboot to do anything useful. I've submitted this to Apple.
 

pwnerer

macrumors newbie
Mar 31, 2008
2
0
I've had this issue as well - it started after Beta 2 and for me it seems to happen if you leave the simulator running and you try and run the app again.

This is really annoying, I've had to restart my machine many times today :mad:
 

csimoes

macrumors newbie
Apr 1, 2008
2
0
XCode 3.1 iPhone SDK update 2 (9A2151) causing my computer to crash too

I also installed the XCode 3.1 iPhone SDK update 2 (9A2151) on top of the original iPhone SDK, and ever since using XCode and the IPhone Simulator will cause my computer to lock up. It feels like Apple tried to rush out the interface builder, and didn't test this release enough. I am going to uninstall XCode all together and revert back to the original iPhone SDK, which I fortunatly still have.
 

ElNono

macrumors newbie
Apr 1, 2008
3
0
I had that problem once with Beta 1, but with Beta 2 it's more pronounced.
I noticed that when it happens, I can press the power key on the keyboard (the one that brings the Shutdown/Restart/Sleep dialog), and it will cause the Finder to restart and then I can launch apps again.
As far as I've been able to tell, it's launchd that's crashing and killing the system.

In other news, [NSUserDefaults] seems broken on this Beta 2 release. Anybody else noticed this too?
 

reformist

macrumors newbie
Jan 12, 2008
2
0
I had this problem all day today, and I think I've learned a few things about it. In my case, my iphone app was crashing the simulator. I was trying to debug it, so I had a frequent launch->crash cycle from within xcode. About 4 or 5 times after I'd launch the app and simulator, the simulator would fail to open.

If you have a terminal open when this happens, you can ls -alh and see that your files are not identified by the username, but instead by the user ID - usually 501 or 50x. You can't sudo -s, you can't ssh, you can't do jack. If you try to open system preferences and the like, you'll get a -10810 error.

It's as if OSX has lost your user information. What I think is happening is that the iphone simulator is crashing lookupd, which is responsible in OSX for name resolution of both internet addresses and usernames from IDs. The error is crippling: I don't think it's possible to restart lookupd without logging out and logging back in or doing a restart.

I suspected it might be my computer, but I was able to reproduce it in 10 minutes on a fresh macbook air with just the sdk installed. It's an awful, awful bug. I hope a fix is imminent.
 

mysticwhiskey

macrumors newbie
Mar 31, 2008
25
0
I had this problem all day today, and I think I've learned a few things about it. In my case, my iphone app was crashing the simulator. I was trying to debug it, so I had a frequent launch->crash cycle from within xcode. About 4 or 5 times after I'd launch the app and simulator, the simulator would fail to open.

I get the SDK crash too, where everything shuts down - reformist's situation sounds identical to mine.
 

yayaba

macrumors 6502
Apr 24, 2007
297
0
San Francisco Bay Area
Ugh, I thought I was the only one with this problem! I even posted in the main OSX forum. The problem drives me absolutely nuts when it happens.

So far today it's ok but a few days ago I was getting it after like a minute of using the simulator. I hope Apple fixes this soon... it makes programming almost impossible.
 

johnellisdm

macrumors member
Feb 21, 2007
50
0
i have had the problem as well...

i have noticed that if you log out as soon as you get the "simulator failed to start" message, then you can keep going without a restart. the weird thing is that the OS leaves all your stuff running as background? processes or something. for instance, i can see "firefox-bin" in the process list and firefox won't start until i kill that process.
 

yayaba

macrumors 6502
Apr 24, 2007
297
0
San Francisco Bay Area
i have had the problem as well...

i have noticed that if you log out as soon as you get the "simulator failed to start" message, then you can keep going without a restart. the weird thing is that the OS leaves all your stuff running as background? processes or something. for instance, i can see "firefox-bin" in the process list and firefox won't start until i kill that process.

That's what I do sometimes to make it better but I think if you do your system will be in a half messed up state. I start up Xcode and start coding again but I'll see it happen like 2 minutes later.
 

H3rbz

macrumors newbie
Apr 3, 2008
2
0
I'm experiencing this too sometimes, but what really frustrates me (and what I think might be related) is that using [NSUserDefaults standardUserDefaults] does not seem to access the simulators defaults, but rather my Macbook Pro's defaults.

This not only prevents me from testing Settings application extensions, but it might very well mess up my local user account's preferences.

Anyone have any thoughts on this? Am I doing something wrong when using NSUserDefaults or is the IDE/SDK to blame?
 

ElNono

macrumors newbie
Apr 1, 2008
3
0
I'm experiencing this too sometimes, but what really frustrates me (and what I think might be related) is that using [NSUserDefaults standardUserDefaults] does not seem to access the simulators defaults, but rather my Macbook Pro's defaults.

This not only prevents me from testing Settings application extensions, but it might very well mess up my local user account's preferences.

Anyone have any thoughts on this? Am I doing something wrong when using NSUserDefaults or is the IDE/SDK to blame?

This is what I noticed with NSUserDefaults:
1) In the Beta 1 SDK, the preferences used to be stored in ~/Library/Application Support/Aspen Simulator/User/Library/Preferences
2) In the Beta 2 SDK, each application has it's own storage. The files are available at: ~/Library/Application Support/iPhone Simulator/User/Applications/<The App UUID>/Library/Preferences
3) When you launch the Simulator from XCode, it uses a sandboxed environment (man sandbox), and that seems to be the culprit of why the NSUserDefaults are not loaded in that case. The NSUserDefaults do get saved and reloaded just as long as you don't quit the Simulator or relaunch your app from XCode. This basically makes NSUserDefaults testing useless.
4) When you launch the Simulator standalone, by double-clicking it, it is not sandboxed, and NSUserDefaults work as expected, even between Simulator sessions.

So there must be a bug somewhere with their sandboxing that's screwing up the NSUserDefaults loading while under XCode.
 

H3rbz

macrumors newbie
Apr 3, 2008
2
0
Thx ElNono, but ...

I'm not seeing any difference when launching the simulator directly. I did find out that my prefs are still found in: ~/Library/Application Support/iPhone Simulator/User/Library/Preferences and are indeed updated when using the Settings application. The application specific prefs dir is empty. If the Settings application is using the global prefs dir and the application is using it's own location, then the behavior I see would be explained and there is just a logic error in the environment.

I think I'm gonna start a fresh project, just to make sure the SDK+simulator updates, while working on the project, are not causing such conflicts. It makes sense that I don't get to my application's prefs, when there are none in the expected location.

The method I'm using to test this, btw, is by printing out the dictionaryRepresentation of the defaults and looking for my application specific keys...
 

steve1717

macrumors newbie
Jul 18, 2007
20
0
Issue Occurs with Beta 1

Using Beta 1, my Xcode keeps crashing (not the simulator) and the console cites:

4/3/08 2:44:23 PM Xcode[671] !!! _NSGlyphTreeSetIntAttributeForGlyphAtIndex invalid glyph index 85435

several times until:

4/3/08 2:44:23 PM Xcode[671] !!! Suppressing further NSGlyphTree logs

at that point I get the spinning beachball and am forced to Force-Quit Xcode.
 

mbpc2d.user

macrumors newbie
Apr 4, 2008
20
0
I'm having a problem I have not seen mentioned anywhere, I cannot get past the methods of classes, meaning if I try to change the background color of a view through initWithFrame I only get to self.b for self.backgroundColor then Xcode completely crashes, no warning or error codes of any sort. I thought maybe there is a code sense problem, but turning code sense off didn't help. So there's a new problem with the SDK, I'd report it to Apple, but I wouldn't know what to tell them.
 

brdgolf1

macrumors member
Jan 16, 2008
53
0
Beta 2, crash

I am also getting the Beta 2 crashes as well. However I do not wait for it to return nor do I restart the computer. All I need to do is logout and log back in and the problem goes away until the next time.
 

mbpc2d.user

macrumors newbie
Apr 4, 2008
20
0
Now I am just getting frustrated, I haven't made any progress in the last 5 hours, Xcode keeps crashing and I keep losing code. I am totally bummed.
 

GregX

macrumors newbie
Apr 4, 2008
10
0
SDK Beta2 Stability Issues

Same problem as everyone else, last week when I downloaded it It was driving me crazy. Run the simulator change some code re-run, was getting about 2 attempts before it would crash forcing me to restart the finder.

After about 1 hour I was doing my nut. Couple of times it completely froze my MBP and I had to turn off with the power button.

Beta 1 was really good for me, no issues - almost wish I'd kept the installer as this is driving me crazy.

Anyway after a little craziness I changed a few settings in XCOde and managed to get some stability, though I still get the same problems, however they are markedly less. Can now get about 30 minutes work done before each restart. It's not perfect but I guess this is beta for you :)

In Xcode the project settings (General) the base sdk was pointing at Device - IPhone SDK. After switching to the Simulator IPhone OS 2.0 it settled down a bit.

I don't know if this helps anyone but it made the beta 2 a little more usable.

Come on Apple sort it out, this is way below your usual standard.:apple:
 

maxjg

macrumors member
Aug 6, 2006
92
0
Add one more to the count. The needs to be fixed, right away. Getting tired of rebooting because of it.
 

yayaba

macrumors 6502
Apr 24, 2007
297
0
San Francisco Bay Area
Now I am just getting frustrated, I haven't made any progress in the last 5 hours, Xcode keeps crashing and I keep losing code. I am totally bummed.

I ran into some problems where I would type code and Xcode crashes. I got around it by typing jargon around the code, then deleting the jargon leaving just my code.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.