Crash when many collision happen
Works fine like version 1.18.0
No response
No response
No response
ββββββββ Exception caught by scheduler library βββββββββββββββββββββββββββββββββ
The following _TypeError was thrown during a scheduler callback:
type 'Null' is not a subtype of type 'Component' in type cast
When the exception was thrown, this was the stack:
#0 _CompactIterator.current (dart:collection-patch/compact_hash.dart:728:29)
#1 _OrderedSetIterator.current (package:ordered_set/ordered_set.dart:191:36)
#2 Iterable.forEach (dart:core/iterable.dart:347:35)
#3 Component.updateTree (package:flame/src/components/core/component.dart:527:16)
#4 FlameGame.updateTree (package:flame/src/game/flame_game.dart:163:17)
#5 HasTimeScale.updateTree (package:flame/src/components/mixins/has_time_scale.dart:35:11)
#6 FlameGame.update (package:flame/src/game/flame_game.dart:152:7)
#7 HasQuadTreeCollisionDetection.update (package:flame/src/collisions/broadphase/quadtree/has_quadtree_collision_detection.dart:84:11)
#8 HasTimeScale.update (package:flame/src/components/mixins/has_time_scale.dart:30:11)
#9 BonfireGame.update (package:bonfire/base/bonfire_game.dart:188:11)
#10 GameRenderBox.gameLoopCallback (package:flame/src/game/game_render_box.dart:121:10)
#11 GameLoop._tick (package:flame/src/game/game_loop.dart:46:13)
#12 Ticker._tick (package:flutter/src/scheduler/ticker.dart:261:12)
#13 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1397:15)
#14 SchedulerBinding.handleBeginFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:1240:11)
#15 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:633:13)
#16 SchedulerBinding.handleBeginFrame (package:flutter/src/scheduler/binding.dart:1238:17)
#17 SchedulerBinding._handleBeginFrame (package:flutter/src/scheduler/binding.dart:1155:5)
#18 _invoke1 (dart:ui/hooks.dart:328:13)
#19 PlatformDispatcher._beginFrame (dart:ui/platform_dispatcher.dart:397:5)
#20 _beginFrame (dart:ui/hooks.dart:272:31)
This exception was thrown in the context of a scheduler callback. When the scheduler callback was _registered_ (as opposed to when the exception was thrown), this was the stack:
#2 SchedulerBinding.scheduleFrameCallback (package:flutter/src/scheduler/binding.dart:611:49)
#3 Ticker.scheduleTick (package:flutter/src/scheduler/ticker.dart:277:46)
#4 Ticker.start (package:flutter/src/scheduler/ticker.dart:183:7)
#5 GameLoop.start (package:flame/src/game/game_loop.dart:54:15)
#6 GameRenderBox._attachGame (package:flame/src/game/game_render_box.dart:97:16)
#7 GameRenderBox.attach (package:flame/src/game/game_render_box.dart:88:5)
#8 RenderObject.adoptChild (package:flutter/src/rendering/object.dart:1841:13)
#9 ContainerRenderObjectMixin.insert (package:flutter/src/rendering/object.dart:4324:5)
#10 MultiChildRenderObjectElement.insertRenderObjectChild (package:flutter/src/widgets/framework.dart:6974:18)
#11 RenderObjectElement.attachRenderObject (package:flutter/src/widgets/framework.dart:6732:35)
#12 RenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6597:5)
#13 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4468:16)
#14 MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:7035:36)
#15 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:7047:32)
#16 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4468:16)
#17 Element.updateChild (package:flutter/src/widgets/framework.dart:3957:20)
#18 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642:16)
#19 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5780:11)
#20 Element.rebuild (package:flutter/src/widgets/framework.dart:5333:7)
#21 BuildScope._tryRebuild (package:flutter/src/widgets/framework.dart:2693:15)
#22 BuildScope._flushDirtyElements (package:flutter/src/widgets/framework.dart:2752:11)
#23 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:3048:18)
#24 _LayoutBuilderElement._rebuildWithConstraints (package:flutter/src/widgets/layout_builder.dart:231:12)
#25 RenderObject.invokeLayoutCallback.<anonymous closure> (package:flutter/src/rendering/object.dart:2719:59)
#26 PipelineOwner._enableMutationsToDirtySubtrees (package:flutter/src/rendering/object.dart:1098:15)
#27 RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:2719:14)
#28 RenderConstrainedLayoutBuilder.rebuildIfNecessary (package:flutter/src/widgets/layout_builder.dart:278:5)
#29 _RenderLayoutBuilder.performLayout (package:flutter/src/widgets/layout_builder.dart:369:5)
#30 RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#31 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#32 RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#33 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#34 RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#35 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#36 RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#37 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#38 RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#39 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#40 RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#41 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#42 _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1448:11)
#43 RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#44 _RenderLayoutBuilder.performLayout (package:flutter/src/widgets/layout_builder.dart:371:14)
#45 RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#46 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#47 RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#48 ChildLayoutHelper.layoutChild (package:flutter/src/rendering/layout_helper.dart:61:11)
#49 RenderStack._computeSize (package:flutter/src/rendering/stack.dart:595:43)
#50 RenderStack.performLayout (package:flutter/src/rendering/stack.dart:622:12)
#51 RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#52 ChildLayoutHelper.layoutChild (package:flutter/src/rendering/layout_helper.dart:61:11)
#53 RenderStack._computeSize (package:flutter/src/rendering/stack.dart:595:43)
#54 RenderStack.performLayout (package:flutter/src/rendering/stack.dart:622:12)
#55 RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#56 MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:173:12)
#57 _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:1092:7)
#58 MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:237:7)
#59 RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:404:14)
#60 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:2446:7)
#61 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1052:18)
#62 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1065:15)
#63 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:602:23)
#64 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:1164:13)
#65 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:468:5)
#66 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1397:15)
#67 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1318:9)
#68 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1176:5)
#69 _invoke (dart:ui/hooks.dart:312:13)
#70 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:419:5)
#71 _drawFrame (dart:ui/hooks.dart:283:31)
(elided 2 frames from class _FrameCallbackEntry)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[β] Flutter (Channel stable, 3.24.0, on Zorin OS 17.1 6.5.0-25-generic, locale pt_BR.UTF-8)
β’ Flutter version 3.24.0 on channel stable at /home/rafael/flutter
β’ Upstream repository https://github.com/flutter/flutter.git
β’ Framework revision 80c2e84975 (3 months ago), 2024-07-30 23:06:49 +0700
β’ Engine revision b8800d88be
β’ Dart version 3.5.0
β’ DevTools version 2.37.2
[β] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
β’ Android SDK at /home/rafael/Android/Sdk
β’ Platform android-34, build-tools 34.0.0
β’ Java binary at: /home/rafael/android-studio/jbr/bin/java
β’ Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
β’ All Android licenses accepted.
[β] Chrome - develop for the web
β’ CHROME_EXECUTABLE = /var/lib/flatpak/exports/bin/com.google.Chrome
[β] Linux toolchain - develop for Linux desktop
β’ Ubuntu clang version 14.0.0-1ubuntu1.1
β’ cmake version 3.22.1
β’ ninja version 1.10.1
β’ pkg-config version 0.29.2
[β] Android Studio (version 2023.1)
β’ Android Studio at /home/rafael/android-studio
β’ Flutter plugin can be installed from:
π¨ https://plugins.jetbrains.com/plugin/9212-flutter
β’ Dart plugin can be installed from:
π¨ https://plugins.jetbrains.com/plugin/6351-dart
β’ Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
[β] VS Code (version 1.93.0)
β’ VS Code at /usr/share/code
β’ Flutter extension version 3.98.0
[β] Connected device (2 available)
β’ Linux (desktop) β’ linux β’ linux-x64 β’ Zorin OS 17.1 6.5.0-25-generic
β’ Chrome (web) β’ chrome β’ web-javascript β’ Google Chrome 130.0.6723.58
[β] Network resources
β’ All expected network resources are available.
β’ No issues found!
All
No response
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too