ruuvi / com.ruuvi.station.ios

iOS Ruuvi Station
BSD 3-Clause "New" or "Revised" License
34 stars 21 forks source link

Chart crashes with large number of datapoints -defect- 2.8.0 (2406062026) #2045

Closed DG12 closed 4 weeks ago

DG12 commented 1 month ago

A sensor has sufficient data points being charted will cause a crash. See related default all issue #2042

Example my 450A front door has 107,398 data points! (Didn't know that!) Charting 12 hours takes 12 seconds. taping to next sensor crashes (sometimes!)

markoaamunkajo commented 1 month ago

I cannot initially make my app crash at least, I think not enough sensor data to be downloaded to app.

DG12 commented 1 month ago

I have shared '450A front door' with you. that fails (for me) predictability.

DG12 commented 1 month ago

Oh Dear! My wife has a iPhone 13 Pro Max (yes!) and it does not exhibit problem (with only 1 sensor)

priyonto commented 1 month ago

@DG12 What device you are using?

priyonto commented 1 month ago

You can try login to your wife's device with your account where you have several sensors and try?

laurijamsa commented 1 month ago

I think testing with such small number of datapoints (full 10 day sync from the cloud has only less than 3k points) will not reveal any issues. The big question ia that how the heck your sensor has over 100k points stored in your phone??

1min interval for 10 days would be only 14 400 data points.

DG12 commented 1 month ago

Sensor 450A is transmitting via advertisements to iPhone, i.e. NOT via gateway. 2024-05-27 21:15:23 2024-05-27 21:16:24 2024-05-27 21:17:24 2024-05-27 21:18:23 2024-05-27 21:19:24 2024-05-27 21:20:24 ... 2024-06-06 21:14:35 2024-06-06 21:14:37 2024-06-06 21:14:40 2024-06-06 21:14:43

107,454 datapoints

DG12 commented 1 month ago

priyonto " login to your wife's device "... Not married are you! :-)

laurijamsa commented 1 month ago

What kinf of bg scanning settings your app has? Every 1min? And do you keep the app on foreground how much? When on foreground, all datapoints are saved to database. If the app is open long times, that could explain this.

DG12 commented 1 month ago

Deleted app and data. fresh install (200403012040) add only one(1) senosr, No change in settings. Added new user DG1@cccu.us . Download history from sensor only gets 2,870 entries

2024-05-28 11:57:44 2024-05-28 12:02:44 2024-05-28 12:07:45 ... 2024-06-07 11:30:45 2024-06-07 11:35:46 2024-06-07 11:40:46 2024-06-07 11:45:47

Now collecting at much faster rate (as expected) No change in settings, i.e. settings as installed.

2024-06-07 11:54:22 2024-06-07 11:54:26 2024-06-07 11:54:30 2024-06-07 11:54:35 2024-06-07 11:54:40

DG12 commented 1 month ago

I try to have station running in background all then time, however drains iPhone battery really quickly.

priyonto commented 1 month ago

@DG12 I can't reproduce the issue, neither with your sensor nor mine.

DG12 commented 1 month ago

I have deleted all data and installed 240607 1700 . Added 8 sensors (3 just now) Synced 450A, 3B86, 53F1, AD03, BB12, 20BC locally stored measurements 30,659 ; Database size 7.5MB

5 days, scroll through all OK 10 days SPLAT! 7 days OK 8 days SPLAT! 8 days OK !! 8 days OK 9 days OK 10 DAYS OKAY!! minimize 10 Days ( PS not even grunty perhaps a second or 2 on sensorsn with most data) close station (and all the other apps too )

startup now 31,912 measurements 7.8MB 10 Days OKAY !

What can I say!

DG12 commented 1 month ago

Device iPhone Xs Max IOS 16.7 Settings are default BG scan on, 5minutes limit alert notify on chart showall off defaults (all default, those I expect of interest here) chart interval 300s, duration 240h data logging foreground interval 2s

most recent testing 8 sensors 35,147 measurements, 8.7MB shutdown phone/boot. no user initiated apps started/running MB free memory before starting station 1,308MB of 4GB(humm)

20BC all starts 06/03 06:00, ends now 08:27 Splat. restart 8:28 all 20BC, 230E 24c4, 3b86,450a,53f1,ad03,bb12, ad03,53f1,450a,3b86,24c2,230e,20bc 230e,24c2,3b86,450a,53f1,ad03,bb12 . ad03,53f1,450a Splat. 7 >, ad03,53f1,450a Splat 7> ,7<, 3< SPLAT I Believe 3B86 started than crash. 7>, 3< 450A 7>, 7<,7>, 7<, 7>, 7<, 7>, ... I give up

DG12 commented 1 month ago

240618 0213 , Device iPhone Xs Max IOS 16.7 Settings are default (same as always) stored measurements 175,661; database 47.7MB chart time 1hour, all sensors is fine. 2h several swipes past all SPLAT! shutdown all other apps. start again, 4 days 29 chart views. SPALT! restart still 4 days first chart view OK, swipe once,SPLAT! restart AGAIN swipe once splat again 39 swipes ! 71 wow. OVEFR 100 WOW 8days : 5, 6, 60, 7, 5, 20, ALL: 23, 15, 42

priyonto commented 4 weeks ago

@DG12 @markoaamunkajo Try to reproduce the issue on 2.9.0 (2406230122) from firebase.

DG12 commented 4 weeks ago

240623 0204 10 sensors, 313,973 measurements, data base 84.9MB (wow) 1hr forward all ok, < all OK, > all ok <all OK! 1day > all ok, < all ok, > all ok, < all ok 5days > all OK, < all OK! , > all OK, < all OK! all > ALL OKAY!, < ALL OKAY!, > all OKAY!, < all Okei Ihmeellinen ! 💯 👍🏼 👍🏼