Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

[Crash] RuntimeException: android.os.DeadSystemException at android.content.ClipboardManager.getPrimaryClip(ClipboardManager.java:136) #22958

Closed
cpeterso opened this issue Dec 22, 2021 · 4 comments
Assignees
Labels
b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info Feature:Toolbar Address bar, see also Feature:Search

Comments

@cpeterso
Copy link

cpeterso commented Dec 22, 2021

Originally reported in https://bugzilla.mozilla.org/show_bug.cgi?id=1747117

There are some crash reports from Fenix 94, but the volume spiked in 95.

https://crash-stats.mozilla.org/report/index/f6131fef-4a13-44b8-8135-f3c450211221

java.lang.RuntimeException: android.os.DeadSystemException
	at android.content.ClipboardManager.getPrimaryClip(ClipboardManager.java:136)
	at org.mozilla.fenix.utils.ClipboardHandler.getText(ClipboardHandler.kt:2)
	at org.mozilla.fenix.utils.ClipboardHandler.extractURL(ClipboardHandler.kt:1)
	at org.mozilla.fenix.search.SearchDialogFragment$observeClipboardState$1$invokeSuspend$$inlined$collect$1.emit(Collect.kt:25)
	at mozilla.components.support.ktx.kotlinx.coroutines.flow.FlowKt$ifChanged$$inlined$filter$1$2.emit(Collect.kt:9)
	at org.mozilla.fenix.search.SearchDialogFragment$observeClipboardState$1$invokeSuspend$$inlined$map$1$2.emit(Collect.kt:14)
	at mozilla.components.lib.state.ext.FragmentKt$consumeFlow$1$invokeSuspend$$inlined$filter$1$2.emit(Collect.kt:8)
	at kotlinx.coroutines.flow.FlowKt__ChannelsKt.emitAllImpl$FlowKt__ChannelsKt(Channels.kt:14)
	at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend(Channels.kt:1)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:3)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:18)
	at android.os.Handler.handleCallback(Handler.java:836)
	at android.os.Handler.dispatchMessage(Handler.java:103)
	at android.os.Looper.loop(Looper.java:232)
	at android.app.ActivityThread.main(ActivityThread.java:6806)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1103)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)

┆Issue is synchronized with this Jira Task

@github-actions github-actions bot added the needs:triage Issue needs triage label Dec 22, 2021
@mcarare mcarare added the b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info label Dec 23, 2021
@674Y3r
Copy link

674Y3r commented Jan 16, 2022

Description

I can reproduce this crash by having really long text (~300 000 characters) in clipboard. In most cases it crashes instantly after selecting url bar, but sometimes it freezes. I managed to crash it during freeze by changing from private to normal tab using button at the top of home screen (selecting options in first startup screen seems to crash it too 24ae2564-fe77-4bb6-afbe-340890220116).

It seems like this only applies to url bar, because I couldn't reproduce it by opening search boxes on pages or by going through various browser options that require keyboard input.

Links to few random crash reports (in no particular order and with browser update in between).

Additional notes:

  • I'm using AnySoftKeyboard,
    • Note: when leaving and closing frozen Firefox, keyboard didn't wanted to open until I stopped both apps in settings,
  • Clipboard was populated using pc through KDE Connect,

@mcarare
Copy link
Contributor

mcarare commented Feb 7, 2022

The fix in #23607 should mitigate the issue in this crash report.
However, after "passing" this point in the workflow without a crash, the possibility of another crash in InlineAutocompleteEditText arises. Opened mozilla-mobile/android-components#11678 in AC for follow-up.

mcarare added a commit to mcarare/fenix that referenced this issue Feb 8, 2022
…isible.

This avoids additional processing.
mergify bot pushed a commit that referenced this issue Feb 9, 2022
@mcarare
Copy link
Contributor

mcarare commented Feb 9, 2022

Fixed in #23607. Closing this, but will keep an eye on Sentry in case the problem reappears.

@mcarare mcarare closed this as completed Feb 9, 2022
mergify bot pushed a commit that referenced this issue Feb 25, 2022
This avoids additional processing.

(cherry picked from commit 18f785d)
mcarare added a commit that referenced this issue Feb 25, 2022
This avoids additional processing.

(cherry picked from commit 18f785d)
@delia-pop
Copy link

We were not able to reproduce the issue in the latest Firefox 98.1.0 RC build.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info Feature:Toolbar Address bar, see also Feature:Search
Projects
None yet
Development

No branches or pull requests

4 participants