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 canceled the photo-taking step. #87

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

The app crashed when I canceled the photo-taking step. #87

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

Comments

@sagorahmed
Copy link

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
  • Device: Samsung A5

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
@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/camera-cancel' into develop

* fix/camera-cancel:
  Do not continue broadcast if no photo was actually taken
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