Skip to content

In case of HARDWARE_ERROR event serial.disconnect() never returns #197

Description

@mvalla

Hallo,
I am using 5.2.1 on Win 10 x64 and java 8 (1.8.0_172)
When I run:
https://github.com/NeuronRobotics/nrjavaserial/blob/master/test/src/test/ReadTest.java
in case of HARDWARE_ERROR event, serial.disconnect() never returns.
In fact if add:

System.out.println("Clean exit of hardware");
serial.disconnect();
System.out.println("after disconnect");

"after disconnect" is never printed.
Thread [RXTXPortMonitor(//./COM3)] is still running, and if I suspend it I get this stack:

RXTXPort.interruptEventLoop() line: not available [native method]	
RXTXPort.removeEventListener() line: 867	
RXTXPort.close() line: 1091	
NRSerialPort.disconnect() line: 153	
MySerialDisconnectTest.lambda$0(DataInputStream, NRSerialPort, SerialPortEvent) line: 42	
1740189450.serialEvent(SerialPortEvent) line: not available	
RXTXPort.sendEvent(int, boolean) line: 787	
RXTXPort$MonitorThread.run() line: 1628	

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions