Bug #167

ResetAlarm command of Alarms cluster

Added by Han Alink over 5 years ago. Updated over 5 years ago.

Status:Closed Start date:10/29/2012
Priority:Lowest Due date:
Assignee:Stefano Lenzi % Done:

100%

Category:zigbee.zcl.library Spent time: -
Target version:org.aaloa.zb4osgi.zigbee.zcl.library-1.X
Has a patch:No Has license agreement signed:No

Description

The following exception is thrown when issuing this command with the values 1 for both integers.

==== Action:: Alarms.resetAlarm ====
[1, 1]
----------- result ----------
java.lang.ArrayIndexOutOfBoundsException: 2
at it.cnr.isti.primitvetypes.util.Integers.writeShort(Integers.java:273)
at it.cnr.isti.zigbee.zcl.library.impl.core.DefaultSerializer.append_short(DefaultSerializer.java:155)
at it.cnr.isti.zigbee.zcl.library.impl.general.alarms.ResetAlarmCommand.getPayload(ResetAlarmCommand.java:52)
at it.cnr.isti.zigbee.zcl.library.impl.core.ZCLFrame.<init>(ZCLFrame.java:52)
at it.cnr.isti.zigbee.zcl.library.impl.core.ZCLClusterBase.invoke(ZCLClusterBase.java:99)
at it.cnr.isti.zigbee.zcl.library.impl.core.ZCLClusterBase.invoke(ZCLClusterBase.java:95)
at it.cnr.isti.zigbee.zcl.library.impl.general.AlarmsCluster.resetAlarm(AlarmsCluster.java:199)
at it.cnr.isti.zigbee.ha.cluster.impl.AlarmsImpl.resetAlarm(AlarmsImpl.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Associated revisions

Revision 574
Added by Stefano Lenzi over 5 years ago

Added test unit for ResetAlarmCommand
Using ByteArrayOutputSerializer instead of DefaultSerializer ( fixes #167 )

Revision 671
Added by Stefano Lenzi over 5 years ago

Missing enableDefaultResponse for resetAlarm() command which lead to NPE ( refs #167 )
Added JUnit for testing the resetAlarm behavior

History

#1 Updated by Stefano Lenzi over 5 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Applied in changeset r574.

#2 Updated by Stefano Lenzi over 5 years ago

  • Category set to zigbee.zcl.library
  • Status changed from Closed to Resolved
  • Assignee set to Stefano Lenzi
  • Priority changed from Normal to Lowest
  • Target version set to org.aaloa.zb4osgi.zigbee.zcl.library-1.X

Issues should be fixed r574, please test it and close the ticket if it works

#3 Updated by Han Alink over 5 years ago

Now a nullpointer exception is thrown: ==== Action:: Alarms.resetAlarm ====
[1, 1]
----------- result ----------
java.lang.NullPointerException
at it.cnr.isti.zigbee.zcl.library.impl.core.ResponseImpl.<init>(ResponseImpl.java:52)
at it.cnr.isti.zigbee.zcl.library.impl.global.DefaultResponseImpl.<init>(DefaultResponseImpl.java:43)
at it.cnr.isti.zigbee.zcl.library.impl.general.AlarmsCluster.resetAlarm(AlarmsCluster.java:200)
at it.cnr.isti.zigbee.ha.cluster.impl.AlarmsImpl.resetAlarm(AlarmsImpl.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

#4 Updated by Stefano Lenzi over 5 years ago

  • Status changed from Resolved to Feedback

Can you check if the issue has been fixed?

#5 Updated by Han Alink over 5 years ago

No, this issue still exists as described above.

#6 Updated by Stefano Lenzi over 5 years ago

Fixed by adding request for Default Response to cluster server

Give it a try and close it if it works

#7 Updated by Stefano Lenzi over 5 years ago

  • Status changed from Feedback to Resolved

#8 Updated by Han Alink over 5 years ago

  • Status changed from Resolved to Closed

Fixed; I'm closing the issue.

Also available in: Atom PDF