Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offset argument contained a NaN value. Data initialization with Network request #1061

Closed
xuenuanxi opened this issue Jun 16, 2022 · 3 comments

Comments

@xuenuanxi
Copy link

LineChartBarData(
spots: const [
FlSpot(0, 0),
FlSpot(1, 0),
FlSpot(2, 0),
FlSpot(3, 0),
FlSpot(4, 0),
FlSpot(5, 0),
FlSpot(6, 0),
FlSpot(7, 0),
FlSpot(8, 0),
FlSpot(9, 0),
FlSpot(10, 0),
FlSpot(11, 0),
],
当数组Y轴都为0时,会报错。

报错信息如下:
The following assertion was thrown during paint():
Offset argument contained a NaN value.
'dart:ui/painting.dart':
Failed assertion: line 43 pos 10: ''

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was:
Text Text:file:///Users/wangh/Downloads/fl_chart-0.51.0/lib/src/chart/base/axis_chart/axis_chart_data.dart:124:12
When the exception was thrown, this was the stack:
#2 _offsetIsValid (dart:ui/painting.dart:43:10)
#3 Canvas.drawParagraph (dart:ui/painting.dart:4741:12)
#4 TextPainter.paint (package:flutter/src/painting/text_painter.dart:696:12)
#5 RenderParagraph.paint (package:flutter/src/rendering/paragraph.dart:742:18)
#6 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#7 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#8 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#9 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#10 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#11 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#12 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#13 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#14 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#15 RenderTransform.paint (package:flutter/src/rendering/proxy_box.dart:2419:17)
#16 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#17 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#18 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2844:15)
#19 AxisSideTitlesRenderFlex.paint (package:fl_chart/src/chart/base/axis_chart/side_titles/side_titles_flex.dart:252:5)
#20 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#21 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#22 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#23 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#24 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#25 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#26 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#27 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#28 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2844:15)
#29 RenderFlex.paint (package:flutter/src/rendering/flex.dart:1078:7)
#30 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#31 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#32 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#33 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#34 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#35 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2844:15)
#36 RenderStack.paintStack (package:flutter/src/rendering/stack.dart:611:5)
#37 RenderStack.paint (package:flutter/src/rendering/stack.dart:627:7)
#38 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#39 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#40 _RenderLayoutBuilder.paint (package:flutter/src/widgets/layout_builder.dart:340:15)
#41 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#42 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#43 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#44 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#45 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#46 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#47 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#48 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#49 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#50 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#51 PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:141:11)
#52 PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:100:5)
#53 PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:995:29)
#54 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:506:19)
#55 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:892:13)
#56 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:370:5)
#57 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1146:15)
#58 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1083:9)
#59 SchedulerBinding.scheduleWarmUpFrame. (package:flutter/src/scheduler/binding.dart:864:7)
(elided 6 frames from class _AssertionError, class _RawReceivePortImpl, class _Timer, and dart:async-patch)
The following RenderObject was being processed when the exception was fired: RenderParagraph#879be relayoutBoundary=up4
... parentData: offset=Offset(24.0, 0.0) (can use size)
... constraints: BoxConstraints(0.0<=w<=32.0, 0.0<=h<=Infinity)
... size: Size(8.0, 14.0)
... textAlign: start
... textDirection: ltr
... softWrap: wrapping at box width
... overflow: clip
... locale: en_US
... maxLines: unlimited
text: TextSpan
inherit: true
color: Color(0xff000000)
size: 12.0
"0"
RenderObject: RenderParagraph#879be relayoutBoundary=up4
parentData: offset=Offset(24.0, 0.0) (can use size)
constraints: BoxConstraints(0.0<=w<=32.0, 0.0<=h<=Infinity)
size: Size(8.0, 14.0)
textAlign: start
textDirection: ltr
softWrap: wrapping at box width
overflow: clip
locale: en_US
maxLines: unlimited
text: TextSpan
inherit: true
color: Color(0xff000000)
size: 12.0
"0"

======== Exception caught by rendering library =====================================================
The following assertion was thrown during paint():
Offset argument contained a NaN value.
'dart:ui/painting.dart':
Failed assertion: line 43 pos 10: ''

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was:
Text Text:file:///Users/wangh/Downloads/fl_chart-0.51.0/lib/src/chart/base/axis_chart/axis_chart_data.dart:124:12
When the exception was thrown, this was the stack:
#2 _offsetIsValid (dart:ui/painting.dart:43:10)
#3 Canvas.drawParagraph (dart:ui/painting.dart:4741:12)
#4 TextPainter.paint (package:flutter/src/painting/text_painter.dart:696:12)
#5 RenderParagraph.paint (package:flutter/src/rendering/paragraph.dart:742:18)
#6 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#7 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#8 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#9 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#10 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#11 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#12 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#13 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#14 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#15 RenderTransform.paint (package:flutter/src/rendering/proxy_box.dart:2419:17)
#16 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#17 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#18 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2844:15)
#19 AxisSideTitlesRenderFlex.paint (package:fl_chart/src/chart/base/axis_chart/side_titles/side_titles_flex.dart:252:5)
#20 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#21 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#22 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#23 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#24 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#25 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#26 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#27 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#28 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2844:15)
#29 RenderFlex.paint (package:flutter/src/rendering/flex.dart:1078:7)
#30 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#31 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#32 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#33 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#34 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#35 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2844:15)
#36 RenderStack.paintStack (package:flutter/src/rendering/stack.dart:611:5)
#37 RenderStack.paint (package:flutter/src/rendering/stack.dart:627:7)
#38 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#39 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#40 _RenderLayoutBuilder.paint (package:flutter/src/widgets/layout_builder.dart:340:15)
#41 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#42 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#43 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#44 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#45 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#46 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#47 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#48 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#49 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#50 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#51 PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:141:11)
#52 PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:100:5)
#53 PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:995:29)
#54 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:506:19)
#55 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:892:13)
#56 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:370:5)
#57 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1146:15)
#58 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1083:9)
#59 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:997:5)
#63 _invoke (dart:ui/hooks.dart:151:10)
#64 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:308:5)
#65 _drawFrame (dart:ui/hooks.dart:115:31)
(elided 5 frames from class _AssertionError and dart:async)
The following RenderObject was being processed when the exception was fired: RenderParagraph#879be relayoutBoundary=up4
... parentData: offset=Offset(24.0, 0.0) (can use size)
... constraints: BoxConstraints(0.0<=w<=32.0, 0.0<=h<=Infinity)
... size: Size(8.0, 14.0)
... textAlign: start
... textDirection: ltr
... softWrap: wrapping at box width
... overflow: clip
... locale: en_US
... maxLines: unlimited
text: TextSpan
inherit: true
color: Color(0xff000000)
size: 12.0
"0"
RenderObject: RenderParagraph#879be relayoutBoundary=up4
parentData: offset=Offset(24.0, 0.0) (can use size)
constraints: BoxConstraints(0.0<=w<=32.0, 0.0<=h<=Infinity)
size: Size(8.0, 14.0)
textAlign: start
textDirection: ltr
softWrap: wrapping at box width
overflow: clip
locale: en_US
maxLines: unlimited
text: TextSpan
inherit: true
color: Color(0xff000000)
size: 12.0
"0"

======== Exception caught by rendering library =====================================================
The following assertion was thrown during paint():
Offset argument contained a NaN value.
'dart:ui/painting.dart':
Failed assertion: line 43 pos 10: ''

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was:
Text Text:file:///Users/wangh/Downloads/fl_chart-0.51.0/lib/src/chart/base/axis_chart/axis_chart_data.dart:124:12
When the exception was thrown, this was the stack:
#2 _offsetIsValid (dart:ui/painting.dart:43:10)
#3 Canvas.drawParagraph (dart:ui/painting.dart:4741:12)
#4 TextPainter.paint (package:flutter/src/painting/text_painter.dart:696:12)
#5 RenderParagraph.paint (package:flutter/src/rendering/paragraph.dart:742:18)
#6 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#7 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#8 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#9 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#10 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#11 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#12 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#13 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#14 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#15 RenderTransform.paint (package:flutter/src/rendering/proxy_box.dart:2419:17)
#16 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#17 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#18 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2844:15)
#19 AxisSideTitlesRenderFlex.paint (package:fl_chart/src/chart/base/axis_chart/side_titles/side_titles_flex.dart:252:5)
#20 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#21 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#22 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#23 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#24 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#25 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#26 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#27 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#28 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2844:15)
#29 RenderFlex.paint (package:flutter/src/rendering/flex.dart:1078:7)
#30 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#31 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#32 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#33 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#34 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#35 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2844:15)
#36 RenderStack.paintStack (package:flutter/src/rendering/stack.dart:611:5)
#37 RenderStack.paint (package:flutter/src/rendering/stack.dart:627:7)
#38 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#39 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#40 _RenderLayoutBuilder.paint (package:flutter/src/widgets/layout_builder.dart:340:15)
#41 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#42 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#43 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#44 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#45 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#46 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#47 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#48 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#49 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#50 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#51 PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:141:11)
#52 PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:100:5)
#53 PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:995:29)
#54 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:506:19)
#55 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:892:13)
#56 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:370:5)
#57 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1146:15)
#58 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1083:9)
#59 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:997:5)
#63 _invoke (dart:ui/hooks.dart:151:10)
#64 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:308:5)
#65 _drawFrame (dart:ui/hooks.dart:115:31)
(elided 5 frames from class _AssertionError and dart:async)
The following RenderObject was being processed when the exception was fired: RenderParagraph#879be relayoutBoundary=up4
... parentData: offset=Offset(24.0, 0.0) (can use size)
... constraints: BoxConstraints(0.0<=w<=32.0, 0.0<=h<=Infinity)
... size: Size(8.0, 14.0)
... textAlign: start
... textDirection: ltr
... softWrap: wrapping at box width
... overflow: clip
... locale: en_US
... maxLines: unlimited
text: TextSpan
inherit: true
color: Color(0xff000000)
size: 12.0
"0"
RenderObject: RenderParagraph#879be relayoutBoundary=up4
parentData: offset=Offset(24.0, 0.0) (can use size)
constraints: BoxConstraints(0.0<=w<=32.0, 0.0<=h<=Infinity)
size: Size(8.0, 14.0)
textAlign: start
textDirection: ltr
softWrap: wrapping at box width
overflow: clip
locale: en_US
maxLines: unlimited
text: TextSpan
inherit: true
color: Color(0xff000000)
size: 12.0
"0"

======== Exception caught by rendering library =====================================================
The following assertion was thrown during paint():
Offset argument contained a NaN value.
'dart:ui/painting.dart':
Failed assertion: line 43 pos 10: ''

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was:
Text Text:file:///Users/wangh/Downloads/fl_chart-0.51.0/lib/src/chart/base/axis_chart/axis_chart_data.dart:124:12
When the exception was thrown, this was the stack:
#2 _offsetIsValid (dart:ui/painting.dart:43:10)
#3 Canvas.drawParagraph (dart:ui/painting.dart:4741:12)
#4 TextPainter.paint (package:flutter/src/painting/text_painter.dart:696:12)
#5 RenderParagraph.paint (package:flutter/src/rendering/paragraph.dart:742:18)
#6 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#7 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#8 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#9 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#10 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#11 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#12 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#13 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#14 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#15 RenderTransform.paint (package:flutter/src/rendering/proxy_box.dart:2419:17)
#16 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#17 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#18 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2844:15)
#19 AxisSideTitlesRenderFlex.paint (package:fl_chart/src/chart/base/axis_chart/side_titles/side_titles_flex.dart:252:5)
#20 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#21 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#22 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#23 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#24 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#25 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#26 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#27 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#28 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2844:15)
#29 RenderFlex.paint (package:flutter/src/rendering/flex.dart:1078:7)
#30 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#31 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#32 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#33 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#34 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#35 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2844:15)
#36 RenderStack.paintStack (package:flutter/src/rendering/stack.dart:611:5)
#37 RenderStack.paint (package:flutter/src/rendering/stack.dart:627:7)
#38 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#39 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#40 _RenderLayoutBuilder.paint (package:flutter/src/widgets/layout_builder.dart:340:15)
#41 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#42 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#43 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#44 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#45 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#46 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#47 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#48 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#49 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#50 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#51 PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:141:11)
#52 PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:100:5)
#53 PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:995:29)
#54 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:506:19)
#55 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:892:13)
#56 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:370:5)
#57 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1146:15)
#58 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1083:9)
#59 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:997:5)
#63 _invoke (dart:ui/hooks.dart:151:10)
#64 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:308:5)
#65 _drawFrame (dart:ui/hooks.dart:115:31)
(elided 5 frames from class _AssertionError and dart:async)
The following RenderObject was being processed when the exception was fired: RenderParagraph#879be relayoutBoundary=up4
... parentData: offset=Offset(24.0, 0.0) (can use size)
... constraints: BoxConstraints(0.0<=w<=32.0, 0.0<=h<=Infinity)
... size: Size(8.0, 14.0)
... textAlign: start
... textDirection: ltr
... softWrap: wrapping at box width
... overflow: clip
... locale: en_US
... maxLines: unlimited
text: TextSpan
inherit: true
color: Color(0xff000000)
size: 12.0
"0"
RenderObject: RenderParagraph#879be relayoutBoundary=up4
parentData: offset=Offset(24.0, 0.0) (can use size)
constraints: BoxConstraints(0.0<=w<=32.0, 0.0<=h<=Infinity)
size: Size(8.0, 14.0)
textAlign: start
textDirection: ltr
softWrap: wrapping at box width
overflow: clip
locale: en_US
maxLines: unlimited
text: TextSpan
inherit: true
color: Color(0xff000000)
size: 12.0
"0"

======== Exception caught by rendering library =====================================================
The following assertion was thrown during paint():
Offset argument contained a NaN value.
'dart:ui/painting.dart':
Failed assertion: line 43 pos 10: ''

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was:
Text Text:file:///Users/wangh/Downloads/fl_chart-0.51.0/lib/src/chart/base/axis_chart/axis_chart_data.dart:124:12
When the exception was thrown, this was the stack:
#2 _offsetIsValid (dart:ui/painting.dart:43:10)
#3 Canvas.drawParagraph (dart:ui/painting.dart:4741:12)
#4 TextPainter.paint (package:flutter/src/painting/text_painter.dart:696:12)
#5 RenderParagraph.paint (package:flutter/src/rendering/paragraph.dart:742:18)
#6 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#7 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#8 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#9 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#10 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#11 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#12 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#13 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#14 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#15 RenderTransform.paint (package:flutter/src/rendering/proxy_box.dart:2419:17)
#16 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#17 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#18 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2844:15)
#19 AxisSideTitlesRenderFlex.paint (package:fl_chart/src/chart/base/axis_chart/side_titles/side_titles_flex.dart:252:5)
#20 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#21 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#22 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#23 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#24 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#25 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#26 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#27 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#28 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2844:15)
#29 RenderFlex.paint (package:flutter/src/rendering/flex.dart:1078:7)
#30 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#31 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#32 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#33 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#34 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#35 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2844:15)
#36 RenderStack.paintStack (package:flutter/src/rendering/stack.dart:611:5)
#37 RenderStack.paint (package:flutter/src/rendering/stack.dart:627:7)
#38 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#39 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#40 _RenderLayoutBuilder.paint (package:flutter/src/widgets/layout_builder.dart:340:15)
#41 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#42 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#43 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#44 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#45 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#46 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#47 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#48 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#49 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#50 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#51 PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:141:11)
#52 PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:100:5)
#53 PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:995:29)
#54 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:506:19)
#55 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:892:13)
#56 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:370:5)
#57 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1146:15)
#58 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1083:9)
#59 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:997:5)
#63 _invoke (dart:ui/hooks.dart:151:10)
#64 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:308:5)
#65 _drawFrame (dart:ui/hooks.dart:115:31)
(elided 5 frames from class _AssertionError and dart:async)
The following RenderObject was being processed when the exception was fired: RenderParagraph#879be relayoutBoundary=up4
... parentData: offset=Offset(24.0, 0.0) (can use size)
... constraints: BoxConstraints(0.0<=w<=32.0, 0.0<=h<=Infinity)
... size: Size(8.0, 14.0)
... textAlign: start
... textDirection: ltr
... softWrap: wrapping at box width
... overflow: clip
... locale: en_US
... maxLines: unlimited
text: TextSpan
inherit: true
color: Color(0xff000000)
size: 12.0
"0"
RenderObject: RenderParagraph#879be relayoutBoundary=up4
parentData: offset=Offset(24.0, 0.0) (can use size)
constraints: BoxConstraints(0.0<=w<=32.0, 0.0<=h<=Infinity)
size: Size(8.0, 14.0)
textAlign: start
textDirection: ltr
softWrap: wrapping at box width
overflow: clip
locale: en_US
maxLines: unlimited
text: TextSpan
inherit: true
color: Color(0xff000000)
size: 12.0
"0"

======== Exception caught by rendering library =====================================================
The following assertion was thrown during paint():
Offset argument contained a NaN value.
'dart:ui/painting.dart':
Failed assertion: line 43 pos 10: ''

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was:
Text Text:file:///Users/wangh/Downloads/fl_chart-0.51.0/lib/src/chart/base/axis_chart/axis_chart_data.dart:124:12
When the exception was thrown, this was the stack:
#2 _offsetIsValid (dart:ui/painting.dart:43:10)
#3 Canvas.drawParagraph (dart:ui/painting.dart:4741:12)
#4 TextPainter.paint (package:flutter/src/painting/text_painter.dart:696:12)
#5 RenderParagraph.paint (package:flutter/src/rendering/paragraph.dart:742:18)
#6 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#7 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#8 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#9 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#10 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#11 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#12 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#13 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#14 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#15 RenderTransform.paint (package:flutter/src/rendering/proxy_box.dart:2419:17)
#16 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#17 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#18 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2844:15)
#19 AxisSideTitlesRenderFlex.paint (package:fl_chart/src/chart/base/axis_chart/side_titles/side_titles_flex.dart:252:5)
#20 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#21 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#22 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#23 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#24 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#25 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#26 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#27 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#28 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2844:15)
#29 RenderFlex.paint (package:flutter/src/rendering/flex.dart:1078:7)
#30 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#31 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#32 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#33 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#34 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#35 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2844:15)
#36 RenderStack.paintStack (package:flutter/src/rendering/stack.dart:611:5)
#37 RenderStack.paint (package:flutter/src/rendering/stack.dart:627:7)
#38 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#39 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#40 _RenderLayoutBuilder.paint (package:flutter/src/widgets/layout_builder.dart:340:15)
#41 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#42 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#43 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:79:15)
#44 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#45 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#46 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#47 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#48 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)
#49 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:140:15)
#50 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2477:7)
#51 PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:141:11)
#52 PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:100:5)
#53 PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:995:29)
#54 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:506:19)
#55 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:892:13)
#56 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:370:5)
#57 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1146:15)
#58 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1083:9)
#59 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:997:5)
#63 _invoke (dart:ui/hooks.dart:151:10)
#64 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:308:5)
#65 _drawFrame (dart:ui/hooks.dart:115:31)
(elided 5 frames from class _AssertionError and dart:async)
The following RenderObject was being processed when the exception was fired: RenderParagraph#879be relayoutBoundary=up4
... parentData: offset=Offset(24.0, 0.0) (can use size)
... constraints: BoxConstraints(0.0<=w<=32.0, 0.0<=h<=Infinity)
... size: Size(8.0, 14.0)
... textAlign: start
... textDirection: ltr
... softWrap: wrapping at box width
... overflow: clip
... locale: en_US
... maxLines: unlimited
text: TextSpan
inherit: true
color: Color(0xff000000)
size: 12.0
"0"
RenderObject: RenderParagraph#879be relayoutBoundary=up4
parentData: offset=Offset(24.0, 0.0) (can use size)
constraints: BoxConstraints(0.0<=w<=32.0, 0.0<=h<=Infinity)
size: Size(8.0, 14.0)
textAlign: start
textDirection: ltr
softWrap: wrapping at box width
overflow: clip
locale: en_US
maxLines: unlimited
text: TextSpan
inherit: true
color: Color(0xff000000)
size: 12.0
"0"

@stargazing-dino
Copy link

Can you please reformat your issue? It's very hard to read. See here for quoting code

It's also good practice because it avoids unnecessarily referencing other issues from accidental pound "#" signs followed by numbers

@imaNNeo
Copy link
Owner

imaNNeo commented Jun 17, 2022

Thank you, @Nolence.
It makes me happy to see people like you are contributing!

@imaNNeo
Copy link
Owner

imaNNeo commented Jan 30, 2023

Reporter is irresponsive

@imaNNeo imaNNeo closed this as completed Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants