Skip to content

Better error message for sliver grid #13861

Description

@long1eu

I'm getting a NaN in sliver_grid.dart.

I/flutter (13931): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter (13931): The following UnsupportedError was thrown during performLayout():
I/flutter (13931): Unsupported operation: Infinity or NaN toInt
I/flutter (13931): 
I/flutter (13931): When the exception was thrown, this was the stack:
I/flutter (13931): #0      _Double.toInt (dart:core-patch/dart:core/double.dart:151)
I/flutter (13931): #1      _Double.ceil (dart:core-patch/dart:core/double.dart:126)
I/flutter (13931): #2      SliverGridDelegateWithMaxCrossAxisExtent.getLayout (package:flutter/src/rendering/sliver_grid.dart:425)
I/flutter (13931): #3      RenderSliverGrid.performLayout (package:flutter/src/rendering/sliver_grid.dart:522)

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: error messageError messages from the Flutter frameworkc: crashStack traces logged to the consoleframeworkflutter/packages/flutter repository. See also f: labels.waiting for PR to land (fixed)A fix is in flight

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions