openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.69k forks source link

Crash of plugin when removing the usb plug #3899

Closed jrcourtois closed 8 years ago

jrcourtois commented 8 years ago

Moved from https://github.com/openhab/openhab2-addons/issues/644

Obviously, you could say that I don't have to unplug it, but it can happens. I got this stacktrace

2016-01-26 11:06:15.212 [ERROR] [.opencean.core.EnoceanByteStreamPipe] - Error while reading from COM port. Stopping.
java.io.IOException: Device not configured in readByte
    at gnu.io.RXTXPort.readByte(Native Method)
    at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1286)[167:org.openhab.io.transport.serial:2.0.0.201601211059]
    at org.opencean.core.EnoceanByteStreamPipe.run(EnoceanByteStreamPipe.java:27)[166:org.openhab.binding.enocean:1.9.0.201601220210]
    at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]

The problem is when I re plug it, it is not working, and simply restarting the binding does not work. I have to restart the whole openhab.

steve-bate commented 8 years ago

@jrcourtois This looks like the exception is not caught by code in the opencean thread rather than in openhab, right? I'm not the Enocean maintainer but I'm wondering if this is an issue with a third-party library used to support the plugin.

jrcourtois commented 8 years ago

@steve-bate in fact, I am not totally aware about how the addons are working inside openhab. The fact is openhab show on its web page that enocean is featured, it may not be the case for openhab 2...

steve-bate commented 8 years ago

@jrcourtois Is this a problem only with openhab 2 or does it actually work in openhab 1?

jrcourtois commented 8 years ago

I won't be able to tell, as we decided to work with openhab 2 on our developpment we lose focus on enocean. I think, this is not a critical issue as nobody else seems to face it.

steve-bate commented 8 years ago

OK, I'll close the issue then. Thanks.