Mailing Lists: Apple Mailing Lists

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

CFMessagePort weirdness, szone_error, double-free?



I have a simple IPC server app, and it's generating the following error, deep inside RunApplicationEventLoop():

SSFilterServer(1716) malloc: *** error for object 0x317810: double free
SSFilterServer(1716) malloc: *** set a breakpoint in szone_error to debug


This is odd, in that szone_error is never called. (I finally had to set a breakpoint in malloc_printf to get it to break.) This warning message should be updated.

Also, the application event loop does absolutely nothing (or at least, nothing custom). The double-free happens after every IPC call into the app; the IPC entrypoint itself is just a placeholder and doesn't allocate or free anything, that I'm aware of. Any idea what could be causing the double-free?

Finally, I based my code on the Carbon CFMessagePort code from Apple's dev site:

http://developer.apple.com/documentation/Cocoa/Conceptual/ Multithreading/articles/SocketComm.html#//apple_ref/doc/uid/ TP40001479-BAJDDJGB

That page contains a function, MainThreadResponseHandler(), that is supposed to return a CFDataRef, but the sample code returns nothing. (XCode gives a warning.) For now I'm just returning the CFDataRef that's passed in... Is there a "correct" way to handle this?

Thanks,
Ben
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to 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.