None
Chris Pettitt
cpettitt at vidigiani.dyndns.org
Wed May 21 17:45:58 UTC 2003
When I try to run the following code, I get a "primitive has failed"
error:
Socket initializeNetwork.
acceptor _ Socket newTCP.
acceptor listenOn: 8000.
[
connection _ acceptor waitForAcceptUntil: (Socket deadlineSecs: 120).
connection ~= nil ifTrue: [
[Transcript show: 'Received Connection!'. connection close.] fork.
].
false.
] whileTrue.
acceptor close.
My question is: how do I debug a primitive error in Squeak? I would have a
lot better luck debugging this if I could find the C code, I am sure.
Thanks,
Chris
Here is the stack, for those interested:
VM: Win32 - Squeak3.4 of 1 March 2003 [latest update: #5170]
Image: Squeak3.5 [latest update: #5180]
Socket(Object)>>error:
Receiver: a Socket[destroyed]
Arguments and temporary variables:
aString: 'a primitive has failed'
Receiver's instance variables:
semaphore: a Semaphore()
socketHandle: nil
readSemaphore: a Semaphore()
writeSemaphore: a Semaphore()
primitiveOnlySupportsOneSemaphore: true
Socket(Object)>>primitiveFailed
Receiver: a Socket[destroyed]
Arguments and temporary variables:
Receiver's instance variables:
semaphore: a Semaphore()
socketHandle: nil
readSemaphore: a Semaphore()
writeSemaphore: a Semaphore()
primitiveOnlySupportsOneSemaphore: true
Socket>>primAcceptFrom:receiveBufferSize:sendBufSize:semaIndex:
Receiver: a Socket[destroyed]
Arguments and temporary variables:
aHandle: a ByteArray(16 94 73 70 0 0 0 0 248 96 11 0)
rcvBufSize: 8000
sndBufSize: 8000
semaIndex: 15
Receiver's instance variables:
semaphore: a Semaphore()
socketHandle: nil
readSemaphore: a Semaphore()
writeSemaphore: a Semaphore()
primitiveOnlySupportsOneSemaphore: true
Socket>>primAcceptFrom:receiveBufferSize:sendBufSize:semaIndex:readSemaIndex:writeSemaIndex:
Receiver: a Socket[destroyed]
Arguments and temporary variables:
aHandle: a ByteArray(16 94 73 70 0 0 0 0 248 96 11 0)
rcvBufSize: 8000
sndBufSize: 8000
semaIndex: 15
aReadSema: 16
aWriteSema: 17
Receiver's instance variables:
semaphore: a Semaphore()
socketHandle: nil
readSemaphore: a Semaphore()
writeSemaphore: a Semaphore()
primitiveOnlySupportsOneSemaphore: true
--- The full stack ---
Socket(Object)>>error:
Socket(Object)>>primitiveFailed
Socket>>primAcceptFrom:receiveBufferSize:sendBufSize:semaIndex:
Socket>>primAcceptFrom:receiveBufferSize:sendBufSize:semaIndex:readSemaIndex:writeSemaIndex:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Socket>>acceptFrom:
[] in Socket class>>acceptFrom:
BlockContext>>repeatWithGCIf:
Socket class>>acceptFrom:
Socket>>accept
Socket>>waitForAcceptUntil:
More information about the Squeak-dev
mailing list
|