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

Tap screen repeatedly on app starting, navigation unknown destination error occur #664

Open
nacatl opened this issue Jan 28, 2019 · 6 comments
Labels

Comments

@nacatl
Copy link
Contributor

nacatl commented Jan 28, 2019

Overview (Required)

  • Tap screen repeatedly on app starting, unknown destination error occur at below
SpeechSessionItem.kt l.63

navController.navigate(detailNavDirections)

Steps To Reproduce

  1. Swipe kill the app
  2. Repeat tapping the screen during app is starting
  3. java.lang.IllegalArgumentException: navigation destination io.github.droidkaigi.confsched2019.debug:id/action_session_to_session_detail is unknown to this NavController occur

Expected behavior
No exeption will be thrown.

Screenshots

Env:

  • Device: Essential Phone PH-1
  • OS: 9.0
  • App Version: master (Fixed # 656)

Additional context
none

@nacatl nacatl added the bug Something isn't working label Jan 28, 2019
@takahirom
Copy link
Member

Thanks! I can reproduce it 👍

@gen0083
Copy link
Contributor

gen0083 commented Jan 28, 2019

Probably, the cause is multiple tapping.

If I rewrite SpeechSessionItem(line: 63) like this, then same error occurred.

            root.setOnClickListener {
                navController.navigate(detailNavDirections)
                navController.navigate(detailNavDirections)
            }

navigate to detail from detail, it is not defined in navigation graph.
so we got the crash.

    Process: io.github.droidkaigi.confsched2019.debug, PID: 27929
    java.lang.IllegalArgumentException: navigation destination io.github.droidkaigi.confsched2019.debug:id/action_session_to_session_detail is unknown to this NavController
        at androidx.navigation.NavController.navigate(NavController.java:754)
        at androidx.navigation.NavController.navigate(NavController.java:695)
        at androidx.navigation.NavController.navigate(NavController.java:681)
        at androidx.navigation.NavController.navigate(NavController.java:813)
        at io.github.droidkaigi.confsched2019.session.ui.item.SpeechSessionItem$bind$$inlined$with$lambda$1.onClick(SpeechSessionItem.kt:67)
        at android.view.View.performClick(View.java:6597)
        at android.view.View.performClickInternal(View.java:6574)
        at android.view.View.access$3100(View.java:778)
        at android.view.View$PerformClick.run(View.java:25885)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

on branch master build, 2 sessions clicked at the same time then got this error.

crash

@sobaya-0141
Copy link
Contributor

暫定対処として、 SpeechSessionItem(line: 63)をtry~catchでくくってクラッシュを防いでおき、
恒久的な対処ができる方がいたら置き換えてもらうのはダメでしょうか?
⇒上記の暫定対処で画面表示前のタップや、複数セッション同時押ししてもクラッシュを防げる事は試していますので、
暫定対処だけであれば早めにPR投げれます。

@takahirom
Copy link
Member

@sobaya-0141 Thanks! Can you add a comment like this with your try catch block?

// FIXME: When launching the app and click session multiple times, cause Exception
// see https://github.com/DroidKaigi/conference-app-2019/issues/664

@takahirom
Copy link
Member

Assigned 👍

@sobaya-0141
Copy link
Contributor

承知しました!!

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

No branches or pull requests

4 participants