Skip to content

IZoneMinderMonitor.getLastEvent() throws ArrayOutOfBoundsException #1

@HentschelT

Description

@HentschelT

While testing with a (previously not tested) ZM monitor in the OHAB2 binding, I encountered a

ArrayOutOfBoundsException (-1)

indicating a invalid index into a list or array. The code line in question where this showed up for me is in

org.openhab.binding.zoneminder.handler.ZoneMinderThingMonitorHandler.onFetchData()
around line 850:
IZoneMinderEventData event = monitorProxy.getLastEvent();

I didn't delve into the lib to figure what's causing this, instead I just put a try/catch around the code in the OHAB2 ZM binding. Since the client code there is expecting a null response, I guess it's potentially safe to convert that exception into a null return.

One thing to note is that this particular ZM monitor isn't setup to record events.

Cheers,
-Th

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions