Closed pLeminoq closed 3 years ago
Is this always reproducible? Otherwise, can you offer any stack traces?
This is always reproducible. Here is a stack trace:
java.lang.NullPointerException: null at org.openbase.bco.dal.remote.layer.unit.AbstractUnitRemote.addServiceStateObserver(AbstractUnitRemote.java:274) at org.openbase.bco.app.openapiserver.spring.UnitApiController.getUnitEvents(UnitApiController.java:148) at org.openbase.bco.app.openapiserver.spring.UnitApiController$$FastClassBySpringCGLIB$$51721e62.invoke()
Thanks for the report, both issue has been addressed. There is an InvalidStateException thrown In case the service state is not supported. If the service type is declared as UNKNOWN, then all available service states are observed. Please close issue if everything is working like you expected.
There are currently two issues that can lead to a null pointer exception if a service state observer is added to a unit: