Artificial-Pancreas / iAPS

MIT License
169 stars 714 forks source link

Statistics charts make freeze/crash the APP #778

Open charlesstyves opened 1 month ago

charlesstyves commented 1 month ago

iAPS 4.6.0 on iOS 16.7.8 (iPhone 8)

Made the update from V2.3.3 to V4.6.0 four days ago.

Everything is working great except the statistic zone. If I scroll down slowly, I see the TIR and Loop charts. If I scroll down again, I see the IOB/COB charts but I can't get back to BG/Prediction chart. The app is freezing and need to be restart.

Similar situation happen if I scroll down fast. The app freeze after the Loop chart and I'm not able to see the IOB/COB chart. The app need to be restart.

Do you want me to test something or get more informations? Feel free to ask.

Is there a way to reset to zero the statistic file?

Thanks

charlesstyves commented 1 month ago

After more testing, I confirmed that I can go back and forth between the BG/Predictions chart and the Statistics charts. It’s all about the speed of the scroll up and down. I need to be very very slow and scroll carefully to don’t make the app crash.

Jon-b-m commented 1 month ago

How fast you scroll shouldn’t matter. The statistics are updated every loop cycle or upon every new glucose reading, no matter how fast you scroll. Could you please connect to Xcode while triggering this crash and show me the console output? You’re the first person to report this issue, so I would like to get more info to resolve it, please.

Did you do a new clone or did you pull updates into your own fork? If the latter can I please have your GitHub URL?

charlesstyves commented 1 month ago

See below a screen record of the bug : https://1drv.ms/v/s!Ava9W-9sEF5hgeFiyBYAyfpMFa-Org

See below the GitHub fork link : https://github.com/charlesstyves/iAPS

Update from V2.3.3 to V4.6.0 was made into the same fork.

For XCode console, I don’t use it. I’m using GitHub workflows to build the app. If you know a way to share a report file, tell me how and I would do it.

Thanks.

charlesstyves commented 1 month ago

More information : I have installed iAPS as simulator on my iOS17 iPhone. Working fine. It’s look like a iOS16 problem. After observation, it’s look lime happening when the screen is update to show the small BG chart on the top. A combination of this screen update with a too fast scrolling look like causing the freeze of the app. May be those i formations could help.

Jon-b-m commented 1 month ago

Ok. There are some iOS 17 Swift functions which is not used when on iOS 16. I will probably update the minimum iOS when iOS 18 is released.

charlesstyves commented 1 month ago

That’s make sens. We use an iPhone 8 (iOS16) for my son to let it having a smaller size phone. By using iOS16, we are away from the common path of orhers users, so it’s normal that some bog like this could happen. It’s not a major problem. Suggestion : May be a patch could be to not show the small BG graph on iOS16.

Thanks to take time to did the follow up.

Jon-b-m commented 1 month ago

Yes