Skip to content
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

nrjavaserial crashes Java 11 JVM on Windows #1384

Closed
wborn opened this issue Mar 1, 2020 · 5 comments · Fixed by #1426
Closed

nrjavaserial crashes Java 11 JVM on Windows #1384

wborn opened this issue Mar 1, 2020 · 5 comments · Fixed by #1426
Labels
bug An unexpected problem or unintended behavior of the Core
Milestone

Comments

@wborn
Copy link
Member

wborn commented Mar 1, 2020

The whole JVM crashes on Windows when using nrjavaserial as RXTX implementation with Java 11.

We must not forget to integrate a fix for this or OH3 releases might not be very usable on Windows.

See also:

@wborn wborn added the bug An unexpected problem or unintended behavior of the Core label Mar 1, 2020
@kaikreuzer
Copy link
Member

Hooray, nrjavaserial 4.0.0 has been released!
@wborn I am almost sure that you already started testing it 😉.

@wborn
Copy link
Member Author

wborn commented Apr 7, 2020

Yes that's good news! However it looks like the branch that was used to create it didn't contain all commits that were already on the master branch. So it's missing ARM64 support, named threads and the fix for the IllegalMonitorState. :-/

@kaikreuzer
Copy link
Member

Then you should quickly ask for a 4.0.1 as long as he is around!

@wborn
Copy link
Member Author

wborn commented Apr 8, 2020

The 4.0.1 version has all commits, but it seems unusable because of a manifest issue NeuronRobotics/nrjavaserial#158.

@wborn
Copy link
Member Author

wborn commented Apr 14, 2020

To summarize the current state:

The errors for instance show when a serial connection is open and when the UI then gets the details of a thing type having a serial-port context config param using the REST API (http://localhost:8080/rest/thing-types/plugwise:stick in my case).

I hope the issue is fixed upstream so we can finally ditch our own build.

wborn added a commit to wborn/openhab-core that referenced this issue Apr 14, 2020
Updates nrjavaserial to the official 3.20.0 release (compatible with Java 8/11).
With the upgraded version the library will no longer crash the Java 11 VM on Windows.
The native libraries now use the built in RXTX lockfiles instead of the previously used (OS dependent) liblockdev whereas the OH build didn't use any lockfiles at all.
It also has a fix for errors being printed when scanning for serial ports whenever a serial port is locked (NeuronRobotics/nrjavaserial#166).
With the new version RXTX threads also have proper names and there is a fix for an IllegalMonitorStateException that might occur when closing ports.

Fixes openhab#1384

Signed-off-by: Wouter Born <[email protected]>
cweitkamp pushed a commit that referenced this issue Apr 15, 2020
Updates nrjavaserial to the official 3.20.0 release (compatible with Java 8/11).
With the upgraded version the library will no longer crash the Java 11 VM on Windows.
The native libraries now use the built in RXTX lockfiles instead of the previously used (OS dependent) liblockdev whereas the OH build didn't use any lockfiles at all.
It also has a fix for errors being printed when scanning for serial ports whenever a serial port is locked (NeuronRobotics/nrjavaserial#166).
With the new version RXTX threads also have proper names and there is a fix for an IllegalMonitorStateException that might occur when closing ports.

Fixes #1384

Signed-off-by: Wouter Born <[email protected]>
@wborn wborn added this to the 3.0 milestone Oct 6, 2020
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this issue Jul 11, 2023
Updates nrjavaserial to the official 3.20.0 release (compatible with Java 8/11).
With the upgraded version the library will no longer crash the Java 11 VM on Windows.
The native libraries now use the built in RXTX lockfiles instead of the previously used (OS dependent) liblockdev whereas the OH build didn't use any lockfiles at all.
It also has a fix for errors being printed when scanning for serial ports whenever a serial port is locked (NeuronRobotics/nrjavaserial#166).
With the new version RXTX threads also have proper names and there is a fix for an IllegalMonitorStateException that might occur when closing ports.

Fixes openhab#1384

Signed-off-by: Wouter Born <[email protected]>
GitOrigin-RevId: 66da3a7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants