OpenHAB 2.5.x crashes while access zwave serial port after update to java 8.0.261

After update from java 8.0.251 to java 8.0.261 OpenHAB 2.5.x crashes while accessing my zwave-usb-stick. when i disable the zwave-serial-controller-thin, everthing is fine (but zwave).

when i activate it again, then java generates an execption.

can anybody help me?

now i have downgraded my machine back to java 8.0.251 - now its working again. it seems to be a breaking change in the jre-environment for the zwave-binding 2.5.6…

sounds not good… :face_with_raised_eyebrow:

It might help if you provide the information about the exception?

I don’t think there were any changes. The serial library is not part of the binding - it’s part of OH. I suspect there’s possibly an issue with your configuration - if it was really a breaking change in 2.5.6 (which was released a month or so ago) I think others would also have reported this.

the problem comes with change of the jre - not with change of OH or the binding.

in the oh-log i can see following:

2020-07-17 22:20:30.293 [INFO ] [zwave.handler.ZWaveControllerHandler] - Attempting to add listener when controller is null
2020-07-17 22:20:44.026 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
java.lang.NullPointerException: null
	at org.openhab.binding.zwave.discovery.ZWaveDiscoveryService$1.run(ZWaveDiscoveryService.java:87) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_261]
	at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_261]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) ~[?:1.8.0_261]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[?:1.8.0_261]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_261]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_261]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_261]
2020-07-17 22:21:25.522 [INFO ] [zwave.handler.ZWaveControllerHandler] - Attempting to add listener when controller is null
2020-07-17 22:21:31.147 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller
2020-07-17 22:21:31.148 [INFO ] [ve.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.

The exception in the memory dump is ERROR 0x000005 (Access violation)

now i can not reproduce it, because i have downgraded to java 8_0_251 again.

On which of the many OSs supported by Java??

Which distribution of Java?

I doubt that there is an incompatibility with the ZWave binding and the JRE though - really - it’s very unlikely.

I think that probably there is an issue with configuration. This is a simple NPE - something isn’t right, but it’s not an issue with the JRE. I’d really need to see a full debug log to see what was happening though.

I have the same problem on Windows 10 Pro (64). get the following when start from command line.

A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000051a9804c, pid=13408, tid=0x0000000000002c7c

JRE version: Java™ SE Runtime Environment (8.0_261-b12) (build 1.8.0_261-b12)

Java VM: Java HotSpot™ 64-Bit Server VM (25.261-b12 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:

C:\openHAB2\userdata\hs_err_pid13408.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.

@Annero
Welcome
Please use code fences to make your post more readable here.

How to use code fences - Tutorials & Examples - openHAB Community

Can confirm exact same experience on a fresh install of OpenHAB on Win 10 Pro x64. Installed latest java (261) and get exception_access_violation when trying to use z-stick. Downgraded to 251 and now have no issues at all.

ok, i am not alone with this error. it seems to be an global issue with the zwave-binding and the newest jre-version of windows.

is somebody of the binding-developers able to take a look at this ?
i think, this should be fixed because in the next time more people will update their java-installations…

thanks.

Perhaps (likely?) is it a bug in that jre. Otherwise there would likely be other reports. I do not believe our Z-Wave developer uses Windows.

The issue seems to be with the serial driver rather than the binding, so I would assume this would impact other bindings as well.

with the actual build of ZULU it works…so i don’t think, that ist an issue of the serial-driver. may be a bug in the jre…

1 Like

I agree - the error may not be in the serial driver - it could be the JRE, and my comment is only based on what I see in the debug posted above. It shows that the error is thrown in the serial driver - the issue could be in the JRE - or the serial driver though, but it doesn’t seem to be something in the binding that I can do anything about.

ok. i use the uzb-stick from sigma-design. the driver-version is 0.0.4.0 from 06/10/2013.
on their website there is no newer driver :frowning:

perhaps with the next jre the problem is gone again…otherways it would be difficult to fix it i think…

OpenHAB uses a serial driver to communicate with all devices - this is what I’m talking about. Under this there may be other OS specific drivers possibly, but that’s another issue and not related to the uzb driver - I’m not even sure if that is used.

Or downgrade to an older, less buggy JRE

I also have had a similar experience. Installed OpenHab on a windows 10 machine using a 64-bit jdk. Exactly the same crash symptoms. I tried numerous versions of the 64-bit java environment provided by AdoptOpenJDK, all failed in a similar fashion. I finally got the idea of using a 32-bit version of Java. It solved the problem.

This is not a solution imho.

Complain to the developers of your Java 8 JRE of choice then.

OpenHAB 3 Milestone releases use Java 11 which is more current.