Z-Wave binding crashes under Windows 10

Since the core dump was ~7 minutes later, there does not seem to be a correlation between it and the zwave binding. This has happened more than once though, so maybe you have other logs?

SiLabs manufactured the chipset, so I suggest using their drivers.

This device is from zwave.me. Do you have any of their software installed? If so, remove it… it can’t be run at the same time as OH.

2 Likes

Your Java should be fine, it is recent enough.
I have a second ZMEEUZB1 stick for testing purposes (but no devices paired) and still a Windows installlation on a spare disk, although my main systems are all Linux based, esp. the production system running my OH installation. I’m not sure how I can help further here at the moment.

If I remember correctly, this problem occurs on recent versions of Java, so I think that your Java version is too new and I’d suggest changing to an older version 251 or older.

:-o I’ve read a lot about Java installations being too old but never too new. Every day there is something new to learn :wink:
Is this documented anywhere? As newer versions are pushed out all the time, more users might be affected by that.

My guess is there is some compatibility issue with the serial driver and the JVM. Check out this thread -:

4 Likes

Just checked my own system (Rpi, not Windows, though):

openjdk version “1.8.0_252”
OpenJDK Runtime Environment (Zulu 8.46.0.225-CA-linux_aarch32hf) (build 1.8.0_252-b225)
OpenJDK Client VM (Zulu 8.46.0.225-CA-linux_aarch32hf) (build 25.252-b225, mixed mode, Evaluation)

No issues so far

My Linux test environment runs fine with…

openjdk version "1.8.0_265"
OpenJDK Runtime Environment (build 1.8.0_265-b01)
OpenJDK 64-Bit Server VM (build 25.265-b01, mixed mode)

… so possibly just Windows or Windows driver and JVM.

1 Like

Yes, this only appears to bee a Windows issue (or windows driver?). I’m not sure if this issue still exists under Java 11 - hopefully not, but I’ve no way to test myself…

2 Likes

Sorry for the delayed answer, but I was not allowed to post more messages yesterday…

ALL MY THUMBS UP, YOU GOT IT!
Appreciate your contribution and sharing your experience. Many thanks, your hint was the solution!

I did not expect that downgrading the Java version might solve a problem, but it is. Have the 251 release installed, and it worked from the start.

4 Likes

I did a quick test yesterday evening, doing a (for me unfamiliar :wink: ) installation on Windows 10 Pro (20H2). The Sigma Designs UZB driver V0.0.4.0 was already installed from an earlier activity to get rid of two ghost nodes. I added an OpenJDK V11 and installed OH3 Milestone3.

openjdk version “11.0.9.1” 2020-11-04
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.9.1+1)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.9.1+1, mixed mode)

Installed the ZWave binding, added the controller as a thing and it came online, visible in the GUI and in the logs (logs from today with start_debug.bat):

2020-11-24 18:35:32.963 [INFO ] [me.event.ThingStatusInfoChangedEvent] - Thing 'zwave:serial_zstick:a8c645ff62' changed from UNINITIALIZED to INITIALIZING
2020-11-24 18:35:32.966 [INFO ] [me.event.ThingStatusInfoChangedEvent] - Thing 'zwave:serial_zstick:a8c645ff62' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
2020-11-24 18:35:41.411 [INFO ] [me.event.ThingStatusInfoChangedEvent] - Thing 'zwave:serial_zstick:a8c645ff62' changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to ONLINE
2020-11-24 18:38:30.457 [INFO ] [me.event.ThingStatusInfoChangedEvent] - Thing 'zwave:serial_zstick:a8c645ff62' changed from ONLINE to UNINITIALIZED
2020-11-24 18:38:31.402 [INFO ] [me.event.ThingStatusInfoChangedEvent] - Thing 'zwave:serial_zstick:a8c645ff62' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)

I have no devices included in this spare controller so I could not check further. But as I understood the issue was the initialization of the controller when OH starts. And this works with Java 11 and OH3 on Windows, as far as I see it.

1 Like

That’s great news - thanks for testing @stefan.oh.

1 Like

Hello everyone! I am developing another binding for my smart power meter and hit the very same issue. It’s an rxtx library bug. Searching yields many people hitting the ussue (https://stackoverflow.com/questions/52367920/rxtx-crashes-when-upgrading-from-java-8-to-java-10), but there seems to be no solution.
Nice to hear it works on v3, i will try

Small update: this thread https://marc.info/?l=rxtx&m=121548028219365&w=2 says the bug has been fixed. Strange, however, is that the message is from 2008. Is our rxtx version so ancient?

No - we use the latest (or very close to the latest) version. Given that this issue only occurs with some of the latest Java 8 JVMs under Windows 10, and older JVMs work ok, you’d have to say that any comment from 2008 does not relate to the same issue.

@chris Hello! I tried to play with it today and have the same problem.
First of all, i updated my 2.5.x repo to the latest version, it turned out to be 2.5.9 (my previous one was 2.5.1). The crash is well reproducible there. I also tried sonyprojector binding (the one i’m looking at to see how to use serial port in OH), it also crashes.
Just FYI, the crash message is:
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000077ea804c, pid=2364, tid=0x0000000000001298
#
# JRE version: Java™ SE Runtime Environment (8.0_271-b09) (build 1.8.0_271-b09)
# Java VM: Java HotSpot™ 64-Bit Server VM (25.271-b09 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [libNRJavaSerial.dll+0x804c]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# D:\Projects\openhab-2-5-x\git\openhab-distro\launch\app\target\tmp\LAUNCH\app\hs_err_pid2364.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

My question now is: what does “java 8” or “java 10” mean? The 2.5.x convention is to use “javaSE-1.8”. What’s the connection between 8 and 1.8 ? If i am using a wrong Java version, where to get a correct one? My install comes from https://www.java.com/en/download/

You need a JDK version 251 or older for Windows. You are running a JRE version 271.

Ok, thanks for hint. By the way, what’s the difference between JRE and JDK? Except the JDK comes with development tools. Why is it so critical?
In my understanding a developer would have JDK while users would have JRE, so from the running point of view they should be the same, shouldn’t they ?
Meanwhile i tried to simply change the runtime version in a dumb way and just switched the app.bndrun to use JaveSE-11. And it crashed in the same manner, reporting " JRE version: OpenJDK Runtime Environment (14.0.2+12) (build 14.0.2+12-46)" as version.

Resolved the problem by:

  1. Downloading older JDK 1.8.0_251 from archive.org
  2. Removing my newer JRE from preferences->installed JREs, otherwise “JavaSE-1.8” always chooses it for some reason.

Damn, to tell the truth i already hate Java for pretending that the environment is smarter than the developer is. :frowning: