Crash in [@ java.lang.IllegalArgumentException: at androidx.compose.ui.unit.Constraints$Companion.bitsNeedForSize(Constraints.kt:41)]
Categories
(Firefox for Android :: Homepage, defect, P2)
Tracking
()
People
(Reporter: cpeterson, Assigned: 007)
References
(Regression)
Details
(Keywords: crash, regression, Whiteboard: [fxdroid][group1])
Crash Data
Attachments
(1 file)
Crash report: https://crash-stats.mozilla.org/report/index/7db4208a-0b37-49ef-8a9b-687e60230701
This is not a recent crash signature, but its crash volume spiked in 114.
Deep in the stack trace is one mozilla. function:
at android.widget.LinearLayout.onMeasure(LinearLayout.java:685)
at org.mozilla.fenix.perf.HomeActivityRootLinearLayout.onMeasure(HomeActivityRootLinearLayout.kt:11)
Java stack trace:
java.lang.IllegalArgumentException: Can't represent a size of 2147483646 in Constraints
at androidx.compose.ui.unit.Constraints$Companion.bitsNeedForSize(Constraints.kt:41)
at androidx.compose.ui.unit.Constraints$Companion.createConstraints-Zbe2FdA$ui_unit_release(Constraints.kt:18)
at androidx.compose.ui.unit.ConstraintsKt.Constraints(Constraints.kt:25)
at androidx.compose.foundation.layout.RowColumnImplKt$rowColumnMeasurePolicy$1.measure-3p2s80s(RowColumnImpl.kt:397)
at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.kt:42)
at androidx.compose.foundation.layout.FillModifier.measure-3p2s80s(Size.kt:100)
at androidx.compose.ui.node.BackwardsCompatNode.measure-3p2s80s(BackwardsCompatNode.kt:15)
at androidx.compose.ui.node.LayoutModifierNodeCoordinator.measure-BRTryo0(LayoutModifierNodeCoordinator.kt:11)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasure$2.invoke(LayoutNodeLayoutDelegate.kt:9)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:64)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$observeReads$1$1.invoke(SnapshotStateObserver.kt:7)
at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(Unknown Source:44)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:117)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.remeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:107)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.measure-BRTryo0(LayoutNodeLayoutDelegate.kt:136)
at androidx.compose.foundation.layout.RowColumnImplKt$rowColumnMeasurePolicy$1.measure-3p2s80s(RowColumnImpl.kt:179)
at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.kt:42)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasure$2.invoke(LayoutNodeLayoutDelegate.kt:9)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:64)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$observeReads$1$1.invoke(SnapshotStateObserver.kt:7)
at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(Unknown Source:44)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:117)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.remeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:107)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.measure-BRTryo0(LayoutNodeLayoutDelegate.kt:136)
at androidx.compose.ui.layout.RootMeasurePolicy.measure-3p2s80s(RootMeasurePolicy.kt:49)
at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.kt:42)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasure$2.invoke(LayoutNodeLayoutDelegate.kt:9)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:64)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$observeReads$1$1.invoke(SnapshotStateObserver.kt:7)
at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(Unknown Source:44)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:117)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.remeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:107)
at androidx.compose.ui.node.MeasureAndLayoutDelegate.doRemeasure-sdFAvZA(MeasureAndLayoutDelegate.kt:18)
at androidx.compose.ui.node.MeasureAndLayoutDelegate.remeasureOnly(MeasureAndLayoutDelegate.kt:27)
at androidx.compose.ui.node.MeasureAndLayoutDelegate.recurseRemeasure(MeasureAndLayoutDelegate.kt:1)
at androidx.compose.ui.node.MeasureAndLayoutDelegate.measureOnly(MeasureAndLayoutDelegate.kt:28)
at androidx.compose.ui.platform.AndroidComposeView.onMeasure(AndroidComposeView.android.kt:94)
at android.view.View.measure(View.java:23300)
at androidx.compose.ui.platform.AbstractComposeView.internalOnMeasure$ui_release(ComposeView.android.kt:64)
at androidx.compose.ui.platform.AbstractComposeView.onMeasure(ComposeView.android.kt:4)
at android.view.View.measure(View.java:23300)
at androidx.recyclerview.widget.RecyclerView$LayoutManager.measureChildWithMargins(RecyclerView.java:93)
at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:60)
at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:54)
at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:825)
at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:61)
at androidx.recyclerview.widget.RecyclerView.onMeasure(RecyclerView.java:64)
at android.view.View.measure(View.java:23300)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6928)
at androidx.coordinatorlayout.widget.CoordinatorLayout.onMeasureChild(CoordinatorLayout.java:7)
at com.google.android.material.appbar.HeaderScrollingViewBehavior.onMeasureChild(HeaderScro...
| Reporter | ||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 1•3 years ago
•
|
||
From crash reporting looks like this exact report is seen first in 114.1.1. Looking at the changes for 114.1.1 there is only one change that could have caused this. It's turning on the Juno onboarding as an experiment.
Comment 2•3 years ago
|
||
One thing do note is that all the devices that have this exact crash stack are non-Google devices.
Comment 3•3 years ago
|
||
From this discussion it looks like this is a problem with a scrollable column (or scrollview) inside another scrollable column.
Comment 4•3 years ago
|
||
Confirmed that 114.1.0 was release but this issue was only first seen in 114.1.1. So highly probably this is related to the Juno onboarding experiment.
Comment 5•3 years ago
•
|
||
Looks like I was wrong. There are similar crashes. The difference is that the line number in the crash stack is different so Sentry separated them out as different crashes. This means this crash is not really crashing more than before.
| Reporter | ||
Comment 6•3 years ago
|
||
(In reply to Roger Yang [:royang] from comment #5)
Looks like I was wrong. There are similar crashes. The difference is that the line number in the crash stack is different so Sentry separated them out as different crashes. This means this crash is not really crashing more than before.
Socorro shows that this crash signature (even when ignoring line numbers) occurred before v114, but spiked in v114. It jumped from 8 reports in v113 to 639 reports in v114:
About 82% of the reports are from API 26 (Android 8.0) devices.
| Reporter | ||
Comment 7•3 years ago
|
||
Rahul says we updated recyclerview from 1.2.1 to 1.3.0 in 114 (bug 1822447), so this crash might be a regression in recyclerview 1.3.0.
Comment 8•3 years ago
|
||
:royang have there been any updates on the investigation, do we know the cause?
Comment 9•3 years ago
|
||
There is a discussion here. It seems like Google is actively working on a fix. Looks like currently the only way to fix this is to move back to 1.3.1. We first moved from 1.3.1 to 1.4.2 first in v114, which match up to the crash reports except for the Focus v111 crashes.
Do we/can we/should we go back down to compose 1.3.1 until Google fix this? Adding Noah for some insights.
| Assignee | ||
Comment 10•3 years ago
|
||
I would check, if you haven't already/if it's possible to reproduce, if 1.3.1 (or the newer 1.3.x dot version) fixes the issue.
I originally bumped the version to 1.4.2 in Bug 1826457 to fix a different crash in the Tabs Tray rewrite. So if we need to bump down the version, it will block the Tabs Tray rewrite until Google introduces another 1.4 dot release with a patch.
https://developer.android.com/jetpack/androidx/releases/compose-ui
Comment 11•3 years ago
|
||
:cpeterson I agree with :007 that we shouldn't downgrade. Is it acceptable that we wait for Google's fix?
| Reporter | ||
Comment 12•3 years ago
|
||
(In reply to Roger Yang [:royang] from comment #11)
:cpeterson I agree with :007 that we shouldn't downgrade. Is it acceptable that we wait for Google's fix?
You know the details better than I do, but that sounds reasonable if temporarily downgrading Compose UI would be too invasive. In the meantime, we should keep an eye on the crash volume.
I see that Google's bug is priority P1 and Status "In Progress", though they haven't given an ETA. If they don't release a fix soon (when?), we may want to revisit the downgrade decision.
| Reporter | ||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 13•3 years ago
|
||
do we have a timeline for how long we want to wait for Google to fix this?
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
Comment 14•3 years ago
|
||
No estimate. Looks like a Google developer only started working on this issue July 5th 2023. We'll have to wait till the compose update before this can be fixed. No workaround from our end. Since if we downgrade we re-introduce a different crash. I've subscribed to the Google issue and if there is any update, I'll update here as well.
Comment 15•3 years ago
|
||
Set release status flags based on info from the regressing bug 1826457
Updated•3 years ago
|
| Reporter | ||
Comment 16•3 years ago
|
||
Google just fixed the bug upstream today:
https://issuetracker.google.com/issues/283090850#comment17
They didn't say which compose-ui version will include the fix. I see there are new 1.5.0 and 1.6.0-alpha versions of compose-ui available, but neither includes the fix yet. Hopefully this fix will make the final 1.6.0 release. Unfortunately, Google appears to release compose-ui quarterly, so the final 1.6.0 probably won't be released until Q4.
https://developer.android.com/jetpack/androidx/releases/compose-ui#version_16_2
| Reporter | ||
Comment 17•3 years ago
|
||
Mihai, I see you updated Compose from 1.4.2 to 1.5.0 last week in bug 1850473. Google announced that their bug fix for this crash is now available in Compose 1.5.1 (and 1.6.0-alpha05), so we should update Fenix from Compose 1.5.0 to 1.5.1 soon.
Comment 18•3 years ago
•
|
||
The update to Compose 1.5.1 patch has landed in main.
| Reporter | ||
Comment 19•3 years ago
|
||
(In reply to Mihai Adrian Carare [:mcarare] from comment #18)
The update to Compose 1.5.1 patch has landed in main.
https://github.com/mozilla-mobile/firefox-android/commit/1ddee02780adebf39fe29e8755b5121cd02b7235
Thanks! I'll resolve this bug as fixed and monitor the crash reports in Nightly:
| Reporter | ||
Comment 20•3 years ago
|
||
Since:
- this fix is a third-party library update and not just a crash fix in our own code
- and the crash volume isn't super high (or at least lower than some of our other current top crashes)
we can let this fix ride the trains without uplifting to Beta or a dot release.
Updated•3 years ago
|
| Reporter | ||
Comment 21•2 years ago
•
|
||
Reopening this bug because we're still getting crash reports from versions >= 119.
Also, the crash volume roughly doubled on 2023-10-01. Maybe that was caused releasing Fx 118 on 2023-09-26 or by updating to Compose 1.5.2 on 2023-09-27 in bug 1855524? No action needed at this time since we can't downgrade Compose. :(
Airbnb and SoundCloud people commenting on the Google issue confirm they can still reproduce the crash in Compose 1.5.3:
| Reporter | ||
Comment 22•2 years ago
|
||
Google issue https://issuetracker.google.com/issues/283090850 was resolved as "fixed"; the new issue tracking these crashes is https://issuetracker.google.com/issues/300280216.
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 23•2 years ago
|
||
The bug is linked to a topcrash signature, which matches the following criterion:
- Top 10 AArch64 and ARM crashes on beta
:mcarare, could you consider increasing the severity of this top-crash bug?
For more information, please visit BugBot documentation.
Comment 24•2 years ago
|
||
https://issuetracker.google.com/issues/303737196 with a similar stacktrace is marked as fixed in the next release. We should revisit the crash stats after we upgrade.
| Reporter | ||
Comment 25•2 years ago
|
||
(In reply to Mihai Adrian Carare [:mcarare] from comment #24)
https://issuetracker.google.com/issues/303737196 with a similar stacktrace is marked as fixed in the next release. We should revisit the crash stats after we upgrade.
That bug was marked fixed on 2023-11-30. Since then, Google has published more three minor versions of 1.5 and two more 1.6.0-beta releases, but none of their release notes mention issue 303737196. So hopefully this fix will be included in the final 1.6.0 release.
https://developer.android.com/jetpack/androidx/releases/compose-compiler
Updated•2 years ago
|
Comment 26•2 years ago
|
||
Based on the topcrash criteria, the crash signatures linked to this bug are not in the topcrash signatures anymore.
For more information, please visit BugBot documentation.
Comment 27•2 years ago
|
||
Since this is an S2, any chance we will see a fix and uplift request for Fx123 before release?
Comment 28•2 years ago
|
||
The fix is in the unreleased compose material 1.7.0 version, which is still in the alpha release stage, so I don't expect to see it soon.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 29•2 years ago
|
||
The crash volume spiked in Fenix 126. Could you investigate or redirect the request?
Comment 30•2 years ago
|
||
I am not actively working on this since we can't fix the crash in our code and we are expecting it to be fixed on the API side. The last info suggests that the crashes would be fixed in 1.7.0 ( still in beta stage as of May 14, 2024).
I am also unassigning myself if someone else wants to take over a separate investigation thread.
Will comeback to revisit this as soon as we land the Compose upgrade.
| Assignee | ||
Comment 31•2 years ago
|
||
See bug for full info. TLDR: BoxWithConstraints is likely causing crashes when paired with our weird hybrid RecyclerView + Compose implementation of the Homepage
| Assignee | ||
Comment 32•2 years ago
|
||
Copied from Slack:
Based on what I can see on Sentry, it kinda looks like it’s crashing on Homepage.
- Within this stack trace there’s a
RecyclerViewcall before compose code- Only the Homepage is structured like this (it has an underlying
Recyclerviewwith individual components written in Compose)
- Only the Homepage is structured like this (it has an underlying
- With the breadcrumbs I’m seeing, the Homepage is being navigated to.
- One of common culprits for a stack trace like this is a component called
BoxWithConstraintsand theRecentlyVisitedcomposable on the homepage uses this.
If this hypothesis were to be true, we might be able to fix this by a small rewrite of RecentlyVisited to not use BoxWithConstraints. The homepage also shouldn’t be in this weird limbo state of using a RecyclerView with Compose; we should prioritize finishing that migration.
With regards to Tabs Tray showing up in some of the breadcrumbs, the only reasonable theory I have is that:
- User goes to home page
- User opens the Tabs Tray while the homepage is incomplete
- The homepage tries to finish rendering
- Crash :explode:
Comment 33•2 years ago
|
||
Tracking this due to the volume spike in 126.
Noah, the attached wip patch looks risky for 126 but might be ok for 127 beta after some time in nightly.
Any updates on the Comment 32, were you able to reproduce or do you still have the same theory on the cause?
Is there anything we can do for 126 in the meantime? (e.g. revert/disable whatever introduce the spike in 126)
Comment 34•2 years ago
|
||
The bug is marked as tracked for firefox126 (release), tracked for firefox127 (beta) and tracked for firefox128 (nightly). However, the bug still isn't assigned.
:towhite, could you please find an assignee for this tracked bug? Given that it is a regression and we know the cause, we could also simply backout the regressor. If you disagree with the tracking decision, please talk with the release managers.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 35•2 years ago
|
||
(In reply to Donal Meehan [:dmeehan] from comment #33)
Tracking this due to the volume spike in 126.
Noah, the attached wip patch looks risky for 126 but might be ok for 127 beta after some time in nightly.
Any updates on the Comment 32, were you able to reproduce or do you still have the same theory on the cause?
Is there anything we can do for 126 in the meantime? (e.g. revert/disable whatever introduce the spike in 126)
I'm going to discuss this with the primary reviewer tomorrow when he's back from PTO, so I'll hopefully have a better update EOD (Pacific time) tomorrow.
Unfortunately, I have yet to reproduce the crash, so the fix is still speculative. I agree with letting it bake for a little in Nightly before uplifting to Beta, if the proposed patch is approved. There is nothing we can do for 126, since the crash was seemingly spurred on by a Compose library version bump last year and more started spiking recently.
Comment 36•2 years ago
|
||
:007 do you know why the crash volume has dropped in beta?
Fx127 is lower than when Fx126 was in beta, is there a change in Fx127 that could explain the drop?
| Assignee | ||
Comment 37•2 years ago
|
||
I don't have any immediate hypotheses why the volume would have dropped in 127. I plan on moving forward with the above patch though and it'll land this week.
Updated•2 years ago
|
Comment 38•2 years ago
•
|
||
I added a see-also for bug 1896955 -- its crash-volume-spike seems to match the timeline of this bug here, and both of them are IllegalArgumentException, so it seems like they might have a common/similar root cause. (Perhaps they should be duped to avoid redundant investigations/work?)
(pollymce ran across a Google bug report with some relevant info in bug 1896955 comment 7, too.)
Comment 39•2 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM] from bug 1896955 comment #8)
Hard to judge for sure, but we did update to BOM 2024.04.01 in bug 1892160 for 127+ it looks like maybe the crash rate is lower on Beta 127 vs. Beta 126?
Seems like this comment from the other bug is more clearly showing in this one. We might want to consider uplifting the BOM update for the next Android dot release. Should do so cleanly.
Comment 40•2 years ago
|
||
Comment 41•2 years ago
|
||
| bugherder | ||
Comment 42•2 years ago
|
||
The patch landed in nightly and beta is affected.
:007, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox127towontfix.
For more information, please visit BugBot documentation.
Comment 43•2 years ago
|
||
(In reply to BugBot [:suhaib / :marco/ :calixte] from comment #42)
The patch landed in nightly and beta is affected.
Notably, it looks like crash volume on beta127 with this signature is extremely low, possibly for reasons discussed in bug 1896955 comment 8 (bug 1892160 having landed there, possibly mitigating this issue).
So it's possible beta127 is not-really-affected, at least by the recent giant crash spike, which might be relevant to the beta-uplift cost/benefit for the patch that landed here.
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
Description
•