Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Window-server access bug in parallel programming ... ?




On Nov 4, 2007, at 6:12 PM, Jay Reynolds Freeman wrote: [...]
What I see is a failure in thread zero of my app -- that's the one
where GUI I/O is done, always deep inside a display or displayIfNeeded
of my main window.  The actual crash is an EXC_BAD_ACCESS with
code KERN_PROTECTION_FAILURE in a function called szone_free, in
libSystem.B.dylib.

Crashes in szone_free() tend to be due to memory corruption. Occam's razor
says there is a memory smasher somewhere in your code, a malloc/free usage
error and/or a race leading to one of those.


[...]
So I am wondering if failure to open this Mach port (I don't know what
it is actually for, by the way) is in some way causing this extremely
rare failure.

It's quite unlikely.

If anyone is still reading, do you have a sense of whether I am on
the right track? Any ideas for a fix? Any ideas for how to instrument
and test to see if I can better understand what is going on?

I'd look for the usual malloc debugging tools (Guard Malloc, various malloc options found in man malloc). Run your code with those debugging help enabled.

[Off topic for the list] Launching multiple copies of an OS X application
is rarely a good idea. If possible, I'd recommend one UI process and
multiple UI-less processes. But that's not relevant to Darwin-Dev.


  Eric

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: fcntl questions (From: Terry Lambert <email@hidden>)
 >Window-server access bug in parallel programming ... ? (From: Jay Reynolds Freeman <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.