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

Null check operator used on a null value #311

Closed
xaldarof opened this issue Jun 18, 2022 · 3 comments
Closed

Null check operator used on a null value #311

xaldarof opened this issue Jun 18, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@xaldarof
Copy link

xaldarof commented Jun 18, 2022

When the exception was thrown, this was the stack:
#0 _EpubViewState._buildLoaded. (package:epub_view/src/ui/epub_view.dart:380:38)
#1 _PositionedListState._buildItem (package:scrollable_positioned_list/src/positioned_list.dart:252:54)
#2 _PositionedListState.build. (package:scrollable_positioned_list/src/positioned_list.dart:223:27)
#3 SliverChildBuilderDelegate.build (package:flutter/src/widgets/sliver.dart:471:22)
#4 SliverMultiBoxAdaptorElement._build (package:flutter/src/widgets/sliver.dart:1236:28)
#5 SliverMultiBoxAdaptorElement.createChild. (package:flutter/src/widgets/sliver.dart:1250:55)
#6 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2597:19)
#7 SliverMultiBoxAdaptorElement.createChild (package:flutter/src/widgets/sliver.dart:1242:12)
#8 RenderSliverMultiBoxAdaptor._createOrObtainChild. (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:349:23)
#9 RenderObject.invokeLayoutCallback. (package:flutter/src/rendering/object.dart:2025:59)
#10 PipelineOwner._enableMutationsToDirtySubtrees (package:flutter/src/rendering/object.dart:918:15)
#11 RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:2025:14)
#12 RenderSliverMultiBoxAdaptor._createOrObtainChild (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:338:5)
#13 RenderSliverMultiBoxAdaptor.insertAndLayoutLeadingChild (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:454:5)
#14 RenderSliverList.performLayout (package:flutter/src/rendering/sliver_list.dart:128:29)
#15 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#16 RenderSliverEdgeInsetsPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:137:12)
#17 RenderSliverPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:371:11)
#18 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#19 RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:510:13)
#20 UnboundedRenderViewport._attemptLayout (package:scrollable_positioned_list/src/viewport.dart:281:12)
#21 UnboundedRenderViewport.performLayout (package:scrollable_positioned_list/src/viewport.dart:182:20)
#22 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#23 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#24 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#25 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#26 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#27 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#28 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#29 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#30 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#31 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#32 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#33 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#34 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#35 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#36 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#37 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#38 RenderCustomPaint.performLayout (package:flutter/src/rendering/custom_paint.dart:545:11)
#39 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#40 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#41 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#42 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#43 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#44 ChildLayoutHelper.layoutChild (package:flutter/src/rendering/layout_helper.dart:56:11)
#45 RenderStack._computeSize (package:flutter/src/rendering/stack.dart:552:43)
#46 RenderStack.performLayout (package:flutter/src/rendering/stack.dart:579:12)
#47 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#48 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#49 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#50 _RenderLayoutBuilder.performLayout (package:flutter/src/widgets/layout_builder.dart:318:14)
#51 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#52 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#53 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#54 ChildLayoutHelper.layoutChild (package:flutter/src/rendering/layout_helper.dart:56:11)
#55 RenderStack._computeSize (package:flutter/src/rendering/stack.dart:552:43)
#56 RenderStack.performLayout (package:flutter/src/rendering/stack.dart:579:12)
#57 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#58 MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:171:12)
#59 _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:1003:7)
#60 MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:240:7)
#61 RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:403:14)
#62 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#63 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#64 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#65 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#66 _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1376:11)
#67 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#68 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#69 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#70 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#71 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#72 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#73 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#74 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#75 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#76 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#77 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#78 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#79 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#80 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#81 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#82 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#83 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#84 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#85 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#86 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#87 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#88 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#89 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#90 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#91 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#92 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#93 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#94 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#95 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#96 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#97 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#98 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#99 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#100 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#101 RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:3462:13)
#102 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#103 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#104 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#105 _RenderTheatre.performLayout (package:flutter/src/widgets/overlay.dart:749:15)
#106 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#107 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#108 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#109 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#110 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#111 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#112 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#113 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#114 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#115 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#116 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#117 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#118 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#119 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#120 RenderObject.layout (package:flutter/src/rendering/object.dart:1915:7)
#121 RenderView.performLayout (package:flutter/src/rendering/view.dart:165:14)
#122 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1757:7)
#123 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:887:18)
#124 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:504:19)
#125 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:892:13)
#126 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:370:5)
#127 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1146:15)
#128 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1083:9)
#129 SchedulerBinding.scheduleWarmUpFrame. (package:flutter/src/scheduler/binding.dart:864:7)
(elided 4 frames from class _RawReceivePortImpl, class _Timer, and dart:async-patch)

