QField icon indicating copy to clipboard operation
QField copied to clipboard

Random crash when taking photo

Open samueldurante opened this issue 3 years ago • 6 comments

Qfield quit the project randomly after taking picture with native camera.

Reproduction Steps:

  1. Create simple project with 1 gpkg point layer with a text field 'image' and PK fid
  2. Add image widget with relative path, image preview and no link
  3. Open it with Qfield.

Expected behavior:

When adding a point and clicking on camera logo, the native camera open, you take a picture and then it displays "Retry / OK" with the taken photo. When clicking on OK Qfield reappear and you can save the entity.

Observed behavior:

When adding a point and clicking on camera logo, the native camera open, you take a picture and then it displays "Retry / OK" with the taken photo. RANDOMLY, when clicking on OK, native camera re-open. Two choices :

  1. You tap the "back" button and Qfield Quit the project and you see the "Welcome back to QField" page.
  2. You try to take another picture : if you click on OK, same behavior : Qfield quit and you see the "Welcome back to QField" page.

QField version: Qfield stable 1.5.3 / Qfield dev (2020-10-13) Device: Samsung galaxy Tab A. Android 10.

Additional information:

  • Problem started happening recently, didn't happen in an older version of QField: I don't know
  • Problem can be reliably reproduced, doesn't happen randomly: NO, it does happen randomly. Sometimes works as espected once, twice, sometimes crash on the very first point added after opening the project.
  • Problem happens with all files and projects, not only some files or projects: Yes

samueldurante avatar Oct 14 '20 16:10 samueldurante

We have also experienced this. The crashing whilst taking photos can happen while editing an existing feature, but happens less frequently. It may be that if qfield is in digitize mode it is more prone to crashing when taking photos than if it is in browse mode.

rwjdennis avatar Nov 20 '20 21:11 rwjdennis

@rwjdennis what are your device ? This issue still happens with Qfield 1.6. I resolved the problem with the use of qfield camera instead of native camera app, but I loose all options to take the picture. Another trick is to enable the "Fast Editing Mode" so you don't loose any unsaved data in other fields when Qfield crashes.

samueldurante avatar Nov 26 '20 16:11 samueldurante

@samueldurante We use different generations of Samsung Galaxy Tab A tablets (SM-T550 are the most current models we're using). We've used it again recently for a couple days, and definitely it's less frequent when updating existing points. The tip about Fast Editing Mode is helpful, though.

rwjdennis avatar Nov 26 '20 19:11 rwjdennis

@samueldurante , please try the APKs here: https://github.com/opengisch/QField/pull/2744

nirvn avatar Apr 15 '22 06:04 nirvn

It is still an issue with the newest version (2.1.2) of QField. In combination with Open Camera I still get a black screen after 2-3 pictures. (Setup with 2 related table like in the qfield documentary). What really seems to help is fast editing mode + Qfield internal camera app.

meyerlor avatar May 03 '22 06:05 meyerlor

@nirvn we have the same issue pooping up, running with V3.2.2. randomly crashing after a few points with photos and randomly when retrying to do photos again. Occurs only when using a native camera, not in the simple qfield camera. could we provide more info or is there a solution (opencamera or so) which is stable?

EulenspiegelTill avatar Apr 12 '24 11:04 EulenspiegelTill