Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-3299

Lithium: Fix NPE in finalizer

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 3.0.2
    • 3.0
    • Java, Java-Android
    • Security Level: Public
    • None
    • 1

    Description

      We've had several customer notice an NPE in C4 object finalizers. While I suspect that these are harmless, I cannot prove it.

      The problem seems to be caused by a bug in the way Android handles finalization: deleting an object's fields, even though they are being used for synchronization, before finalizing the object on which they depend.

      I suggest backporting the fix that has been in Helium for a while: using the self object as a lock. This has the significant downside that it makes the lock visible. Since the lock is visible anyway, the risk seems minimal. It has also been running in Lithium for half a year.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              blake.meike Blake Meike
              blake.meike Blake Meike
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty