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

[Openwebnet] Excepion in thread - java.lang.NullPointerException #17911

Open
dirkpitt74 opened this issue Dec 16, 2024 · 1 comment
Open

[Openwebnet] Excepion in thread - java.lang.NullPointerException #17911

dirkpitt74 opened this issue Dec 16, 2024 · 1 comment
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@dirkpitt74
Copy link

dirkpitt74 commented Dec 16, 2024

Hi,
after the upgrade from 4.1 to the next version (4.2 and now to 4.3) the system became unstable.
No error on log file but the journalctlreport a three excepion like this one:

dic 16 07:25:50 OpenHAB karaf[252239]: Exception in thread "Thread-190" java.lang.NullPointerException: Cannot invoke "Object.hashCode()" because "key" is null
dic 16 07:25:50 OpenHAB karaf[252239]:         at java.base/java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
dic 16 07:25:50 OpenHAB karaf[252239]:         at org.openhab.binding.openwebnet.internal.handler.OpenWebNetBridgeHandler.getRegisteredDevice(OpenWebNetBridgeHandler.java:440)
dic 16 07:25:50 OpenHAB karaf[252239]:         at org.openhab.binding.openwebnet.internal.handler.OpenWebNetLightingHandler.handleMessage(OpenWebNetLightingHandler.java:275)
dic 16 07:25:50 OpenHAB karaf[252239]:         at org.openhab.binding.openwebnet.internal.handler.OpenWebNetBridgeHandler.onEventMessage(OpenWebNetBridgeHandler.java:606)
dic 16 07:25:50 OpenHAB karaf[252239]:         at org.openwebnet4j.OpenGateway.lambda$onMessage$4(OpenGateway.java:189)
dic 16 07:25:50 OpenHAB karaf[252239]:         at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
dic 16 07:25:50 OpenHAB karaf[252239]:         at org.openwebnet4j.OpenGateway$1.run(OpenGateway.java:271)
dic 16 07:25:50 OpenHAB karaf[252239]:         at java.base/java.lang.Thread.run(Thread.java:840)
dic 16 07:25:50 OpenHAB karaf[252239]: Exception in thread "Thread-194" java.lang.NullPointerException: Cannot invoke "Object.hashCode()" because "key" is null
dic 16 07:25:50 OpenHAB karaf[252239]:         at java.base/java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
dic 16 07:25:50 OpenHAB karaf[252239]:         at org.openhab.binding.openwebnet.internal.handler.OpenWebNetBridgeHandler.getRegisteredDevice(OpenWebNetBridgeHandler.java:440)
dic 16 07:25:50 OpenHAB karaf[252239]:         at org.openhab.binding.openwebnet.internal.handler.OpenWebNetLightingHandler.handleMessage(OpenWebNetLightingHandler.java:275)
dic 16 07:25:50 OpenHAB karaf[252239]:         at org.openhab.binding.openwebnet.internal.handler.OpenWebNetBridgeHandler.onEventMessage(OpenWebNetBridgeHandler.java:606)
dic 16 07:25:50 OpenHAB karaf[252239]:         at org.openwebnet4j.OpenGateway.lambda$onMessage$4(OpenGateway.java:189)
dic 16 07:25:50 OpenHAB karaf[252239]:         at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
dic 16 07:25:50 OpenHAB karaf[252239]:         at org.openwebnet4j.OpenGateway$1.run(OpenGateway.java:271)
dic 16 07:25:50 OpenHAB karaf[252239]:         at java.base/java.lang.Thread.run(Thread.java:840)
dic 16 07:25:50 OpenHAB karaf[252239]: Exception in thread "Thread-195" java.lang.NullPointerException: Cannot invoke "Object.hashCode()" because "key" is null
dic 16 07:25:50 OpenHAB karaf[252239]:         at java.base/java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
dic 16 07:25:50 OpenHAB karaf[252239]:         at org.openhab.binding.openwebnet.internal.handler.OpenWebNetBridgeHandler.getRegisteredDevice(OpenWebNetBridgeHandler.java:440)
dic 16 07:25:50 OpenHAB karaf[252239]:         at org.openhab.binding.openwebnet.internal.handler.OpenWebNetLightingHandler.handleMessage(OpenWebNetLightingHandler.java:275)
dic 16 07:25:50 OpenHAB karaf[252239]:         at org.openhab.binding.openwebnet.internal.handler.OpenWebNetBridgeHandler.onEventMessage(OpenWebNetBridgeHandler.java:606)
dic 16 07:25:50 OpenHAB karaf[252239]:         at org.openwebnet4j.OpenGateway.lambda$onMessage$4(OpenGateway.java:189)
dic 16 07:25:50 OpenHAB karaf[252239]:         at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
dic 16 07:25:50 OpenHAB karaf[252239]:         at org.openwebnet4j.OpenGateway$1.run(OpenGateway.java:271)
dic 16 07:25:50 OpenHAB karaf[252239]:         at java.base/java.lang.Thread.run(Thread.java:840)

And after

dic 16 07:27:53 OpenHAB karaf[252239]: Exception in thread "Thread-1075" java.lang.NullPointerException
dic 16 07:27:53 OpenHAB karaf[252239]: Exception in thread "Thread-1079" java.lang.NullPointerException
dic 16 07:27:53 OpenHAB karaf[252239]: Exception in thread "Thread-1080" java.lang.NullPointerException
dic 16 07:28:24 OpenHAB karaf[252239]: Exception in thread "Thread-1317" java.lang.NullPointerException
dic 16 07:28:24 OpenHAB karaf[252239]: Exception in thread "Thread-1321" java.lang.NullPointerException
dic 16 07:28:25 OpenHAB karaf[252239]: Exception in thread "Thread-1322" java.lang.NullPointerException
dic 16 07:29:01 OpenHAB karaf[252239]: Exception in thread "Thread-1497" java.lang.NullPointerException
dic 16 07:29:01 OpenHAB karaf[252239]: Exception in thread "Thread-1502" java.lang.NullPointerException
dic 16 07:29:01 OpenHAB karaf[252239]: Exception in thread "Thread-1503" java.lang.NullPointerException
dic 16 07:30:01 OpenHAB karaf[252239]: Exception in thread "Thread-1778" java.lang.NullPointerException
dic 16 07:30:01 OpenHAB karaf[252239]: Exception in thread "Thread-1783" java.lang.NullPointerException
dic 16 07:30:01 OpenHAB karaf[252239]: Exception in thread "Thread-1784" java.lang.NullPointerException

After about a day the system became unstable and need a reboot.
No error reported in openhab log file. In journalctl I will find a lot of warning for a faliled thread start like this one:

dic 12 06:09:00 OpenHAB karaf[894]: [46351,181s][warning][os,thread] Failed to start the native thread for java.lang.Thread "OH-JsonStorage-20814"

Since it was impossible to access via web or ssh, I connected a monitor and a keyboard to the raspberry and with the service openhab status command I verified that the task limit had been reached.
It seems that tasks are opened but not closed correctly, occupying the resources assigned to the service.

I'm on OpenHAB 4.3.0 with only openwebnet and astro binding.
My system is a Raspberry Pi 5 with 8GB with boot from SSD.

If necessary I can perform further tests to narrow down the problem.
I await your instructions

Thank you.

Giovanni

@dirkpitt74 dirkpitt74 added the bug An unexpected problem or unintended behavior of an add-on label Dec 16, 2024
@lsiepel
Copy link
Contributor

lsiepel commented Dec 17, 2024

I can try to look at it tomorrow. The stacktrace should give some information for the NPE

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 an add-on
Projects
None yet
Development

No branches or pull requests

2 participants