Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uwm.edu!ux1.cso.uiuc.edu!resnick From: resnick@cogsci.uiuc.edu (Pete Resnick) Newsgroups: comp.sys.mac.programmer Subject: Re: "MacTCP -- Duplicate IOC" user break in MacsBug? Keywords: MacTCP, MacsBug Message-ID: <1991Jun15.200045.23172@ux1.cso.uiuc.edu> Date: 15 Jun 91 20:00:45 GMT References: <1991Jun14.230640.1924@cec1.wustl.edu> Sender: usenet@ux1.cso.uiuc.edu (News) Distribution: usa Organization: University of Illinois at Urbana Lines: 28 jyp@wucs1.wustl.edu (Jerome Yvon Plun) writes: >My program crashes while executing a TCPRelease with a correct stream >(does what is expected of it until the TCPRelease). The crash is actually >a MacsBug break in MacTCP and the message "MacTCP -- Duplicate IOC" appears. >This crash happens just after a kAEQuitApplication event has been received >from the Finder, in the routine taking care of closing the current stream >connection (with TCPAbort) and releasing the stream (with TCPRelease). The TCPAbort is clearly the problem. I assume that you have created a TCP stream which has an outstanding asynchronous call on it. Remember that it is the *stream* you are aborting, not the parameter block. Sending a parameter block to the device manager which is already in the queue because a call has not yet completed is a definite no-no. You want to use a second parameter block to do the TCPAbort. The first parameter block will complete with connectionTerminated in ioResult. Any parameter block that does not have an outstanding asynchronous call on it can be used again. If you can't get this to work and want sample code, feel free to write to me and I will post it. pr -- Pete Resnick (...so what is a mojo, and why would one be rising?) Graduate assistant - Philosophy Department, Gregory Hall, UIUC System manager - Cognitive Science Group, Beckman Institute, UIUC Internet/ARPAnet/EDUnet : resnick@cogsci.uiuc.edu BITNET (if no other way) : FREE0285@UIUCVMD