Sonic-Amiga / org.openhab.binding.devireg

DeviReg binding for OpenHAB
27 stars 2 forks source link

The binding stopped working and crashes with the exception libopensdg #5

Open OlegKarasik opened 1 year ago

OlegKarasik commented 1 year ago

Hello,

Sorry for bothering you. But recently the binding stopped working and started to fail with the following fatal error:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0x7) at pc=0xd5204598, pid=204, tid=863
#
# JRE version: OpenJDK Runtime Environment Temurin-11.0.18+10 (11.0.18+10) (build 11.0.18+10)
# Java VM: OpenJDK Server VM Temurin-11.0.18+10 (11.0.18+10, mixed mode, g1 gc, linux-)
# Problematic frame:
# C  [libopensdg.so.1+0x4598]  receive_packet+0x35f
#
# Core dump will be written. Default location: /openhab/userdata/core
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid204.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/adoptium/adoptium-support/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

I reinstalled OpenHAB (though it would help). However, now when OpenHAB starts, I can access /danfoss page but when I start the pairing the above error is happening.

I would really appreciate any kind of hint what could be the reason.

Sonic-Amiga commented 1 year ago

Hello! Sorry for the delay, It's a very interesting problem, which only happens for you. No, they didn't change the protocol. On the other hand, by this time i switched away from using C code and rewrote the whole communication library in Java. It already works fine for me for about a year. Rock solid.

Please find the new release here https://github.com/Sonic-Amiga/org.openhab.binding.devireg/releases/tag/3.0-pre1

I have become very lazy recently; procrastinating and don't want to do anything at home. In fact rewriting the lib in Java is a part of my long-term effort to submit the binding upstream.

Sonic-Amiga commented 1 year ago

BTW, are you using the latest C library ? Would be still nice to know what the problem could be; i could look up the function, but i need exact library version.

OlegKarasik commented 1 year ago

Hello,

Thank you for a response!

Wow, it is amazing to see that you have rewrote everything in Java. Thank you for your tremendous effort in this binding and related libraries - without them, there were even not a chance to have these thermostats integrated.

--

I was using the latest C library (downloaded it from here: https://github.com/Sonic-Amiga/opensdg/releases/tag/1.0.3). I had a standard RPI OS installed, so I have downloaded the armhf version of both library and -jni. I tried to run the binding in both openhab installed as a package from repository and openhab as container. Initially everything was fine but then at some point it started to crush.