UI blocking with unstable network in project with postgis/postgres layers
What is the bug or the crash? What were your expectations and what actually happened?
I have a project that includes several postgis layers. This works great as long as the network connection is stable.
When i move into an area with unstable or temporarily unavailable network (mobile data), the UI freezes. Sometimes it recovers and sometimes not but it always freezes.
I think the UI should never block when trying to fetch remote resources of any kind. Same goes for tracking on a postgis layer (but i'll open another issue for that)
Steps to reproduce the issue
Load a project that has a postgis layer, move into an area with little to no network connection, notice that the screen freezes, and becomes not responsive.
Version
3.6.6 Gondwana
Operating system name
Android
Operating system version
Android 11, One UI 3.1
Reinstall QField
- [ ] I have a fresh install of the latest QField version, but the problem persists.
- [x] Problem can be reliably reproduced, doesn't happen randomly.
- [x] Problem happens with all files and projects, not only some files or projects.
Additional context
"reliably reproduced" is true, when the network connection is reliably unreliable ; -D
Something very much upstream in our loved, big brother QGIS :)
I am not familiar yet with the architecture so i need to ask:
does upstream qgis have tracking logic?
i guess the ultimate postgres connector is up there, but the tracking logic lives here in qfield, does it not?
And layer rendering logic (also how often to refresh the data from postgis layers and if and when the whole ui needs to block) ? if that also lives upstream, can you give a pointer to the qgis classes so i can have a look?
I'm really happy to investigate a PR if i get a good lead...