Skip to content

QField 4.2.3 crashes/restarts after backgrounding and opening native Samsung camera app #7595

Description

@sreiber

What is the bug or the crash? What were your expectations and what actually happened?

Description

QField crashes, restarts, or returns to a blank state after it has been minimized/backgrounded and the native Android/Samsung camera app is opened separately.

This is not about QField's photo widget, QField attachment capture, or taking pictures from inside QField. QField is minimized manually, then the native camera app is opened independently. After returning to QField, the app often has to be restarted and the currently entered form/default values are lost.

This happens most of the time, but not always.

Environment

  • Device: Samsung Galaxy M30s
  • QField version: 4.2.3 - Coral Sea
  • Camera app: native Samsung/Android camera app
  • Workflow: QField is minimized manually, camera app is opened separately

Expected behavior

QField should resume the open project and restore the previous state, including the active form and entered/default values.

QField should not crash, restart, or return to a blank state after being backgrounded.

Actual behavior

QField often crashes, restarts, or returns to a blank state after returning from the native camera app.

The project has to be reopened and the current feature/form input is lost. This includes default/standard values that have to be filled in again.

The problem normally does not happen when switching from QField to another app such as a PDF viewer. It seems to be triggered mainly by using the native camera app while QField is in the background.

Frequency

Most of the time, but not always.

Important clarification

This is not related to using QField's internal photo function or attachment widget. The photo is not taken from QField. The native Android/Samsung camera app is opened separately after manually minimizing QField.

Additional observations

  • The issue is reproducible on QField 4.2.3.
  • It probably also happened in earlier versions.
  • The behavior looks like a lifecycle/background-resume problem: QField is backgrounded, the native camera app is used, and QField does not reliably restore its previous state.
  • Opening another app such as a PDF viewer usually does not trigger the crash/restart.

Related issue

This seems related to issue #6475, where QField reportedly turns blank/restarts after switching to another app, with the picture app mentioned as an example.

Steps to reproduce the issue

  1. Open QField.
  2. Open a project.
  3. Start editing or creating a feature.
  4. Fill in form fields, including fields with default/standard values.
  5. Do not save/finish the feature yet.
  6. Minimize/background QField manually.
  7. Open the native Samsung/Android camera app separately.
  8. Take a photo or use the camera app.
  9. Return to QField.

Version

4.2.3 and earlier

Operating system name

Android

Operating system version

16

Reinstall QField

  • I have a fresh install of the latest QField version, but the problem persists.
  • Problem can be reliably reproduced, doesn't happen randomly.
  • Problem happens with all files and projects, not only some files or projects.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions