Open Bug 1872192 Opened 1 year ago Updated 7 months ago

Crash in [@ java.lang.NullPointerException: at mozilla.appservices.places.uniffi.PlacesConnection.noteHistoryMetadataObservation(places.kt)]

Categories

(Fenix :: History, defect, P5)

x86
Android
defect

Tracking

(firefox121 affected, firefox122 affected, firefox123 affected)

Tracking Status
firefox121 --- affected
firefox122 --- affected
firefox123 --- affected

People

(Reporter: cpeterson, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: crash)

Crash Data

Crash report: https://crash-stats.mozilla.org/report/index/998f1ad9-fb47-4d66-ba31-549fc0231227

100% of these crash reports are from x86 or x86_64 devices running Android 5.0 or 5.1 (API 21 or 22). These crashes are probably the same Kotlin coroutine issue as bug 1804115 and bug 1844964: https://github.com/Kotlin/kotlinx.coroutines/issues/490

Exception: java.lang.NullPointerException
Message: Attempt to invoke virtual method 'long java.util.concurrent.atomic.AtomicLong.decrementAndGet()' on a null object reference

Frame   Module  Function  Source
0   mozilla.appservices.places.uniffi.PlacesConnection  noteHistoryMetadataObservation  places.kt:77
1   mozilla.appservices.places.PlacesWriterConnection   noteHistoryMetadataObservation  PlacesConnection.kt:19
2   mozilla.components.browser.storage.sync.PlacesHistoryStorage$noteHistoryMetadataObservation$2   invokeSuspend   PlacesHistoryStorage.kt:63
3   kotlin.coroutines.jvm.internal.BaseContinuationImpl   resumeWith  ContinuationImpl.kt:9
4   kotlinx.coroutines.DispatchedTask   run   DispatchedTask.kt:112
5   java.util.concurrent.ThreadPoolExecutor   runWorker   ThreadPoolExecutor.java:1112
6   java.util.concurrent.ThreadPoolExecutor$Worker  run   ThreadPoolExecutor.java:587
7   java.lang.Thread  run   Thread.java:818

I'm trying to wrap my head around this issue, but I still don't understand it. AFAICT, it's an issue with the a particular Kotlin coroutine implementation, is that correct? Is there a general workaround for this? Was solution found for the other bugs?

(In reply to Ben Dean-Kawamura [:bdk] from comment #1)

I'm trying to wrap my head around this issue, but I still don't understand it. AFAICT, it's an issue with the a particular Kotlin coroutine implementation, is that correct? Is there a general workaround for this? Was solution found for the other bugs?

Unfortunately, there is no known fix or workaround, other than downgrading to an older version of the kotlinx.coroutines library and never updating. The kotlinx.coroutines bug was reported in 2018 and it's still open: https://github.com/Kotlin/kotlinx.coroutines/issues/490

In that case, this bug is probably not actionable and might be a WONTFIX or a P5.

The severity field is not set for this bug.
:vdreghici, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(Vlad.DreghiciPopa)

(In reply to Chris Peterson [:cpeterson] from comment #0)

100% of these crash reports are from x86 or x86_64 devices running Android 5.0 or 5.1 (API 21 or 22). These crashes are probably the same Kotlin coroutine issue as bug 1804115 and bug 1844964: https://github.com/Kotlin/kotlinx.coroutines/issues/490

Looking over other tickets and the coroutines issue, this seems like an issue we cannot really do much about. I will assign P5, but due to it being a crash I believe an S3 level of severity would be ok to be set.

Thanks for all the details, Chris!

Severity: -- → S3
Flags: needinfo?(Vlad.DreghiciPopa)
Priority: -- → P5
Depends on: 1911110
You need to log in before you can comment on or make changes to this bug.