Skip to content

NullPointerException: Cannot invoke "zmq.IMailbox.send(zmq.Command)" because "this.slots[tid]" is null #983

Open
@inad9300

Description

@inad9300

Using version 0.5.4, after having interrupted a thread in which an open subscription was running, followed by calls to ZMonitor.close() and ZContext.close(), I got the following NPE (the first exception is to help understand the context):

Exception in thread "Thread-244" org.zeromq.ZMQException: Errno 4 : Interrupted function
        at org.zeromq.ZMQ$Socket.mayRaise(ZMQ.java:3732)
        at org.zeromq.ZMQ$Socket.recv(ZMQ.java:3530)
        at org.zeromq.ZMQ$Socket.recv(ZMQ.java:3502)
        ...
        at java.base/java.lang.Thread.run(Thread.java:840)

...

java.lang.NullPointerException: Cannot invoke "zmq.IMailbox.send(zmq.Command)" because "this.slots[tid]" is null
        at zmq.Ctx.sendCommand(Ctx.java:615)
        at zmq.ZObject.sendCommand(ZObject.java:410)
        at zmq.ZObject.sendPipeTermAck(ZObject.java:260)
        at zmq.pipe.Pipe.processPipeTermAck(Pipe.java:421)
        at zmq.ZObject.processCommand(ZObject.java:91)
        at zmq.Command.process(Command.java:79)
        at zmq.SocketBase.processCommands(SocketBase.java:1198)
        at zmq.SocketBase.inEvent(SocketBase.java:1365)
        at zmq.poll.Poller.run(Poller.java:276)
        at java.base/java.lang.Thread.run(Thread.java:840)

It is worth noting that this exception is a rare occurrence, having shown up only after many similar executions of the same code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions