HELP: Socket Notification Sink Error Being Generated By Windows
SYMPTOMS
Windows randomly generates a "Socket Notification Sink"
error and aborts the program or waits to shutdown the computer.
CAUSE
There is not a lot of specific information available as to why Window's will
sometimes generate this error so we will relate our personal experience concerning
this event. Individuals finding additional information concerning this
matter can forward the information to support@apteryx.com
so that we can update this record.
In our experience, this error can be generated by utilizing sockets in secondary
threads and is more commonly seen in threads invoked by applications running
as Window's services. This error is typically generated by the secondary
thread when creating or attaching socket handles to a socket class object while
more than one process is engaging in network communications at the same time.
More specifically, the "Socket Notification Sink" error actually
relates to a failed window creation for use by a MFC socket class object. Since
the MFC socket classes actually create and utilize a window to control the
MFC socket object, failure to generate this window results in a detrimental
application error. This windows generation failure is more commonly seen
in Window's services since they typically have restricted UI creation rights
(even if the service has the "interact with desktop" attribute).
RESOLUTION: Programmers
To date, the only resolutions to this problem have been the following:
- Rewrite the application/thread/service
so that it only opens a socket at the beginning of execution. The
more times you create or even bind a socket, the greater the chance you
will have of generating this error.
- Rewrite the application
to utilize the socket layer directly and remove all instances of the MFC
derived socket classes.
- Recompile your application using VC.NET. Apteryx has received reports
that recompiling the project under VC.NET has helped correct the problem
with MFC derived socket classes (thanks Ramasubramanian J).
RESOLUTION: computer users
To date, there have been several steps that have reduce the frequency of
the error or have eliminated it altogether. The following steps are ordered
in the frequency in which they seem to have corrected the sink error. Please
note that that several of the following steps are advanced and
may result in creating problems
if performed by users not skilled at working with computers. Apteryx
takes absolutely no responsibility for any problems that may result by following
the advice presented in this documentation.
- Update the application or service that is generating the error. Depending
on how the sink error is generated, you may or may not be able to determine
which application
or service generated the problem.
- If the previous step does not correct the error (of the application/service
could not be determined) then update your computer's NIC device drivers and
any other network adapter drivers
you may
have on
your
computer
(be sure
to include
any
"internet service provider” software
that may be active on the computer). For more information on updating
device drivers, please refer to Window's online help about using the Device
Manager or consult the documentation that came with your hardware.
- If the previous step does not correct the error then check the TCP/IP
setup of the computer and make sure that it is installed and properly configured.
- If the previous step does not correct the error then look
at the services installed and running on your computer and update as
many of those as possible. These services may be located either under Computer
Management or Services in your Start menu.
- If the previous step does not work:
download and save the latest NIC driver updates on your computer somewhere;
go into Computer
Management or Device
Manager and
remove the NIC/network devices from the hardware list (if it asks you if
you want
to uninstall anything say Yes); close down and turn off your computer;
physically remove your NIC/network hardware; reboot your computer;
reinstall the drivers for the hardware (even though the hardware is not plugged
in);
shut down and turn off your computer; plug your network hardware back
in; power back on your computer and follow the steps in the new hardware
detected wizard.
- If all else fails, remove your current network hardware (both from
the device manager and the physical hardware from the computer) and
purchase a new NIC card (we recommend that you stick with a larger manufacturer).