Closed Bug 1896955 Opened 1 year ago Closed 1 year ago

androidx.compose.foundation.layout.RowColumnMeasurementHelper.measureWithoutPlacing Crash in [@ java.lang.IllegalArgumentException: at kotlin.math.MathKt__MathJVMKt.roundToInt(MathJVM.kt:4)]

Categories

(Firefox for Android :: Homepage, defect, P1)

Firefox 126
All
Android
defect

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox126 + fixed
firefox127 + fixed

People

(Reporter: cpeterson, Assigned: towhite)

References

(Regression)

Details

(Keywords: crash, regression, topcrash, Whiteboard: [fxdroid][group2])

Crash Data

Crash report: https://crash-stats.mozilla.org/report/index/87397dda-9ec8-48a0-a488-849140240514

I don't know if this bug is actionable by us. The stack trace is deep in androidx.compose code. I'm filing this bug in the Fenix::Homepage component because, deep in the stack track, is one Mozilla method related to the HomeActivity:

org.mozilla.fenix.perf.HomeActivityRootLinearLayout.onMeasure(HomeActivityRootLinearLayout.kt:11)

100% of the crash reports are from Android 8-10 (API 26-29).

java.lang.IllegalArgumentException: Cannot round NaN value.

Top 10 frames:

0  kotlin.math.MathKt__MathJVMKt  roundToInt  MathJVM.kt:4
1  androidx.compose.foundation.layout.RowColumnMeasurementHelper  measureWithoutPlacing-_EkL_-Y  RowColumnMeasurementHelper.kt:284
2  androidx.compose.foundation.layout.RowColumnMeasurePolicy  measure-3p2s80s  RowColumnImpl.kt:45
3  androidx.compose.ui.node.InnerNodeCoordinator  measure-BRTryo0  InnerNodeCoordinator.kt:39
4  androidx.compose.foundation.layout.FillNode  measure-3p2s80s  Size.kt:101
5  androidx.compose.ui.node.LayoutModifierNodeCoordinator  measure-BRTryo0  LayoutModifierNodeCoordinator.kt:15
6  androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasureBlock$1  invoke  LayoutNodeLayoutDelegate.kt:9
7  androidx.compose.runtime.snapshots.Snapshot$Companion  observe  Snapshot.kt:60
8  androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap  observe  SnapshotStateObserver.kt:48
9  androidx.compose.runtime.snapshots.SnapshotStateObserver  observeReads  SnapshotStateObserver.kt:154
See Also: → 1896154

The bug is linked to a topcrash signature, which matches the following criteria:

  • Top 10 AArch64 and ARM crashes on beta
  • Top 10 AArch64 and ARM crashes on release

For more information, please visit BugBot documentation.

Keywords: topcrash

(In reply to Sebastian Hengst [:aryx] (needinfo me if it's about an intermittent or backout) from comment #2)

Is the crash volume increase from bug 1876398?

Good catch. They do look related. I see this bug's stack trace is similar to other crashes caused by bug 1876398. Also, this crash signature's volume started increasing around March 21, right when bug 1876398 landed.

Tom, you landed a fix for bug 1889097, another Compose crash regression from bug 1876398. Do you think a similar fix is possible for this Compose crash?

Flags: needinfo?(towhite)
Keywords: regression
Regressed by: 1876398
Hardware: Unspecified → All

Tracking due to the increase in volume.
To add to Comment 3, we have a dot release scheduled next week for Fx126. We could include a fix if we have something after on Tom's investigation

(I'm noticing that the crash spike here is quite similar to bug 1841578; maybe they're connected at some way? Adding see-also, in any case.)

See Also: → 1841578

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 and has low priority.

:towhite, could you please find an assignee and increase the priority 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.

Flags: needinfo?(towhite)

FYI this compose crash is currently in progress at Google. The issuetracker entry is worth reading as there are a couple of repro steps and possible ideas / workarounds suggested (eg. it might be related to AlertDialogs, check you don't have any dynamic weight calculation that might return infinity, check for missing CompositionLocals)

(In reply to Polly McEldowney [:pollymce] from comment #7)

FYI this compose crash is currently in progress at Google. The issuetracker entry is worth reading as there are a couple of repro steps and possible ideas / workarounds suggested (eg. it might be related to AlertDialogs, check you don't have any dynamic weight calculation that might return infinity, check for missing CompositionLocals)

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?

See Also: → 1892160

(In reply to Ryan VanderMeulen [:RyanVM] from comment #8)

(In reply to Polly McEldowney [:pollymce] from comment #7)

FYI this compose crash is currently in progress at Google. The issuetracker entry is worth reading as there are a couple of repro steps and possible ideas / workarounds suggested (eg. it might be related to AlertDialogs, check you don't have any dynamic weight calculation that might return infinity, check for missing CompositionLocals)

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?

Nice! There are mixed reports on the issuetracker on whether that upgrade actually helps reduce the crashes :)
But it does look like that upgrade adds some more detailed logging around stack traces which may be useful, in this commit

This is a reminder regarding comment #6!

The bug is marked as tracked for firefox126 (release), tracked for firefox127 (beta) and tracked for firefox128 (nightly). We have limited time to fix this, the soft freeze is in 9 days. However, the bug still isn't assigned and has low priority.

Flags: needinfo?(towhite)
Priority: P3 → P1
Whiteboard: [fxdroid][group2]
Assignee: nobody → towhite

So far we are not seeing this crash signature in 128 (which includes https://bugzilla.mozilla.org/show_bug.cgi?id=1841578). Should we uplift the patch to Beta?

Flags: needinfo?(nbond)
Flags: needinfo?(cpeterson)

Drive by setting Fx126 to wontfix.
The crash rate on Fx126 is now much better since we shipped 126.0.1 with Bug 1892160

Should we close this out?

Flags: needinfo?(towhite)

(In reply to twhite from comment #11)

So far we are not seeing this crash signature in 128 (which includes https://bugzilla.mozilla.org/show_bug.cgi?id=1841578). Should we uplift the patch to Beta?

(In reply to Donal Meehan [:dmeehan] from comment #12)

Drive by setting Fx126 to wontfix.
The crash rate on Fx126 is now much better since we shipped 126.0.1 with Bug 1892160

Since 127 RC is next week and Donal says 126.0.1 reduced the crash rate in Fx126, we probably don't need to uplift the fix for bug 1841578 to Beta 127. (Plus, Pascal already set bug 1841578's status-firefox127=wontfix.)

Flags: needinfo?(nbond)
Flags: needinfo?(cpeterson)

(In reply to Ryan VanderMeulen [:RyanVM] from comment #13)

Should we close this out?

Yes, given the the low crash rate since 126.0.1 I think we can close this off.

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

Since 127 RC is next week and Donal says 126.0.1 reduced the crash rate in Fx126, we probably don't need to uplift the fix for bug 1841578 to Beta 127. (Plus, Pascal already set bug 1841578's status-firefox127=wontfix.)

Chris, thanks, yep sounds like we don't need to uplift. NI'd you for visibility.

Flags: needinfo?(towhite) → needinfo?(cpeterson)
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WONTFIX
Depends on: 1892160
Resolution: WONTFIX → FIXED
Target Milestone: --- → 127 Branch
Flags: needinfo?(cpeterson)
Version: unspecified → Firefox 126
You need to log in before you can comment on or make changes to this bug.