Repository navigation
Commit 3a44bbe
Stop filing a framework selection-sort race we cannot fix
Refs FLUTTER-6, FLUTTER-Y. This is a REPORTING change and not a defect fix.
Say that plainly: the exception still happens after this ships, we just stop
opening a Sentry event for it.
Both groups are one defect, split only by the scheduling path that reached it.
Verified against the newest event in each and against the framework source at
the exact revision production runs, 3.41.8 / 02085feb3f, which this machine
has locally. The tail is identical in both:
MultiSelectableSelectionContainerDelegate._flushAdditions
-> List.sort -> Array.sort -> _compareScreenOrder -> _getBoundingBox
-> Selectable.boundingBoxes -> RenderBox.size -> throw StateError
box.dart:2303 is `_size ?? (throw StateError('RenderBox was not laid out: ...'))`,
so this throws in release where the assert would be stripped. Every frame in
both stacks is selectable_region.dart. None is ours.
The triage note is right that it is not fixable in our code, and the mechanism
is worth writing down because it is not obvious. It is flutter/flutter#151536,
open and P2, whose reviewer describes it as selectables from obscured overlay
entries that stay registered but are never laid out. That is our shape: an
opaque pushed route puts the screen beneath it offstage, _RenderTheatre skips
layout for those entries, and a GetX rebuild underneath registers a selectable
that has no size when the post-frame flush sorts it. PR #184900 would fix it
upstream and is unmerged and contested by the framework reviewer as reactive.
There is no code-side avoidance. SelectionContainer.disabled does not penetrate
a nested SelectionArea, so gating above the sections does nothing; swapping
SelectionArea in and out of the tree changes the widget type at that position
and rebuilds every section's subtree, losing scroll and expansion state on
every dialog open. Removing SelectionArea costs text selection across the CRM.
None of those is a trade worth 9 events in 18 days.
The filter is deliberately not keyed on the message. dashboard_screen.dart
carries a documented history of real "RenderBox was not laid out" faults of our
own, and those must keep reporting. The discriminator is that the throw came
out of a JS Array sort comparator, which for this exception can only be the
framework: our own comparators sort DashboardWidgetConfig by gridY/gridX, and
our four RenderBox.size readers (ballot_row, submission_review_body,
section_nav_bar, committee_canvas_tab) are scroll-position and capture helpers
with no comparator near them.
One implementation note for whoever touches this next. beforeSend runs client
side, before upload, so the frames are the raw dart2js stack: fileName is
main.dart.js everywhere and the selectable_region.dart names only exist after
Sentry applies the source maps server side. The literal
"at Array.sort (<anonymous>)" frame survives as an unparsed frame whose
`function` carries that text, which is why the predicate reads function and not
fileName.
Expected rate after this deploys: zero from these two groups. A sighting on
dist 72 or later means the discriminator missed and the filter is wrong, not
that the framework changed.
Build bumped to 72 so the change is measurable in Sentry. Live is still dist 70
across 2525 events in 30d, so 71 never reached production.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SmeS6fuyWAfKxA5NHPMT9w1 parent f9a80e0 commit 3a44bbe
2 files changed
Lines changed: 50 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
410 | 459 | | |
411 | 460 | | |
412 | 461 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
0 commit comments