metabolist / metatext

A free, open-source iOS Mastodon client.
https://metabolist.org/metatext
GNU General Public License v3.0
727 stars 102 forks source link

Fatal Hang and Crash #167

Open mykdavies opened 2 years ago

mykdavies commented 2 years ago

Describe the bug At random times, but most often when switching back to the app, the whole screen goes blank and no further user interaction is possible. The app then closes after about 15 seconds. This state then persists through force-quits of the app, and through full restarts (power-offs) of the device. The only solution is to delete and re-install the app.

To Reproduce Steps to reproduce the behaviour:

Expected behavior Either this crash shouldn't happen or the app should be recoverable :-)

Screenshots n/a

(please complete the following information):

Additional context The app can sometimes feel quite 'janky' as if background tasks are becoming over-demanding. Not sure if there's a strong correlation here. I'm still sticking with the app though, because it is great :-)

garryknight commented 2 years ago

I've seen exactly the same behaviour, but in an iPhone 13 Pro Max with 256 GB storage, running iOS 16.1.1. It hasn't happened on my iPad yet, but I'll post here if it does.

I've found that uninstalling and reinstalling the app avoids the problem for a while, but it eventually comes back.

I've also noticed that it happens more when I'm out and about using 4G or 5G, and not so much at home on WiFi.

jzzocc commented 2 years ago

Fixing this is the top priority for the app right now, but unfortunately I don't have a lot of time to address it at the moment. I've filed a DTS ticket with Apple but they have yet to respond.

If anyone out there feels up to investigating this, here's a collection of crash logs a user frequently experiencing the issue was kind enough to send me: Metatext_ips.zip

garryknight commented 2 years ago

I don't know if this helps, but having been a software developer some decades ago, this feels to me like it could be a memory deallocation problem. The more I interact with the app, the more it slows right down, sometimes taking several seconds between my favouriting a post and seeing the yellow star appear, and then a few seconds before I can scroll the page down. It gets more and more sluggish as time goes on, then hangs. I close the app and open it again and the screen is white and stays that way until the app closes. I uninstall the app and reinstall it and sign in and it's as if nothing happened.

As I say, it feels to me as if memory is being allocated and not being freed. Please feel free to ignore this if it isn't helpful, though, as I don't code these days and realise that the code libraries usually handle this automatically.

jzzocc commented 2 years ago

OK, have a consistent repro for this now, thanks everyone who contributed info

jzzocc commented 2 years ago

Pretty sure this is due to cleaning items in SQLite on startup being slow (this whole process needs to be redone at some point), v1.6.0 should mitigate it but leaving this open until reports of this aren't as frequent

nithou commented 2 years ago

Just wanted to chime in to say I encounter the exact same problem! Only solution is to reinstall totally the app :/