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

NPE in ManagedC4Database.finalize

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.1.3
    • 3.1.x
    • Java-Android
    • Security Level: Public
    • None
    • 2

    Description

      In forum post:
      https://www.couchbase.com/forums/t/couchbase-lite-crashing-the-app-with-the-following-error-after-bumping-to-version-3-1-1/37019/3

      ... user @chauhanabhi321 encounters the following crash, using Kotlin co-routines.

      1:58:17.666 24698 24709 E System  : Uncaught exception thrown by finalizer
      09-26 21:58:17.669 24698 24709 E System  : java.lang.NullPointerException
      09-26 21:58:17.669 24698 24709 E System  :      at java.util.Objects.requireNonNull(Objects.java:220)
      09-26 21:58:17.669 24698 24709 E System  :      at com.couchbase.lite.internal.core.C4Database$ManagedC4Database.closePeer(C4Database.java:174)
      09-26 21:58:17.669 24698 24709 E System  :      at com.couchbase.lite.internal.core.C4Database$ManagedC4Database.finalize(C4Database.java:170)
      09-26 21:58:17.669 24698 24709 E System  :      at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:291)
      09-26 21:58:17.669 24698 24709 E System  :      at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:278)
      09-26 21:58:17.669 24698 24709 E System  :      at java.lang.Daemons$Daemon.run(Daemons.java:139)
      09-26 21:58:17.669 24698 24709 E System  :      at java.lang.Thread.run(Thread.java:920)
      

      The cause is the ART finalizer GC-ing the object referenced by `impl` before running the finalizer for the ManagedC4Database.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty