JohanDegraeve / xdripswift

xdrip for iOS, written in Swift
GNU General Public License v3.0
327 stars 320 forks source link

App Crash on new NFC scan #420

Open OliNix opened 1 year ago

OliNix commented 1 year ago

When I scan a new Libre 2 sensor, the app crashes on the first scan. The second scan then connects successfully.

Procedure as follows: 1) Select old sensor from Bluetooth list. 2) Press disconnect 3) Press “+” to add new sensor 4) NFC scan 5) App crash 6) Quit app from switcher 7) Relaunch app 8) Press “+” in Bluetooth tab 9) NFC scan 10) Successful connection

Logs submitted via email

OliNix commented 1 year ago

Crash re-creatable on sensor disconnect and reconnect also. Does not have to be new sensor

m-a-v commented 1 year ago

I can confirm this. I didn't have time until now to check how to make it reproducible. Thanks @OliNix for the reproduction steps.

paulplant commented 1 year ago

We knew about this crash when we released 4.11.0. It was even written in the post about the release notes post in Facebook so that people knew it would happen. It only happens the first time, then it is fine.

image

We considered it better to just let the app crash the first time, then to not release and not fix the scan problems some users were having.

The crash is caused by the numberOfSections issue (which has always existed), now it just happens more since we are refreshing the table more often due to the new workflow.

OliNix commented 1 year ago

I did note this, but could not see an open issue so it could be tracked