I have a frustrating crash occurring in my App.
I would welcome any help or advice.
I feel it must be something fundamental i have wrong as i cannot believe my use case is unique.
The App is built in SwiftUI and uses Realm Sync.
Xcode 12.4. latest releases of IOS
All was going good until I added a local realm in memory DB (i have also tried to file)
There is nothing special about the code.
It just renders a Scroll View of data items and allows the use to select individual items - toggle a status field.
I have the following crash occurring
Thread 1: EXC_BAD_ACCESS (code=1, address=0x3f)
AttributeID, unsigned Int - see attached
The crash only occurs when I logout of the App and re-login in via the biometrics option.
When the following default login screen appears.
It is a consistent crash.
I have narrowed down the unique situation the crash occurs.
The crash only occurs when i present and update the data from the local Realm DB in a SwiftUI View.
(ie toggle a data field) The update is rendered ok and all seems fine.
I have tried Modals and Nav links - all have the same result.
if i do not update the data from within the View - all is ok.
If i update the data via Realm Studio - the update is rendered ok within the App and it does not cause a crash.
If I attach the Realm data manipulation View to the main App Tab bar (whether i enter the Tabar View or not) - All is OK! … I can update the local Realm data via any App View and it does not cause and crash on re-login.
Any help or thoughts appreciated.
thanks