michelesalvador / FamilyGem

Android app for genealogical trees
https://www.familygem.app
GNU General Public License v3.0
114 stars 32 forks source link

App not responding #101

Open jer194 opened 10 months ago

jer194 commented 10 months ago

Since a while (months) I'm getting frequent "Family Gem isn't responding". I'm not sure what triggered it (app version upgrade, or upgrade from Android 12 to 13). Once in that state, the app is practically unusable. My main tree is something like 2200 persons, 15 generations, 660 media files. It doesn't happen with smaller trees (eg one with 270 persons and 200 media files).

In the logs I can see:

logcat.txt

Not sure whether the issue is app or device related. Would be great if there was a way to fix this ... Thanks - Jakob.

jer194 commented 10 months ago

Ok, I found the workaround myself (just after posting my problem):

After 'app not responding' I always selected 'wait' (since I wanted to continue using the app). The right choice however is to 'stop' (or 'kill') the app, which seemingly just kills the not responding thread, not the app itself. Afterwards, navigation in the tree works well (except maybe it is a bit laggy, but that's not a real issue).

michelesalvador commented 7 months ago

Thank you for reporting that. Yes, the larger the tree the more easily an ANR can occur.

From your logcat it seems that the ANR occurred in TreesActivity (the first trees list), coming from or trying to access Principal (the activity that hosts the diagram). It's not easy for me to understand which is the ANR cause 😬

Maybe the problem is the creation of the diagram, as discussed in #66? I planned to put the diagram creation in a asynchronous coroutine.

michelesalvador commented 4 months ago

As planned the diagram creation has been moved to a Kotlin coroutine.

https://github.com/michelesalvador/FamilyGem/blob/e08116eee8f15354d4786ff65d984d4e71f9cd87/app/src/main/java/app/familygem/main/DiagramFragment.kt#L206

Available on version 1.0.1.

Hope this can fix this ANR issue.

jer194 commented 4 months ago

Thanks for still following this issue! Unfortunately it is still there, even after upgrade to 1.0.1 (on willow, A14) .. It seems better on S9, A13.