[zeromq-dev] SEHException when calling zmq_init from clrzmq

Tom Robinson Tom.Robinson at artesiansolutions.com
Tue Jun 19 18:39:33 CEST 2012

> As other pointed out, your -win64.exe version of zmq won't be helped by the redist package (x86). You should install the redist package for (x64) - e.g. -win64.exe

Sorry for any confusion around which redist package I'd installed. I originally installed the x64 version - I only tried the x86 version as well out of desperation :)

Anyway, I've made some progress. It seems that it's a win_assert triggering the exception in clrzmq. The redist version turned out to be a red herring.

File: signaler.cpp

int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
#if defined ZMQ_HAVE_EVENTFD
    // Create eventfd object.
    fd_t fd = eventfd (0, 0);
    errno_assert (fd != -1);
    *w_ = fd;
    *r_ = fd;
    return 0;
#elif defined ZMQ_HAVE_WINDOWS
    //  This function has to be in a system-wide critical section so that
    //  two instances of the library don't accidentally create signaler
    //  crossing the process boundary.
    //  We'll use named event object to implement the critical section.
    //  Note that if the event object already exists, the CreateEvent requests
    //  EVENT_ALL_ACCESS access right. If this fails, we try to open
    //  the event object asking for SYNCHRONIZE access only.
    HANDLE sync = CreateEvent (NULL, FALSE, TRUE, TEXT ("zmq-signaler-port-sync"));
    if (sync == NULL && GetLastError () == ERROR_ACCESS_DENIED)
      sync = OpenEvent (SYNCHRONIZE, FALSE, TEXT ("zmq-signaler-port-sync"));
    win_assert (sync != NULL);

Does anyone know why sync might be NULL? I am not a C++ programmer so be gentle :)

More information about the zeromq-dev mailing list