getx
getx copied to clipboard
Get 5.0.0-beta.50 throws StackOverflowError
After upgrading from beta.36
to beta.50
I'm unable to launch my app:
════════ Exception caught by widgets library ═══════════════════════════════════
The following StackOverflowError was thrown building Builder(dirty, dependencies: [Binder<GetMaterialController>]):
Stack Overflow
The relevant error-causing widget was
GetMaterialApp
lib/main.dart:56
When the exception was thrown, this was the stack
#0 _OperatorEqualsAndHashCode._hashCode (dart:collection-patch[/compact_hash.dart:191:3]())
#1 _LinkedHashMapMixin._getValueOrData (dart:collection-patch[/compact_hash.dart:497:26]())
#2 _LinkedHashMapMixin.containsKey (dart:collection-patch[/compact_hash.dart:517:54]())
#3 Inst.isRegistered
package:get/…/src/extension_instance.dart:476
#4 Inst.find
package:get/…/src/extension_instance.dart:274
#5 GetMaterialController.to
package:get/…/root/root_controller.dart:74
#6 GetNavigationExt._getxController
package:get/…/src/extension_navigation.dart:1271
#7 GetNavigationExt.routing
package:get/…/src/extension_navigation.dart:1247
#8 GetMaterialController.onInit
package:get/…/root/root_controller.dart:108
#9 GetLifeCycleMixin.onStart
package:get/…/src/lifecycle.dart:50
#10 Inst._startController
package:get/…/src/extension_instance.dart:244
#11 Inst._initDependencies
package:get/…/src/extension_instance.dart:194
#12 Inst.find
package:get/…/src/extension_instance.dart:287
#13 GetMaterialController.to
package:get/…/root/root_controller.dart:74
#14 GetNavigationExt._getxController
package:get/…/src/extension_navigation.dart:1271
#15 GetNavigationExt.routing
package:get/…/src/extension_navigation.dart:1247
#16 GetMaterialController.onInit
package:get/…/root/root_controller.dart:108
#17 GetLifeCycleMixin.onStart
package:get/…/src/lifecycle.dart:50
#18 Inst._startController
package:get/…/src/extension_instance.dart:244
#19 Inst._initDependencies
package:get/…/src/extension_instance.dart:194
#20 Inst.find
package:get/…/src/extension_instance.dart:287
#21 GetMaterialController.to
package:get/…/root/root_controller.dart:74
#22 GetNavigationExt._getxController
package:get/…/src/extension_navigation.dart:1271
#23 GetNavigationExt.routing
package:get/…/src/extension_navigation.dart:1247
#24 GetMaterialController.onInit
package:get/…/root/root_controller.dart:108
#25 GetLifeCycleMixin.onStart
package:get/…/src/lifecycle.dart:50
#26 Inst._startController
package:get/…/src/extension_instance.dart:244
#27 Inst._initDependencies
package:get/…/src/extension_instance.dart:194
#28 Inst.find
package:get/…/src/extension_instance.dart:287
#29 GetMaterialController.to
package:get/…/root/root_controller.dart:74
#30 GetNavigationExt._getxController
package:get/…/src/extension_navigation.dart:1271
#31 GetNavigationExt.routing
package:get/…/src/extension_navigation.dart:1247
#32 GetMaterialController.onInit
package:get/…/root/root_controller.dart:108
#33 GetLifeCycleMixin.onStart
package:get/…/src/lifecycle.dart:50
#34 Inst._startController
package:get/…/src/extension_instance.dart:244
#35 Inst._initDependencies
package:get/…/src/extension_instance.dart:194
#36 Inst.find
package:get/…/src/extension_instance.dart:287
#37 GetMaterialController.to
package:get/…/root/root_controller.dart:74
#38 GetNavigationExt._getxController
package:get/…/src/extension_navigation.dart:1271
#39 GetNavigationExt.routing
package:get/…/src/extension_navigation.dart:1247
#40 GetMaterialController.onInit
package:get/…/root/root_controller.dart:108
#41 GetLifeCycleMixin.onStart
package:get/…/src/lifecycle.dart:50
#42 Inst._startController
package:get/…/src/extension_instance.dart:244
#43 Inst._initDependencies
package:get/…/src/extension_instance.dart:194
2 ...
#4002 ComponentElement._firstBuild
package:flutter/…/widgets/framework.dart:4735
#4003 ComponentElement.mount
package:flutter/…/widgets/framework.dart:4729
... Normal element mounting (19 frames)
#4022 Element.inflateWidget
package:flutter/…/widgets/framework.dart:3790
#4023 Element.updateChild
package:flutter/…/widgets/framework.dart:3540
#4024 RenderObjectToWidgetElement._rebuild
package:flutter/…/widgets/binding.dart:1198
#4025 RenderObjectToWidgetElement.mount
package:flutter/…/widgets/binding.dart:1167
#4026 RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure>
package:flutter/…/widgets/binding.dart:1112
#4027 BuildOwner.buildScope
package:flutter/…/widgets/framework.dart:2600
#4028 RenderObjectToWidgetAdapter.attachToRenderTree
package:flutter/…/widgets/binding.dart:1111
#4029 WidgetsBinding.attachRootWidget
package:flutter/…/widgets/binding.dart:944
#4030 WidgetsBinding.scheduleAttachRootWidget.<anonymous closure>
package:flutter/…/widgets/binding.dart:924
(elided 11 frames from class _RawReceivePortImpl, class _Timer, dart:async, and dart:async-patch)
════════════════════════════════════════════════════════════════════════════════
My app:
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return GetMaterialApp.router(
theme: buildAppTheme(context),
binds: [
Bind.put(UserService()),
Bind.put(AuthService()),
],
getPages: AppPages.routes,
);
}
}
beta.36
works just fine.
Works fine if I change GetMaterialApp.router
to GetMaterialApp
.
I am Facing this Problem.
`The following StackOverflowError was thrown building StoreusingSharedPreferences(dirty, state: _StoreusingSharedPreferencesState#eb866): Stack Overflow
The relevant error-causing widget was: StoreusingSharedPreferences StoreusingSharedPreferences:file:///D:/Collage_Project/PlusFitness001/lib/Bhautik/Myprofilesubpages/personaldata.dart:28:11
When the exception was thrown, this was the stack: #0 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:8) #1 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) #2 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:19) #3 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) #4 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:19) #5 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) #6 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:19) #7 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) #8 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:19) #9 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) #10 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:19) #11 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) #12 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:19) #13 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) #14 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:19) #15 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) #16 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:19) #17 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) #18 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:19) #19 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) #20 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:19) #21 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) #22 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:19) #23 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) #24 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:19) #25 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) #26 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:19) #27 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) #28 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:19) #29 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) #30 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:19) #31 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) #32 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:19) #33 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) #34 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:19) #35 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) #36 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:19) #37 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) #38 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:19) #39 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) #40 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:19) #41 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) #42 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart:4:19) #43 weighdat (package:plus_fitness/Bhautik/Myprofilesubpages/tempvarstore.dart) ... ... #12644 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16) #12645 Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7) #12646 ProxyElement.update (package:flutter/src/widgets/framework.dart:5809:5) #12647 _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:105:11) #12648 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16) #12649 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5643:11) #12650 Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7) #12651 StatefulElement.update (package:flutter/src/widgets/framework.dart:5666:5) #12652 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16) #12653 Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7) #12654 ProxyElement.update (package:flutter/src/widgets/framework.dart:5809:5) #12655 _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:105:11) #12656 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16) #12657 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5643:11) #12658 Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7) #12659 StatefulElement.update (package:flutter/src/widgets/framework.dart:5666:5) #12660 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16) #12661 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5643:11) #12662 Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7) #12663 StatefulElement.update (package:flutter/src/widgets/framework.dart:5666:5) #12664 Element.updateChild (package:flutter/src/widgets/framework.dart:3824:15) #12665 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6765:14) #12666 Element.updateChild (package:flutter/src/widgets/framework.dart:3824:15) #12667 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6765:14) #12668 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16) #12669 Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7) #12670 ProxyElement.update (package:flutter/src/widgets/framework.dart:5809:5) #12671 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16) #12672 Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7) #12673 ProxyElement.update (package:flutter/src/widgets/framework.dart:5809:5) #12674 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16) #12675 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5643:11) #12676 Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7) #12677 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2904:19) #12678 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:989:21) #12679 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:448:5) #12680 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1386:15) #12681 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1311:9) #12682 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1169:5) #12683 _invoke (dart:ui/hooks.dart:312:13) #12684 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:399:5) #12685 _drawFrame (dart:ui/hooks.dart:283:31)`