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

[BUG] Android CHIP Tool crashes when subscribing in Light On/Off & Level Cluster #23928

Closed
markaj-nordic opened this issue Dec 6, 2022 · 4 comments
Assignees
Labels

Comments

@markaj-nordic
Copy link
Contributor

Reproduction steps

1. Commission the light bulb accessory.
2. Go to LIGHT ON/OFF & LEVEL CLUSTER section.
3. Click Subscribe button.

After pressing the Subscribe in this window, the app crashes with following logs:

java.lang.NumberFormatException: For input string: ""
 at java.lang.Integer.parseInt(Integer.java:627)
 at java.lang.Integer.parseInt(Integer.java:650)
 at com.google.chip.chiptool.clusterclient.OnOffClientFragment$showSubscribeDialog$1$1.invokeSuspend(OnOffClientFragment.kt:107)
 at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
 at kotlinx.coroutines.DispatchedKt.resumeCancellable(Dispatched.kt:457)
 at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:26)
 at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:109)
 at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:154)
 at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:54)
 at kotlinx.coroutines.BuildersKt.launch(Unknown Source:1)
 at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:47)
 at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source:1)
 at com.google.chip.chiptool.clusterclient.OnOffClientFragment.showSubscribeDialog$lambda-7(OnOffClientFragment.kt:105)
 at com.google.chip.chiptool.clusterclient.OnOffClientFragment.lambda$Q_xHxDRcLoxYxIbsECbiC6kJKoU(Unknown Source:0)
 at com.google.chip.chiptool.clusterclient.-$$Lambda$OnOffClientFragment$Q_xHxDRcLoxYxIbsECbiC6kJKoU.onClick(Unknown Source:8)
 at android.view.View.performClick(View.java:7253)
 at android.view.View.performClickInternal(View.java:7230)
 at android.view.View.access$3500(View.java:822)
 at android.view.View$PerformClick.run(View.java:27766)
 at android.os.Handler.handleCallback(Handler.java:883)
 at android.os.Handler.dispatchMessage(Handler.java:100)
 at android.os.Looper.loop(Looper.java:224)
 at android.app.ActivityThread.main(ActivityThread.java:7584)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)

Also the Subscription window in the LIGHT ON/OFF & LEVEL CLUSTER contains faulty GUI layout (overlapping captions) used when passing minimum and maximum subscription interval values.

Bug prevalence

Always

GitHub hash of the SDK that was being used

1.0.0

Platform

android

Platform Version(s)

No response

Anything else?

No response

@joonhaengHeo
Copy link
Contributor

When I checked the log, it seems to be caused by not filling in the minInterval and maxInterval values in the dialog shown when I clicked the subscribe button. If you put that value in and it works, it doesn't seem to be a problem.

@markaj-nordic
Copy link
Contributor Author

markaj-nordic commented Dec 15, 2022

When I checked the log, it seems to be caused by not filling in the minInterval and maxInterval values in the dialog shown when I clicked the subscribe button. If you put that value in and it works, it doesn't seem to be a problem.

It happens when entering both interval values in the dialog and clicking on the subscribe afterwords. So maybe these values are not really propagated internally due to the GUI bug I described (can it be related with screen resolution?). BTW. I see no reason for the app to crash even when not providing user input in the dialog, it should then report an error or maybe the subscribe button could be grey out unless intervals are provided.

Please see the screen of the faulty GUI view:
https://ibb.co/sFfYyj0

@joonhaengHeo
Copy link
Contributor

@markaj-nordic
If you look at the Screen View you shared, I understand that the PR below I requested is the code before it was merged.
#23377

Before the above PR is merged, the Dialog's EditText overlaps and the Value is not entered properly.

In my opinion, the following string is visible in Screen View, so it seems that the min or max value has not been entered.

<string name="subscribe_dialog_min_interval_hint">Minimum interval (seconds)</string>

@yunhanw-google
Copy link
Contributor

fixed.

@github-project-automation github-project-automation bot moved this from Todo to Done in [Platform] Android Mar 11, 2023
@yunhanw-google yunhanw-google self-assigned this Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

4 participants