Android CHIPTool - Crash when interacting with clusters (groups & temperatureMeasurement)

I am seeing the Android CHIPTool crash when I send certain commands to clusters. I can read attributes from this cluster, and even send the removeAllGroups command.  The issue is with the AddGroup command in the groups cluster - Error output from android:

10-06 15:32:58.361 21352 21352 D AndroidRuntime: Shutting down VM
--------- beginning of crash
10-06 15:32:58.363 21352 21352 E AndroidRuntime: FATAL EXCEPTION: main
10-06 15:32:58.363 21352 21352 E AndroidRuntime: Process: com.google.chip.chiptool, PID: 21352
10-06 15:32:58.363 21352 21352 E AndroidRuntime: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
10-06 15:32:58.363 21352 21352 E AndroidRuntime: at chip.devicecontroller.ClusterInfoMapping.lambda$getCommandMap$70(ClusterInfoMapping.java:7709)
10-06 15:32:58.363 21352 21352 E AndroidRuntime: at chip.devicecontroller.-$$Lambda$ClusterInfoMapping$cIWpw-xlwNrySAuCbV94O7DtfOY.invokeCommand(Unknown Source:0)
10-06 15:32:58.363 21352 21352 E AndroidRuntime: at com.google.chip.chiptool.clusterclient.clusterinteraction.ClusterDetailFragment.setInvokeCommandOnClickListener$lambda-2(ClusterDetailFragment.kt:153)
10-06 15:32:58.363 21352 21352 E AndroidRuntime: at com.google.chip.chiptool.clusterclient.clusterinteraction.ClusterDetailFragment.lambda$L3VHqSpfGvBTNuxjIdwuacnYJ6Y(Unknown Source:0)
10-06 15:32:58.363 21352 21352 E AndroidRuntime: at com.google.chip.chiptool.clusterclient.clusterinteraction.-$$Lambda$ClusterDetailFragment$L3VHqSpfGvBTNuxjIdwuacnYJ6Y.onClick(Unknown Source:11)
10-06 15:32:58.363 21352 21352 E AndroidRuntime: at android.view.View.performClick(View.java:7288)
10-06 15:32:58.363 21352 21352 E AndroidRuntime: at android.view.View.performClickInternal(View.java:7258)
10-06 15:32:58.363 21352 21352 E AndroidRuntime: at android.view.View.access$4000(View.java:808)
10-06 15:32:58.363 21352 21352 E AndroidRuntime: at android.view.View$PerformClick.run(View.java:28019)
10-06 15:32:58.363 21352 21352 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:883)
10-06 15:32:58.363 21352 21352 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:100)
10-06 15:32:58.363 21352 21352 E AndroidRuntime: at android.os.Looper.loop(Looper.java:214)
10-06 15:32:58.363 21352 21352 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7615)
10-06 15:32:58.363 21352 21352 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-06 15:32:58.363 21352 21352 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
10-06 15:32:58.363 21352 21352 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)

It seems that any command that has a parameter will result in a crash.

Unrelated to this issue I've also seen the CHIPTool crash when sending the readTemperatureMeasurementAttribute. It resulted in the same Exception: java.lang.ClassCastException

Im using the latest CHIPTool .apk in this github repo -> https://github.com/nrfconnect/sdk-connectedhomeip/releases/tag/v2.1.0

Using this .apk -> chip-tool-android_armv7l.apk

Related