CFMessagePort weirdness, szone_error, double-free?
CFMessagePort weirdness, szone_error, double-free?
- Subject: CFMessagePort weirdness, szone_error, double-free?
- From: Ben Weiss <email@hidden>
- Date: Sat, 27 May 2006 03:17:43 -0700
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:
This email sent to email@hidden