Thanks for replying, I took your advice and did the switch to Xcode 6.2 and the 
10.10 base sdk, with 10.5 as the deployment sdk. It was not too painful. Then, 
I turned on all diagnostics in the scheme: scribble, guard edges, guard malloc, 
and zombies. At startup, I show a simple password dialog. After the dialog 
appears, and the app is doing nothing else (I have not entered a password yet), 
after about 10 seconds of idle we hit a breakpoint in libgmalloc.dylib.

This is a 32-bit app, running on 10.10.2. Why would this be happening? Any 
ideas? Thanks in advance!

GuardMalloc[Identity Finder-61163]: Failed to VM allocate 16384 bytes
GuardMalloc[Identity Finder-61163]: Explicitly trapping into debugger!!!

libgmalloc.dylib`breakIfDebugging:

#0 0x058f1942 in breakIfDebugging ()
#1 0x058f1e72 in GMmalloc_zone_malloc_internal ()
#2 0x058f0b88 in GMmalloc_zone_malloc ()
#3 0x058f0554 in GMmalloc ()
#4 0x92c022cc in CGEventCreateFromDataAndSource ()
#5 0x92c0213f in CGSDecodeEventRecord ()
#6 0x92c020d7 in event_datagram_handler ()
#7 0x92c0140d in CGSDatagramReadStream::dispatch_next_datagram() ()
#8 0x92c01103 in CGSDatagramReadStream::dispatch_datagrams() ()
#9 0x92c00efc in CGSDatagramReadStreamDispatchDatagramsWithData ()
#10 0x92c00c6b in CGSSnarfAndDispatchDatagrams ()
#11 0x92c0094e in CGSGetNextEventRecordInternal ()
#12 0x92c008b5 in CGEventCreateNextEvent ()
#13 0x96aed691 in PullEventsFromWindowServerOnConnection(unsigned int, unsigned 
char, __CFMachPortBoost*) ()
#14 0x96aed60e in MessageHandler(__CFMachPort*, void*, long, void*) ()
#15 0x94740101 in __CFMachPortPerform ()
#16 0x9473fff5 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#17 0x9473ff5e in __CFRunLoopDoSource1 ()
#18 0x94731370 in __CFRunLoopRun ()
#19 0x947306c6 in CFRunLoopRunSpecific ()
#20 0x9473052b in CFRunLoopRunInMode ()
#21 0x96ae42d8 in RunCurrentEventLoopInMode ()
#22 0x96ae3ee3 in ReceiveNextEventCommon ()
#23 0x96ae3e0c in _BlockUntilNextEventMatchingListInModeWithFilter ()
#24 0x91535229 in _DPSNextEvent ()
#25 0x91534a71 in -[NSApplication 
nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#26 0x91863bf5 in -[NSApplication _realDoModalLoop:peek:] ()
#27 0x918638af in -[NSApplication _doModalLoop:peek:] ()
#28 0x918a531e in -[NSApplication runModalSession:] ()

This is the code:

@implementation PasswordDialogController

- (id)init
{
self = [super init];
if (nil == self) {
return nil;
}

passwordDialogNib = [[NSNib alloc] initWithNibNamed:@"PasswordDialog" 
bundle:nil];

if (nil == passwordDialogNib) {
NSLog(@"Failed to load PasswordDialog.nib");
[self release];
return nil;
}

BOOL ok = [passwordDialogNib instantiateNibWithOwner:self topLevelObjects:nil];
if(!ok) {
NSLog(@"Failed to instantiate PasswordDialog");
}

return self;
}

@try {
PasswordDialogController* PasswordDialogControllerIns = [[self alloc] init];
if(PasswordDialogControllerIns) {
NSModalSession session = [NSApp 
beginModalSessionForWindow:[PasswordDialogControllerIns window]];
for (;;) {
if ((retVal = [NSApp runModalSession:session]) != NSRunContinuesResponse)
break;
}
[NSApp endModalSession:session];
}
}
@catch (NSException *exception) {
NSLog(@"passwordDialog: %@ %@", [exception name], [exception reason]);
}

@end

On Mar 25, 2015, at 6:37 PM, Quincey Morris 
<[email protected]<mailto:[email protected]>>
 wrote:

On Mar 25, 2015, at 07:38 , Michael Domino 
<[email protected]<mailto:[email protected]>> 
wrote:

On 10.10 we’ve been seeing a lot of random crashing.

… move to Xcode 6.2 on 10.10 … which I would like to do, but I need some good 
reasons for doing so.

You just said a really good reason for doing so. If crashing has “started” on 
10.10, that just means you’ve been unfortunately lucky prior to 10.10. (Unlike 
in the real world, the failure of bugs to show up is bad luck that you wish you 
didn’t have, not good luck.)

In a situation like this, where you have others holding you back, I’d suggest 
you simply propose taking 2-3 days to *try* switching a copy of the project to 
Xcode 6.2. If it goes well, all and good. If it turns into app redesign hell, 
just continue with the original project and Xcode 3.

It’s hard to predict, but the outcome is probably one of the extremes (it takes 
a couple of hours vs. it’s going to take weeks), and a day or two spent on 
finding out is not wasted. The most significant negative indicator is garbage 
collection. If your app uses it, there’s a good chance that a major** app 
redesign is needed, because you’ll have to devise strategies for preventing 
unwanted reference cycles in ARC.

Also, depending on the way the app is deployed, it’s not ridiculous to split 
the app permanently, with one version for 10.5+, and a new version for 10.10 
(or 10.9-10.10 or even 10.8-10.10, depending on which SDK you want to use). 
That leaves the old version to fade gracefully away over time.

FWIW.



** “Major” not so much in the sense of much code rewritten, but rather that 
very fundamental assumptions may have to be revised, causing outward spreading 
ripples.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to