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
JVM crash when hardware in use disconnected #67
Comments
Note: same issue in a non threaded execution way |
The crash-JVM-upon-USB-disconnect is has been an issue with RXTX for years (I ran into it in 2009 and 2010) and has never been properly addressed to my knowledge. It's the reason why I stopped using RXTX completely and migrated to PureJavaComm which does not have this issue.
I hope someone is able to fix this issue. |
The work around i have used for a long time for this is:
I have a consumer serial device i ship with this lib, and the use case of pulling it before disconnecting was a primary concern. I have never dived into the JNI to attempt to put this robustness into the place where the error occurs, but this workaround provides the expected results for my application. |
It's been several years since I was working with RXTX or NRJavaSerial, but from what I remember, this was possible in certain cases and not possible in others -- again, see http://marc.info/?l=rxtx&m=128896796230399&w=2. Low data rates (NOT baud rates -- you can have a 4.375Mbaud connection and only send a few hundred bytes per second if you want) made it easier to catch and recover; high data rates made it harder. There was a guy on the RXTX mailing list (Mariusz) that claimed he could always workaround the disconnect crash issue, but he was using low data rates and I was using high data rates. I was able to reproduce his method on low data rates, but unfortunately never got around to exploring in detail before I left my previous job along with my sample code. |
Using PureJavaComm solve my issue 👍 |
this issue resolved as part of #75 |
Dear NRJavaSerial devs,
We have an issue with NRJavaSerial library who crash our JRE (1.6.31-33, compulsory). This issue occurs on physical or virtual serial port (same behaviour).
Below a full sample to the our issue:
Now we test our hardware connected on a COM4 physical serial port:
JVM crash report:
The text was updated successfully, but these errors were encountered: