[GrowTracker][v2.5.1] The app crashed when I clicked on settings after deleting my selected default garden in the settings.

Project Information

Expected behavior

I expected that I could click on settings after deleting a garden, which was chosen for the default garden in the app settings before.

Actual behavior

After creating a garden and selecting it as the default garden of the app. When I tried open the settings after deleting that garden, then the app crashed.
It crashes every time after that crash and I am not able to use it.

How to reproduce

Here is every possible detail to reproduce the bug.

  1. Open the app.
  2. Create a new garden.
  3. Go to the settings and select it as your default garden.
  4. After that delete the garden you created and selected in the settings before.
  5. At last, try to go in the settings and notice the crash.
    You can't use the app after this crash. It would crash every time when you try to use the app.
  • App version: 2.5.1
  • Operating system: Android 6.0.1

Recording Of The Bug

Watch the bug on Youtube..

LogCat

06-27 12:30:55.182  2079  2079 E AndroidRuntime: FATAL EXCEPTION: main

06-27 12:30:55.182  2079  2079 E AndroidRuntime: Process: me.anon.grow, PID: 2079

06-27 12:30:55.182  2079  2079 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{me.anon.grow/me.anon.grow.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'android.view.MenuItem android.view.MenuItem.setChecked(boolean)' on a null object reference

06-27 12:30:55.182  2079  2079 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3319)

06-27 12:30:55.182  2079  2079 E AndroidRuntime:    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3415)

06-27 12:30:55.182  2079  2079 E AndroidRuntime:    at android.app.ActivityThread.access$1100(ActivityThread.java:229)

06-27 12:30:55.182  2079  2079 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821)

06-27 12:30:55.182  2079  2079 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)

06-27 12:30:55.182  2079  2079 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:148)

06-27 12:30:55.182  2079  2079 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:7325)

06-27 12:30:55.182  2079  2079 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)

06-27 12:30:55.182  2079  2079 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

06-27 12:30:55.182  2079  2079 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

06-27 12:30:55.182  2079  2079 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'android.view.MenuItem android.view.MenuItem.setChecked(boolean)' on a null object reference

06-27 12:30:55.182  2079  2079 E AndroidRuntime:    at me.anon.grow.MainActivity.onCreate(MainActivity.java:86)

06-27 12:30:55.182  2079  2079 E AndroidRuntime:    at android.app.Activity.performCreate(Activity.java:6904)

06-27 12:30:55.182  2079  2079 E AndroidRuntime:    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1136)

06-27 12:30:55.182  2079  2079 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3266)

06-27 12:30:55.182  2079  2079 E AndroidRuntime:    ... 9 more
H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center