Bug #134

addGroupIfIdentifying Command

Added by Han Alink almost 6 years ago. Updated almost 6 years ago.

Status:Closed Start date:10/18/2012
Priority:Low 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

Trying to issue a addGroupIfIdentifying Command (with both parameters set) leads to a nullpointer exception.

The log as seen in the testerinterface window:

java.lang.NullPointerException
at it.cnr.isti.zigbee.zcl.library.impl.general.groups.AddGroupIfIdentyfingCommand.getPayload(AddGroupIfIdentyfingCommand.java:47)
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.GroupsCluster.addGroupIfIdentifying(GroupsCluster.java:94)
at it.cnr.isti.zigbee.ha.cluster.impl.GroupsImpl.addGroupIfIdentifying(GroupsImpl.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.persona.zigbee.tester.gui.Command.invoke(Command.java:68)


Related issues

blocked by Bug #139: Identify command Closed 10/18/2012
blocked by Bug #147: Groups, Scenes, and Alarms response were expecting Genera... Closed 10/22/2012

Associated revisions

Revision 527
Added by Stefano Lenzi almost 6 years ago

Added a new ZigBeeSerializer that automatically increase the payload ( it may have worst performance )
Fixed NPE with AddGroupIfIdentifyingCommand ( fixes #134 )

Revision 552
Added by Stefano Lenzi almost 6 years ago

Fixing NPE when setting non-numeric parameter ( refs #134 )
Added Test Case for matching similar issue

History

#1 Updated by Stefano Lenzi almost 6 years ago

  • Category changed from zigbee.tester to zigbee.zcl.library
  • Assignee changed from Francesco Furfari to Stefano Lenzi
  • Target version set to org.aaloa.zb4osgi.zigbee.zcl.library-1.X

#2 Updated by Stefano Lenzi almost 6 years ago

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

Applied in changeset r527.

#3 Updated by Stefano Lenzi almost 6 years ago

  • Status changed from Closed to Resolved

Han: Would you mind to close the ticket if it works for you?
(P.S.: Account with Users have the right to close ticket now)

#4 Updated by Han Alink almost 6 years ago

Cannot test because it is not possible to set a device in Identify mode. see ticket #139

#5 Updated by Han Alink almost 6 years ago

After setting the device in identify mode, issuing a addGroupIfIdentifying command with the 2 parameters leads to a nullpointer exception:

==== Action:: Groups.addGroupIfIdentifying ====
[10, test]
----------- result ----------
java.lang.NullPointerException: You can not append null data to a stream
at it.cnr.isti.zigbee.zcl.library.impl.core.ByteArrayOutputStreamSerializer.appendZigBeeType(ByteArrayOutputStreamSerializer.java:85)
at it.cnr.isti.zigbee.zcl.library.impl.general.groups.AddGroupIfIdentyfingCommand.getPayload(AddGroupIfIdentyfingCommand.java:58)
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.GroupsCluster.addGroupIfIdentifying(GroupsCluster.java:94)
at it.cnr.isti.zigbee.ha.cluster.impl.GroupsImpl.addGroupIfIdentifying(GroupsImpl.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.persona.zigbee.tester.gui.Command.invoke(Command.java:99)
at org.persona.zigbee.tester.gui.CommandActionPanel$1.actionPerformed(CommandActionPanel.java:97)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


#6 Updated by Stefano Lenzi almost 6 years ago

  • Status changed from Resolved to Feedback

It should be fixed now, I have also added a Test Unit for catching similar issue.

Please let me know

#7 Updated by Han Alink almost 6 years ago

Fixed.

#8 Updated by Han Alink almost 6 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF