On Feb 3, 2010, at 8:30 AM, McLaughlin, Michael P. wrote:

but their own. I have to pass these filled structures back to the main
thread upon completion.  The last thing each thread does is
postNotificationName to the main thread saying that it is ready to return
lots of data which it does via an NSPointerArray
[ptr pointerArrayWithStrongObjects]
and dictionary.  The object which collects the results has a function
getOpResults() which accesses the passed pointer.

My hunch is that the data is sometimes being freed/dealloced before it gets to the main thread. Take a careful look at the memory and refcount management in the code. (Are your data values objects or just structs? You say they're structures, and you're using NSPointerArray, but callijng +pointerArrayWithStrongObjects implies you're putting objects in the array.)

Setting the environment variable MallocScribble can help catch bugs that access freed memory. It causes free() to fill blocks with 0x55 before freeing them, which often causes a crash when something tries to use the freed memory later on.

—Jens_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to