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

MacRobert10

macrumors 6502
Original poster
Nov 24, 2012
287
46
I'm trying to compile a simple application for OS X 10.6 (Leopard) using Xcode 7. This is more along the lines of a proof-of-concept test to see if it can be done, and apparently there's something I'm overlooking.

All the thing does is show a label, a text field, and a push button. If you fill in the text field and then hit the button the text in the text field is applied to the label.

Using Xcode 7 I set the target as follows:

  • Auto layout is disabled
  • Target is set at 10.6
  • ARC is disabled (using manual memory management)
  • It is not developer signed
The compiled program works as expected on El Capitan and Mountain Lion, and it will start running and run a few times under 10.6, but on 10.6 it will eventually crash. I re-did the build using Xcode 5 on Mountain Lion and once again, it works fine on the newer OSes but crashes on Snow Leopard. I'm figuring I missed a config setting somewhere.

Anyone know what I'm doing wrong???

FWIW, here's the log file of the crashed thread:

Code:
Thread 6 Crashed:
0   com.apple.CoreFoundation         0x00007fff84ece554 ___CFBasicHashFindBucket1 + 596
1   com.apple.CoreFoundation         0x00007fff84ed5a8e CFBasicHashFindBucket + 238
2   com.apple.CoreFoundation         0x00007fff84ed595b CFDictionaryGetValue + 139
3   com.apple.CoreFoundation         0x00007fff84f53e2b -[NSDictionary isEqualToDictionary:] + 331
4   com.apple.AppKit                 0x00007fff81c0c660 -[NSLayoutManager temporaryAttributesAtCharacterIndex:longestEffectiveRange:inRange:] + 198
5   com.apple.AppKit                 0x00007fff81c0b92b -[NSLayoutManager(NSPrivate) _drawBackgroundForGlyphRange:atPoint:parameters:] + 2570
6   com.apple.AppKit                 0x00007fff81bd2d33 -[NSTextView drawRect:] + 1802
7   com.apple.AppKit                 0x00007fff81be2f5d -[NSView(NSInternal) _recursive:displayRectIgnoringOpacity:inContext:topView:] + 1349
8   com.apple.AppKit                 0x00007fff81ccdc2e -[NSView(NSLayerKitGlue) drawLayer:inContext:] + 1230
9   com.apple.QuartzCore             0x00007fff88ea4910 CABackingStoreUpdate + 2427
10  com.apple.QuartzCore             0x00007fff88ea3baf -[CALayer _display] + 837
11  com.apple.AppKit                 0x00007fff81cbf3bd -[NSView(NSInternal) _recursiveDisplayViewsIntoLayersIfNeeded] + 139
12  com.apple.AppKit                 0x00007fff81cbf4ae -[NSView(NSInternal) _recursiveDisplayViewsIntoLayersIfNeeded] + 380
13  com.apple.AppKit                 0x00007fff81cbf4ae -[NSView(NSInternal) _recursiveDisplayViewsIntoLayersIfNeeded] + 380
14  com.apple.AppKit                 0x00007fff81cbf4ae -[NSView(NSInternal) _recursiveDisplayViewsIntoLayersIfNeeded] + 380
15  com.apple.AppKit                 0x00007fff81cbf0f1 -[NSView(NSLayerKitGlue) _drawRectAsLayerTree:] + 154
16  com.apple.AppKit                 0x00007fff81b5a01f -[NSView _drawRect:clip:] + 152
17  com.apple.AppKit                 0x00007fff81cdc8ef -[NSView _lightWeightRecursiveDisplayInRect:] + 624
18  com.apple.AppKit                 0x00007fff81cdca9c _lightWeightRecursiveDisplayInRect2 + 312
19  com.apple.CoreFoundation         0x00007fff84ee9d3e CFArrayApplyFunction + 222
20  com.apple.AppKit                 0x00007fff81cdc92f -[NSView _lightWeightRecursiveDisplayInRect:] + 688
21  com.apple.AppKit                 0x00007fff81cdc3b3 -[NSButtonCell(NSDefaultButtonIndicatorPrivate) heartBeat:] + 1476
22  com.apple.AppKit                 0x00007fff81cd9fde -[NSWindow(NSWindow_Theme) heartBeat:] + 282
23  com.apple.AppKit                 0x00007fff81be9057 -[NSUIHeartBeat _heartBeatThread:] + 698
24  com.apple.Foundation             0x00007fff8a48b114 __NSThread__main__ + 1429
25  libSystem.B.dylib                 0x00007fff83bb7fd6 _pthread_start + 331
26  libSystem.B.dylib                 0x00007fff83bb7e89 thread_start + 13

Thread 6 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x0000000000000001  rcx: 0x000000000000000c  rdx: 0x0000000000000009
  rdi: 0x00007fff7022e888  rsi: 0xa822aa0399c2b9a1  rbp: 0x0000000114d8c390  rsp: 0x0000000114d8c300
   r8: 0x00007fff822678ce   r9: 0x0000000000000000  r10: 0x00000001005d6a10  r11: 0x0000000114d8c3c0
  r12: 0x0000000000000003  r13: 0x0000000000000008  r14: 0x00007fff7022e888  r15: 0x0000000000000000
  rip: 0x00007fff84ece554  rfl: 0x0000000000010202  cr2: 0x0000000000000008
 
Last edited by a moderator:
I can think of one more thing to check. Make sure you're not using base internationalization, which is turned on when you create a new Xcode project in Xcode 5 and later. Base internationalization only works on 10.8 and later.

Select your project from the project navigator to open the project editor. Select the project from the project editor. Deselect the Use Base Internationalization checkbox.
 
I found the problem. The Core Animation Layer was selected on the View. How that got checked I don't know but getting rid of that plus all the normal stuff you have to do for 10.6 seems to have cleared up the problem. Thanks for the input anyway as I'm sure I'm not the only person that needs to do this (our marketing people tell us that about 8% of the Mac users are using Snow Leopard).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.