Crash in [@ java.lang.ClassCastException: at mozilla.components.feature.prompts.dialog.ChoiceDialogFragment$choices$2.invoke(ChoiceDialogFragment.kt:32)]
Categories
(Fenix :: General, defect, P3)
Tracking
(firefox108 unaffected, firefox109 fixed, firefox110 fixed)
Tracking | Status | |
---|---|---|
firefox108 | --- | unaffected |
firefox109 | --- | fixed |
firefox110 | --- | fixed |
People
(Reporter: cpeterson, Assigned: mcarare)
References
(Regression)
Details
(Keywords: crash, regression)
Crash Data
Attachments
(3 files)
This looks like a regression in Nightly 109.0a1.
Crash report: https://crash-stats.mozilla.org/report/index/115c38aa-505a-43ad-bdd8-542950221215
Java stack trace:
java.lang.ClassCastException: android.os.Parcelable[] cannot be cast to mozilla.components.concept.engine.prompt.Choice[]
at mozilla.components.feature.prompts.dialog.ChoiceDialogFragment$choices$2.invoke(ChoiceDialogFragment.kt:32)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:21)
at mozilla.components.feature.prompts.dialog.ChoiceDialogFragment.createDialogContentView$feature_prompts_release(ChoiceDialogFragment.kt:3)
at mozilla.components.feature.prompts.dialog.ChoiceDialogFragment.createSingleChoiceDialog(ChoiceDialogFragment.kt:23)
at mozilla.components.feature.prompts.dialog.ChoiceDialogFragment.onCreateDialog(ChoiceDialogFragment.kt:114)
at androidx.fragment.app.DialogFragment.onGetLayoutInflater(DialogFragment.java:26)
at androidx.fragment.app.Fragment.performGetLayoutInflater(Fragment.java:1)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:24)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:126)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:58)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:34)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:287)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:126)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:58)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:34)
at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:34)
at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:1)
at org.mozilla.fenix.HomeActivity.onStart(HomeActivity.kt:26)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1470)
at android.app.Activity.performStart(Activity.java:8154)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3803)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2345)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:233)
at android.os.Looper.loop(Looper.java:344)
at android.app.ActivityThread.main(ActivityThread.java:8210)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034)
Reporter | ||
Updated•2 years ago
|
Comment 1•2 years ago
|
||
Looks like a regression from this commit:
https://github.com/mozilla-mobile/firefox-android/commit/50292148bee8508d62b6fc0d80d98d6477e3e00a#diff-51d292474fc49ac9794f1f2d2dde4f967191937fdd7bc8191cb811482f2462fc
Comment 2•2 years ago
|
||
Comment 3•2 years ago
|
||
Assignee | ||
Comment 4•2 years ago
|
||
Judging from the SDK version in all reports (< 33), this is not a regression, as the changes in the linked commit only changed the code handling for SDK >= 33, leaving the older version with the same handling. ( the difference consists in just the usage of a generic type <T>
instead of Choice
.)
Having said that, we can add a checked cast in the code path for SDK <33. Although, technically, this cast exception should not have happened, as our app is the one putting the values in the bundle.
Comment 5•2 years ago
|
||
Arturo, are you able to review the PR for this?
Comment 7•2 years ago
|
||
r+!
Updated•2 years ago
|
Reporter | ||
Comment 8•2 years ago
|
||
Fixed in 110.
Mihai, should we uplift this fix to Beta 109? The crash rate looks very low, so maybe we don't need to uplift it.
Assignee | ||
Comment 9•2 years ago
|
||
I do not think an uplift is necessary, but I can take care of it if anyone else thinks we should.
Reporter | ||
Comment 10•2 years ago
|
||
(In reply to Mihai Adrian Carare [:mcarare] from comment #9)
I do not think an uplift is necessary, but I can take care of it if anyone else thinks we should.
I think you can wait. Let's see if the crash is actually a problem on Beta. There's only one crash report on Beta so far. You probably have more important work.
Reporter | ||
Comment 11•2 years ago
|
||
Merged on 2022-12-20:
https://github.com/mozilla-mobile/firefox-android/commit/3b9dbb5c55de8bdeaa05fa4b56d21b961078c732
I think this is fixed because I don't see any crash reports after build ID 20221221151111.
Comment 12•2 years ago
|
||
It's a pretty trivial fix for a new regression in 109. I'd like to backport to avoid shipping a new crash to users.
Comment 13•2 years ago
|
||
Assignee | ||
Comment 14•2 years ago
|
||
Created uplift PR: https://github.com/mozilla-mobile/firefox-android/pull/473
Comment 15•2 years ago
|
||
uplift |
Fix landed for 109.0b5, thanks!
https://github.com/mozilla-mobile/firefox-android/commit/e6bc4abe4745fad9aef4483101d3952060c2edc8
Comment hidden (collapsed) |
Description
•