[GrowTracker][v2.5.1] The app crashed when I clicked "View statistics" after deleting planted action from "View history" option.

11개월 전

Project Information

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
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
STEEMKR.COM IS SPONSORED BY
ADVERTISEMENT
Sort Order:  trending

Hi @sagorahmed, thanks for making this contribution

The behavior you described is particularly strange and the logcat you provided is pretty precise but can still be supported with a detailed analysis. I can see the PO has rectified this issue in this commit - https://github.com/7LPdWcaW/GrowTracker-Android/commit/ce9e690c63f32e11a61675ab8c2651eec9e3167c .

Good of you to have shared this. I look forward to more of your reports.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

·

Thank you for your review, @fego! Keep up the good work!

Hi @sagorahmed!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @sagorahmed!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!