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

App will freeze in some cases when an integer field has 'not null' constraint and no default value #3417

Closed
raherin opened this issue May 10, 2024 · 6 comments · Fixed by #3435
Assignees
Labels
Milestone

Comments

@raherin
Copy link

raherin commented May 10, 2024

I have identified a condition where the app will freeze when there is a field with an integer data type that has a not null constraint and no default value is set. There are also two other specific conditions to cause the freeze. The form must be long enough that the user has to scroll to see all of the fields and it will not freeze until a second feature is created after editing or creating a feature and saving it. I have created an example project support/test-not-null-int to test the issue. To recreate the problem:

  1. create a survey layer that:
  • has at least enough fields that the user must scroll in the app to see them all (at least 7)
  • has at least one field that has an integer data type
  1. give the integer field a 'not null' constraint but do not set a default value
  2. synchronise the project with the QGIS plugin
  3. download the project and open it in the app
  4. record a new feature on the survey layer, make sure all of the constraints are met and save the feature
  5. press the '+' button and 'record' to add a second feature
  6. when the form view opens, scroll up and down the form
  7. the app will freeze

I have tested this on a Samsung A53 with Android 14 installed. At least one other user has reported a similar issue on their Android 14 device.

@raherin raherin added the bug label May 10, 2024
@PeterPetrik PeterPetrik added data corruption - sync failure - crash - anr The most critical classification labels May 14, 2024
@PeterPetrik
Copy link
Contributor

PeterPetrik commented May 14, 2024

I can reproduce it with support/test-not-null-int even in macOS debug build . It can be replicated even in qt6.6.0 build on macOS

@raherin
Copy link
Author

raherin commented May 14, 2024

In addition to the above conditions, I was able to reproduce app freezes with other data type and widget combinations with 'not null' constraints. I've created another project to reproduce this support/form-freeze-test

Using the example project, the following conditions caused freezing in the app:

Data type Widget type Contraint Default When did app freeze?
text Value map not null no default (1st feature edited after last sync)
int32 range not null no default (1st feature edited after last sync)
int32 range "number" >= 1 no default (1st feature edited after last sync)
text attachment(photo) not null no default (2nd feature edited after last sync)

@PeterPetrik PeterPetrik self-assigned this May 15, 2024
@tomasMizera
Copy link
Collaborator

@raherin can you reproduce this even without 'not null' constraints?

@raherin
Copy link
Author

raherin commented May 15, 2024

@tomasMizera we also got app crashes on iPad. Though it needed to be in landscape mode so that you had to scroll to see the whole form. If it is in portrait mode and you do not need to scroll, the app does not crash. Also the app did not crash if values were entered to not null fields before scrolling. It only crashed when not null fields are empty and you scroll on the form.

@tomasMizera
Copy link
Collaborator

Thanks @raherin for testing this out!

@jozef-budac
Copy link

I can't reproduce the crash on the current 2024.2.0 RC. @raherin , can you please verify it also?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants