-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Process exits when reopening port of removed USB stick without rediscovery #180
Comments
I just retested this issue with 5.2.0 @madhephaestus and it now throws the
Looks like the port isn't properly released. |
Since the workaround works reliably and does not have side effects, we can simply move it into the offending function.
Rather than hunt down where it should have been released, we could just move the workaround into the function? It seems the get identifiers refreshes the state of the known ports list so that the new method can complete. |
check with release 5.2.1 please? |
It seems to resolve this issue. 👍 I do notice if I repeat inserting/removing the USB stick, eventually issue #111 occurs and it is no longer possible to use the serial port unless I restart the application. |
lol, and the issue whack-a-mole continues, closing this one, reopening that one... |
Yes but it is certainly improving now the whole application doesn't exit and most of the time you can reinsert your USB stick and use it. 😉 |
When removing a USB stick the process exits when a port is reopened without first calling
CommPortIdentifier.getPortIdentifiers();
Here is a simple example to reproduce the issue with nrjavaserial 5.1.1 on Ubuntu 18.04:
If I don't uncomment the workaround it exits with the following output after unplugging the USB stick:
It works fine when uncommenting the workaround.
The text was updated successfully, but these errors were encountered: