views:

85

answers:

1

Hi,

I tried switching architectures in my Xcode project today, because I was about to use low level QuickTime stuff that's not yet ported to 64 bit yet. When i compiled before on x86_64 my app ran just fine. Then i switched the arch to i386 and boom, my app keeps crashing on startup.

The weird thing is, the stack tracke has nothing to do with my own code.

#0  0x9929ebf1 in __CFBasicHashDeallocate
#1  0x99286ea1 in _CFRelease
#2  0x992b397d in _CFAutoreleasePoolPop
#3  0x917d1dda in NSPopAutoreleasePool
#4  0x92b67bc9 in loadNib
#5  0x92b66f99 in +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:]
#6  0x92b66eaa in +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:]
#7  0x92b66df5 in +[NSBundle(NSNibLoading) loadNibNamed:owner:]
#8  0x92b63bf9 in NSApplicationMain
#9  0x000023c8 in main at main.m:13

Any ideas?

+1  A: 

My guess is that you have created objects in the nib that are not safe in 32 bit mode. You might, for instance, be making assumptions about the size of some object that is not true, for instance, using a double instead of a CGFloat or a int64_t instead of an NSInteger.

JeremyP
any ideas how to narrow this issue down? i tried to step through my code with the debugger, but no usable results so far... couldn't find the point where it crashes.
Erik Aigner
Found it! the statement *[update setTitle:@"update available ➜"];* crashed it because i used a nonstandard symbol (the arrow).
Erik Aigner
@eaigner I would probably file a bug with Apple. It doesn't seem like the ➜ character should crash loading a nib. Can you simplify this down to a smaller test case (ie, just a label on the window or something)? Does it work if you `setTitle:` in code?
Dave DeLong
I'm sorry, figured it out now. The arrow just misled me because i was searching for some architecture specific stuff, but it was due to over-releasing in that very button subclass (sent an -autorelease to a NSDictionary that was created with the convenience allocator).Though wonder why this bug didn't show up in the x86_64 config.
Erik Aigner