Open grzesiek2010 opened 1 year ago
According to the stacktrace the issue takes place when we query for only 4 forms. I've played with changing the CursorWindowSize
and with 4 downloaded forms I'm able to reproduce the issue if I set the size to less than 1kb where the default size should be ~2mb. If it's more than 1kb everything works fine. Such a small size would be ridiculous and I don't know if it's real. I think we should first check and log the real size to know what's going on.
It would be something like this: https://github.com/getodk/collect/pull/5529
What's also interesting it's not a repetitive crash. It looks like it happens once when a user for example opens the list of forms but then everything is fine. Maybe the CursorWindowSize
is too small somehow and then it's increased?
Let's see what info we get in from the changes in #5529
We've added updated logging with #5541
It looks like we're seeing the default window size (2MB) get logged before the crash occurs looking at recent reports. @grzesiek2010 do you want to double-check this? I liked your theory that the crash happens once because of a very small default and then gets upped to 2MB, but these reports would suggest that isn't the case.
We don't have any logs after merging https://github.com/getodk/collect/pull/5541 because it wasn't a part of v2023.1.2 so we still don't know if my theory was correct or not. we have to wait till releasing v2023.2
We don't have any logs after merging https://github.com/getodk/collect/pull/5541 because it wasn't a part of v2023.1.2 so we still don't know if my theory was correct or not. we have to wait till releasing v2023.2
Ah right that makes sense. My bad!
I was right that this problem has something to do with db upgrades, the new logs confirm that: https://console.firebase.google.com/u/1/project/api-project-322300403941/crashlytics/app/android:org.odk.collect.android/issues/1d44e46d70a9c63deff958a80ea8ef4d?time=last-seven-days&versions=v2023.2.3%20(4681)&types=crash&sessionEventKey=64C3EBDA029700015BB465AE9D3F60BA_1839351971234625326 I'm not sure what we can do next. Maybe try to read the database in the main menu so that upgrades are triggered earlier and exceptions are caught earlier too? This assumes the exceptions are thrown just for the first operation on the database after upgrading. I'm not sure if that's true but we can give it a try. @seadowg any thoughts?
It looks like the app recovers from this after the crash right? I think if that's the case, we can pause investigating for the moment now we have more of a sense of when/why it's happening. The crash numbers aren't very large (only ~30 for the current release).
The number of crashes is going to be lower and lower since it's been a while since we upgraded our databases the last time. However, it will grow next time we need to do that and then it might be a problem. I agree we can remove this issue from the current milestone. @getodk/testers we have one Huawei device but it's with an old Android version as I remember right?
The number of crashes is going to be lower and lower since it's been a while since we upgraded our databases the last time. However, it will grow next time we need to do that and then it might be a problem. I agree we can remove this issue from the current milestone. @getodk/testers we have one Huawei device but it's with an old Android version as I remember right?
Yep, only Huawei we've got is with Android 5.1
Ok so let's leave it for now. We can try to reproduce once we have a Huawei device with a newer Android version.
Problem description
https://console.firebase.google.com/u/1/project/api-project-322300403941/crashlytics/app/android:org.odk.collect.android/issues/1d44e46d70a9c63deff958a80ea8ef4d?time=last-seven-days&versions=v2023.1.0%20(4611)&types=crash&sessionEventKey=64225AB003410001654A7B0AB7CDB18D_1793875140906089215