Details
Description
Reported in the forum https://forums.couchbase.com/t/corrupt-revision-data-error-when-saving-documents/34741/1.
SDK: Couchbase Lite C
Version: 3.0.2
OS: iOS & Android
Error: kCBLErrorCorruptRevisionData
This error has only been observed through error reports from user devices, and I have not been able to replicate it.
It seems that saving a document can sometimes corrupt it, since after the first time this error has been returned when saving a document, subsequent attempts to save the document always fail with the same error. The document can still be purged, though.
There are also crashes in CBLDatabase_SaveDocumentWithConcurrencyControl and CBLDocument::properties that seem related. It would make sense to me that once a document has been corrupted, invariants that certain code relies on don’t hold anymore.
The error message only contains the error code. Looking at the source code, only in a few places is a corruptRevisionData error thrown without a message. Additional logging or an error message describing the problem might be the first step to diagnose the issue.
Attachments
Issue Links
- relates to
-
CBL-3841 Add error message along with ErrorCorruptRevisionData Exception
- Closed