Uploaded image for project: 'Realm Cocoa SDK'
  1. Realm Cocoa SDK
  2. RCOCOA-2124

Repeat from Step 1 to 3, it doesn't reach 4, and crashes with exception

      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

            Assignee:
            lee.maguire@mongodb.com Lee Maguire
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: