ground-android
ground-android copied to clipboard
Photo-taking task crashes app
eMail from user:
"Picture taking form field in campaign A makes the app crash every time we try to take a picture, so we are just skipping it for the time being. It works in survey B though, which makes me think that it is the picture taking form field, in combination with some other data field(s), that the app is not tolerating."
I can confirm that collecting for another survey in my app (picture taking required & can't be skipped) does not work, instead a "Unsaved data restored" pop-up appears. Survey: https://ground.openforis.org/survey/N5hZgxQ8MnKDD8lhDwMs Build 0.1.17
Same does not work reproduced in a survey where the picture-taking can be skipped. Skipping and getting to the last page ("Data collected successfully") the app fully crashes.
*note that this is not an issue in 0.1.20 (aka 0.1.14), but has been in 0.1.17+. Seems to be related to the issue where screenlock during polygon-drawing loses the polygon. I am quite sure that this problem didn't always occur in 0.1.17. Can it be some environmental variable in ground-platform that causes these issues?
@anandwana001 was unable to repro on master branch, @rfontanarosa to help try to repro
I showed @anandwana001 the problem. The build commit is 229f9baa8.
This is likely a duplicate of https://github.com/google/ground-android/issues/3161.
Suggestions:
- try to understand from the docs if we are using the photo api in a std way (see error details from https://android.googlesource.com/platform/frameworks/base/+/master/graphics/java/android/graphics/RecordingCanvas.java )
- understand the diffs in the app versions - from https://github.com/openforis/ground-android
- isolate the problem with a simplified version of the app just taking and displaying the photo
- Try switching to different lib for image strorage - Camerax - Storage method: File: https://developer.android.com/media/camera/camerax/take-photo?_gl=119904j0_upMQ.._gaMTQzNzAyMzczMS4xNzUxMDMzOTA2_ga_6HH9YJMN9M*czE3NTEwMzM5MDUkbzEkZzAkdDE3NTEwMzM5MDUkajYwJGwwJGgxMzg1NDQ0NTQ3#capture
@anandwana001 to try switch to Camerax and test with @jo-spek