@xaldarof xaldarof added the bug Something isn't working label Jun 18, 2022
@Letalus
Copy link

Letalus commented Jul 13, 2022

@xaldarof formatting your error log correctly would help immensely

@Thelm76
Copy link

Thelm76 commented Oct 25, 2022

It would also avoid it from being wrongly referenced in every other issue on this repo...

@fauzipadlaw
Copy link

I'm getting the same error in production release

_CastError: Null check operator used on a null value
  File "sliver.dart", line 1521, in SliverMultiBoxAdaptorElement.estimateMaxScrollOffset
  File "sliver_list.dart", line 308, in RenderSliverList.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "viewport.dart", line 550, in RenderViewportBase.layoutChildSequence
  File "viewport.dart", line 1634, in RenderViewport._attemptLayout
  File "viewport.dart", line 1541, in RenderViewport.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "custom_paint.dart", line 552, in RenderCustomPaint.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "layout_builder.dart", line 315, in _RenderLayoutBuilder.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "layout_helper.dart", line 56, in ChildLayoutHelper.layoutChild
  File "flex.dart", line 903, in RenderFlex._computeSizes
  File "flex.dart", line 938, in RenderFlex.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "custom_layout.dart", line 171, in MultiChildLayoutDelegate.layoutChild
  File "scaffold.dart", line 1080, in _ScaffoldLayout.performLayout
  File "custom_layout.dart", line 240, in MultiChildLayoutDelegate._callPerformLayout
  File "custom_layout.dart", line 410, in RenderCustomMultiChildLayoutBox.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "proxy_box.dart", line 1467, in _RenderCustomClip.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "custom_layout.dart", line 171, in MultiChildLayoutDelegate.layoutChild
  File "scaffold.dart", line 1080, in _ScaffoldLayout.performLayout
  File "custom_layout.dart", line 240, in MultiChildLayoutDelegate._callPerformLayout
  File "custom_layout.dart", line 410, in RenderCustomMultiChildLayoutBox.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "proxy_box.dart", line 1467, in _RenderCustomClip.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "proxy_box.dart", line 3815, in RenderOffstage.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "proxy_box.dart", line 120, in RenderProxyBoxMixin.performLayout
  File "object.dart", line 2189, in RenderObject.layout
  File "box.dart", line 2430, in RenderBox.layout
  File "overlay.dart", line 856, in _RenderTheatre.performLayout
  File "object.dart", line 2027, in RenderObject._layoutWithoutResize
  File "object.dart", line 1020, in PipelineOwner.flushLayout
  File "binding.dart", line 516, in RendererBinding.drawFrame
  File "binding.dart", line 865, in WidgetsBinding.drawFrame
  File "binding.dart", line 381, in RendererBinding._handlePersistentFrameCallback
  File "binding.dart", line 1289, in SchedulerBinding._invokeFrameCallback
  File "binding.dart", line 1218, in SchedulerBinding.handleDrawFrame
  File "binding.dart", line 1076, in SchedulerBinding._handleDrawFrame
  File "zone.dart", line 1398, in _rootRun
  File "zone.dart", line 1300, in _CustomZone.run
  File "zone.dart", line 1208, in _CustomZone.runGuarded
  File "hooks.dart", line 147, in _invoke
  File "platform_dispatcher.dart", line 338, in PlatformDispatcher._drawFrame
  File "hooks.dart", line 112, in _drawFrame

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants