-
Type: Bug
-
Resolution: Fixed
-
Priority: Trivial - P5
-
None
-
Affects Version/s: None
-
Component/s: None
How frequently does the bug occur?
Yes
Description
func testdeletSubDBChecklistQuestions(checklistQuestionId: String, inspectionCaseNumberKey: String){ let deleteData = realm.objects(DBChecklistQuestion.self).filter("checklistQuestionId == %@ && inspectionCaseNumberKey == %@", checklistQuestionId, inspectionCaseNumberKey) if(!deleteData.isEmpty) { print("Deleted the sub question") DispatchQueue.main.async { try? self.realm.write { self.realm.delete(Array(deleteData)) } } } }
Error Message : Terminating app due to uncaught exception 'RLMException', reason: 'List is no longer valid. Either the parent object was deleted or the containing Realm has been invalidated or closed.'
Stacktrace & log output
No response
Can you reproduce the bug?
Always
Reproduction Steps
No response
Version
10.40.2
What Atlas Services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
iOS
Build environment
Xcode version: ...
Dependency manager and version: ...
Realm : 10.40.2
RealmDatabase : 13.15.0