mhdhejazi / CoronaTracker

Coronavirus tracker app for iOS & macOS with maps & charts
https://coronatracker.samabox.com/
GNU General Public License v3.0
1.54k stars 288 forks source link

App crashes after 3-4 days since last build #93

Open jsf030 opened 4 years ago

jsf030 commented 4 years ago

For some reason the app always crashes about 3-4 days after the build. Restarting the iPhone or exiting manually does not change this. This is now the case for several versions. Maybe it has something to do with memory management, the handling of the loaded data?

mhdhejazi commented 4 years ago

This is very strange. It never happened to me before. I don't think it's a memory management issue. Is it still crashing?

andricop commented 4 years ago

Yes, same problem here with iOS 13.4.1

jsf030 commented 4 years ago

I recompiled the app two days ago, so I won't be able to let you know until the next days. It has appeared three times so far, whenever you didn't add any features for a few days that I wanted to try and therefore didn't recompile.

mhdhejazi commented 4 years ago

For some reason, I'm not having this issue. The app never crashes on my phone. Also, I can't see crash reports from your devices, so I'm not able to understand what's exactly happening. Let's see if somebody could help with more info or the steps to reproduce.

an20olives commented 4 years ago

Hey, this issue seems to occur randomly for some users, a lot of those who encounter it seem to be on a variation of iOS 12 with some encountering an orange screen and loading indicator in the upper right. I have seen crashing at launch and after a few days as well. I have not been able to reproduce these issues either.

Edit: Someone sent me this in regards to what they experience during the crash.

mhdhejazi commented 4 years ago

Seeing a crash log helps a lot. Here is how you can see crash logs from your phone:

Xcode > Window menu > Device and Simulators > Your iPhone > View Device Logs > Type "Corona" in the search field

If you find a crash log, you can export it (Right-click > Export Log) and let me take a look to figure out what causes the crash.

jsf030 commented 4 years ago

I can't confirm that. The app crashes again, but without displaying any UI elements. I'm on the iOS Public Beta, so you can't get more up to date than this. Will look for a log during the next build.

an20olives commented 4 years ago

Here is one of the crash logs I was sent. https://pastebin.com/Z3ZuKf51

mhdhejazi commented 4 years ago

Thank you for the log!

The crash in this log is caused by a missing image (the share icon), but it doesn't make sense. I guess this crash is caused by some app/tool installed on the jailbroken device.

an20olives commented 4 years ago

That is very odd, that was my suggestion to them, to run the app without tweaks, it seems to be a a gamble on if it works on some jailbroken devices, very odd thank you for the info.

Here is another log.

mhdhejazi commented 4 years ago

The second log is basically the same. Theoretically, it's impossible for this crash to happen on a normal device.

an20olives commented 4 years ago

Gotcha, I just wanted to send that over to make sure they were consistent crashes, thanks for looking them over. I definitely feel like a tweak could be the cause of this issue. Thank you for the information.

andricop commented 4 years ago

Hi, It happened again 2 times with version 1.7 on a non-jailbroken device with iOS 13.4.1. Nothing in the logs. Could it be linked to the fact that the device is managed by an MDM and that the app is not signed ?

mhdhejazi commented 4 years ago

Not sure, but if it was a signing issue you wouldn't be able to run the app again after the crash until you fix the issue or resign the app. It could be a memory issue, but this is just a speculation. It's hard to guess the exact reason without a crash log or being able to reproduce it.

andricop commented 4 years ago

Had to reinstall it again at least 3 times. What I've noted is that each time the dev app profile linked to the app in Settings->General->Device Management has disappeared So I'm still wondering if it's not linked to the fact that the device is managed by my company with an MDM and when it finds an unknown profile it removes it ?

mhdhejazi commented 4 years ago

To be honest, I have no prior experience with MDM, but I guess it could very well be the case. When the profile is removed/corrupted, the app would close instantly after you open it (because the system isn't able to decrypt the app anymore) until you remove it and reinstall again.