getodk / collect

ODK Collect is an Android app for filling out forms. It's been used to collect billions of data points in challenging environments around the world. Contribute and make the world a better place! ✨📋✨
https://docs.getodk.org/collect-intro
Other
712 stars 1.37k forks source link

ANRs and black screen after adding many repeats #6283

Open dbemke opened 1 month ago

dbemke commented 1 month ago

ODK Collect version

the store version 2024.2.0 ,the master version a9c57b94bd7d935e4a62cfd9052066eb15ec7328

Android version

10, 14

Device used

Redmi 9T, Pixel 7a

Problem description

If I enter a big number in the nestedTest form Collect "freezes” after going to the hierarchy view or trying to save the form as a draft. On Android 14 it’s usually ANR or black screen. On Android 10 after saving the form as draft there’s dialog about validating answers that doesn't disappear (I waited 5 minutes) or there’s also black screen (less often than on Android 14 ANRs occur). I guess it’s because of the big number (I tried smaller numbers and it works well) but the form is "stuck” until I kill the app and manage to discard the savepoint. I’m not sure what is the expected result if some actions (e.g. adding too many repeats) in the form take too much time/ are too big.

saveAsdraftNestedTest

Steps to reproduce the problem

  1. Go to nestedTest form. nestedTest.xml.txt
  2. In question "number of households” enter a big number e.g. 5000 and go to the hierarchy view or try to save the form as draft.
  3. Kill the app and try to reopen the form (recover the savepoint).
lognaturel commented 1 month ago

This is a long-standing issue. I don't think we can realistically improve things for a number as big as 5000, unfortunately. Does it work for 500? 200?

dbemke commented 1 month ago

Yes, 500 works well.