I get the following exception on application startup:
System.AccessViolationException
at System.Threading.Overlapped.get_iocbHelper()
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
That's the entire call stack. It only happens one in twenty runs right on application startup. I do use IOCompletion in my socket code. I assume it is related to that. However, why would this exception not show when I call Socket.ReceiveFromAsync
? I have a lot of sockets that simultaneously call ReceiveFromAsync
, but I don't call it twice on the same socket concurrently. Any ideas on the cause?