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

Crash after theme change (found possible solution) #92

Open
koppen37 opened this issue Jul 27, 2020 · 6 comments
Open

Crash after theme change (found possible solution) #92

koppen37 opened this issue Jul 27, 2020 · 6 comments

Comments

@koppen37
Copy link
Contributor

I just noticed that the latest f-droid version (and master) seems to have a reproducible crash:

  1. Open options from the homescreen
  2. Change theme -> select any theme
  3. Press back
  4. Try to open options again from the homescreen

Logcat gives me:

07-27 11:12:12.125 29482 29482 E AndroidRuntime: FATAL EXCEPTION: main
07-27 11:12:12.125 29482 29482 E AndroidRuntime: Process: com.sduduzog.slimlauncher, PID: 29482
07-27 11:12:12.125 29482 29482 E AndroidRuntime: java.lang.IllegalStateException: no current navigation node
07-27 11:12:12.125 29482 29482 E AndroidRuntime:        at androidx.navigation.NavController.navigate(NavController.java:765)
07-27 11:12:12.125 29482 29482 E AndroidRuntime:        at androidx.navigation.NavController.navigate(NavController.java:745)
07-27 11:12:12.125 29482 29482 E AndroidRuntime:        at androidx.navigation.NavController.navigate(NavController.java:731)
07-27 11:12:12.125 29482 29482 E AndroidRuntime:        at androidx.navigation.Navigation$1.onClick(Navigation.java:119)
07-27 11:12:12.125 29482 29482 E AndroidRuntime:        at android.view.View.performClick(View.java:6294)
07-27 11:12:12.125 29482 29482 E AndroidRuntime:        at android.view.View$PerformClick.run(View.java:24770)
07-27 11:12:12.125 29482 29482 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:790)
07-27 11:12:12.125 29482 29482 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:99)
07-27 11:12:12.125 29482 29482 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:164)
07-27 11:12:12.125 29482 29482 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6494)
07-27 11:12:12.125 29482 29482 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
07-27 11:12:12.125 29482 29482 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
07-27 11:12:12.125 29482 29482 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

The previous f-droid version did not have this bug, furthermore the time format picker doesn't trigger the crash.

I will try to find out which change first introduced this bug, but maybe you already have a clue why this happens.

@koppen37
Copy link
Contributor Author

The crash happens from commit a545386 onwards.

After some searching I found that changing

implementation("android.arch.navigation:navigation-fragment:1.0.0")

to implementation("androidx.navigation:navigation-fragment-ktx:2.2.0") solves the crash.

However I have no clue whether changing this line has any further implications...

@koppen37 koppen37 changed the title Crash after theme change Crash after theme change (found possible solution) Jul 27, 2020
@jkuester
Copy link

+1 I tried upgrading to the androidx nav libraries and everything seemed to work fine!

@sduduzog
Copy link
Owner

sduduzog commented Sep 8, 2020

Please check if this is sorted for v2.4.14, I try to keep dependencies up to date with most releases so this might have been addressed, I'm not sure

@koppen37
Copy link
Contributor Author

koppen37 commented Sep 8, 2020

F-droid version 2.4.14 (and current master) is still affected by this, since it still uses the navigation library from android instead of androidx.

Note that #91 already includes this fix

@sduduzog
Copy link
Owner

sduduzog commented Sep 9, 2020

Ahh well... Also now I'm waiting for 2.4.15 to pass review so that I can release it to F-Droid

@sduduzog
Copy link
Owner

So my latest build failed because the updates I brought included removing github pages which hosted the apps privacy policy. The fix for that will include one for this too

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

No branches or pull requests

3 participants