[GrowTracker][v2.5.1] The app crashed when I canceled the photo-taking step.

11개월 전

Related Informations

Expected behavior

The users should be able to cancel the photo-taking step before adding a photo to plant details.

Actual behavior

When I tried to add a photo in a planted details and canceled the photo-taking step, then the app crashed.

How to reproduce

Here is every possible detail to reproduce the bug.

  1. Open the app.
  2. Add a new plant and save it.
  3. Open that created plant.
  4. Then go to the "Photo" tab and select "From camera" to add a photo in that plant details.
  5. The list of the camera apps would appear on your phone's screen.
  6. Don't click on anything, just press the back button of your phone and notice the crash.
  • App version: 2.5.1
  • Operating system: Android 6.0.1

Recording Of The Bug

bug

LogCat

06-26 23:41:44.812  6155  6155 E AndroidRuntime: FATAL EXCEPTION: main

06-26 23:41:44.812  6155  6155 E AndroidRuntime: Process: me.anon.grow, PID: 6155

06-26 23:41:44.812  6155  6155 E AndroidRuntime: java.lang.RuntimeException: Failure delivering result ResultInfo{who=android:fragment:1, request=1, result=0, data=null} to activity {me.anon.grow/me.anon.grow.PlantDetailsActivity}: java.lang.ArrayIndexOutOfBoundsException: length=12; index=-1

06-26 23:41:44.812  6155  6155 E AndroidRuntime:    at android.app.ActivityThread.deliverResults(ActivityThread.java:4998)

06-26 23:41:44.812  6155  6155 E AndroidRuntime:    at android.app.ActivityThread.handleSendResult(ActivityThread.java:5041)

06-26 23:41:44.812  6155  6155 E AndroidRuntime:    at android.app.ActivityThread.access$1600(ActivityThread.java:229)

06-26 23:41:44.812  6155  6155 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1875)

06-26 23:41:44.812  6155  6155 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)

06-26 23:41:44.812  6155  6155 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:148)

06-26 23:41:44.812  6155  6155 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:7325)

06-26 23:41:44.812  6155  6155 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)

06-26 23:41:44.812  6155  6155 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

06-26 23:41:44.812  6155  6155 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

06-26 23:41:44.812  6155  6155 E AndroidRuntime: Caused by: java.lang.ArrayIndexOutOfBoundsException: length=12; index=-1

06-26 23:41:44.812  6155  6155 E AndroidRuntime:    at java.util.ArrayList.get(ArrayList.java:310)

06-26 23:41:44.812  6155  6155 E AndroidRuntime:    at me.anon.grow.fragment.PlantDetailsFragment.onActivityResult(PlantDetailsFragment.java:445)

06-26 23:41:44.812  6155  6155 E AndroidRuntime:    at android.app.Activity.dispatchActivityResult(Activity.java:7189)

06-26 23:41:44.812  6155  6155 E AndroidRuntime:    at android.app.ActivityThread.deliverResults(ActivityThread.java:4994)

06-26 23:41:44.812  6155  6155 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 log is pretty precise but can still be supported with a detailed analysis. I see the PO has rectified this issue in this commit - https://github.com/7LPdWcaW/GrowTracker-Android/commit/660abd7738bd13f4ba0559cd8bf90f837f3f5bca .

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!