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

The app crashed when I clicked "View statistics" after deleting planted action from "View history" option. #88

Closed
sagorahmed opened this issue Jun 26, 2019 · 0 comments
Assignees
Labels
Milestone

Comments

@sagorahmed
Copy link

Expected behavior

I expected that I could click on the "View statistics" after deleting planted action from "View history" without getting the app crash.

Actual behavior

When I clicked on "View statistics" after deleting the planted action from "View history" option, then the app crashed.

How to reproduce

Here is every possible detail to reproduce the bug.

  1. Open the app.
  2. Click on a plan to open it.
  3. Then go to "View history" and delete this planted action.
  4. Press back to get back on the plant details and click on "View statistics".
  5. Notice the crash.
  • App version: 2.5.1
  • Operating system: Android 6.0.1

Recording Of The Bug

crash

LogCat

06-27 01:19:15.089 19209 19209 D AndroidRuntime: Shutting down VM

06-27 01:19:15.109 19209 19209 E AndroidRuntime: FATAL EXCEPTION: main

06-27 01:19:15.109 19209 19209 E AndroidRuntime: Process: me.anon.grow, PID: 19209

06-27 01:19:15.109 19209 19209 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{me.anon.grow/me.anon.grow.StatisticsActivity}: java.util.NoSuchElementException

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3319)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3415)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at android.app.ActivityThread.access$1100(ActivityThread.java:229)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:148)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7325)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: Caused by: java.util.NoSuchElementException

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at java.util.TreeMap.firstKey(TreeMap.java:606)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at me.anon.model.Plant.calculateStageTime(Plant.java:374)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at me.anon.grow.fragment.StatisticsFragment.setStatistics(StatisticsFragment.java:290)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at me.anon.grow.fragment.StatisticsFragment.onActivityCreated(StatisticsFragment.java:136)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at android.app.Fragment.performActivityCreated(Fragment.java:2289)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1008)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1164)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at android.app.BackStackRecord.run(BackStackRecord.java:793)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1557)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at android.app.FragmentController.execPendingActions(FragmentController.java:326)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at android.app.Activity.performStart(Activity.java:6942)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3276)

06-27 01:19:15.109 19209 19209 E AndroidRuntime: 	... 9 more
@7LPdWcaW 7LPdWcaW self-assigned this Jul 1, 2019
@7LPdWcaW 7LPdWcaW added the bug label Jul 1, 2019
@7LPdWcaW 7LPdWcaW added this to the v2.6 milestone Jul 1, 2019
7LPdWcaW added a commit that referenced this issue Aug 8, 2019
Merge branch 'fix/no-stages' into develop

* fix/no-stages:
  Prevent empty stage changes from happening
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

2 participants