Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.0] [Android] Crash when deviceController subscribeToPath #22890

Closed
Allen-Guof opened this issue Sep 27, 2022 · 1 comment · Fixed by #23377
Closed

[1.0] [Android] Crash when deviceController subscribeToPath #22890

Allen-Guof opened this issue Sep 27, 2022 · 1 comment · Fixed by #23377
Labels

Comments

@Allen-Guof
Copy link

Reproduction steps

1. Connect the device in Android ChipTool app.
2. Then Click WILDCARD.
3. Input Endpoint:1, Cluster ID: 6, Attribute Id: 0.
4. Click SUBSCRIBE. App will crash.

Bug prevalence

Every time.

GitHub hash of the SDK that was being used

4f7669b

Platform

android

Platform Version(s)

No response

Type

Platform Issue

Anything else?

Code:

 deviceController.subscribeToPath(subscriptionEstablishedCallback,
                                       resubscriptionAttemptCallback,
                                       reportCallback,
                                       ChipClient.getConnectedDevicePointer(requireContext(),
                                       addressUpdateFragment.deviceId),
                                       listOf(attributePath),
                                       null,
                                       minInterval,
                                       maxInterval,
                                       keepSubscriptions,
                                       isFabricFiltered)

Logs:
matterlog.txt

@Allen-Guof
Copy link
Author

I found the reason. The param eventPaths can't be null. Fix by:

deviceController.subscribeToPath(
                subscriptionEstablishedCallback,
                resubscriptionAttemptCallback,
                object : ReportCallback {},
                devicePointer,
                listOf(chipAttributePath),
                listOf(),
                minInterval,
                maxInterval,
                true,
                false
            )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants