fenix icon indicating copy to clipboard operation
fenix copied to clipboard

[Bug] GeckoSession.close called on the wrong thread

Open agi90 opened this issue 7 years ago • 2 comments

I see this crash in the Play console, somehow it doesn't get reported to the crash reporter. At the time of writing it has 1354 occurrences in the last 7 days.

java.lang.IllegalThreadStateException: 
  at org.mozilla.gecko.util.ThreadUtils.assertOnThreadComparison (ThreadUtils.java:9)
  at org.mozilla.geckoview.GeckoSession.close (GeckoSession.java:3)
  at mozilla.components.browser.engine.gecko.GeckoEngineSession.close (GeckoEngineSession.kt:3)
  at mozilla.components.browser.session.LegacySessionManager.unlink (LegacySessionManager.kt:4)
  at mozilla.components.browser.session.LegacySessionManager.remove (LegacySessionManager.kt:5)
  at mozilla.components.browser.session.SessionManager.remove (SessionManager.kt:1)
  at mozilla.components.browser.session.SessionManager.remove$default (SessionManager.kt:2)
  at org.mozilla.fenix.home.HomeFragment$removeTabWithUndo$5.invoke (HomeFragment.kt:6)
  at org.mozilla.fenix.ext.CoroutineScopeKt$allowUndo$undoJob$1.invokeSuspend (CoroutineScope.kt:6)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:2)
  at kotlinx.coroutines.DispatchedTask.run (Dispatched.kt:15)
  at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.kt:1)
  at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely (CoroutineScheduler.kt:1)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.kt:42)

link (internal only, sadly): https://play.google.com/apps/publish/?account=7083182635971239206#AndroidMetricsErrorsPlace:p=org.mozilla.fenix&appid=4975374341268119750&appVersion&clusterName=apps/org.mozilla.fenix/clusters/507d5174&detailsAppVersion&detailsSpan=7

┆Issue is synchronized with this Jira Task

agi90 avatar May 06 '19 14:05 agi90

@agi90 around the time you filed this bug, I made a change to launch this on the Main thread https://github.com/mozilla-mobile/fenix/pull/2281 I'm wondering if this is still showing up on the console as a recent crash? (I currently don't have access to the console, but I am requesting access)

ekager avatar May 15 '19 17:05 ekager

@ekager good catch! there are 0 reports from the last 7 days so I'm assuming this was fixed by #2281 . Thanks!

agi90 avatar May 15 '19 17:05 agi90