-
Notifications
You must be signed in to change notification settings - Fork 303
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
自定义元素在Kraken退出后报错 #1129
Labels
bug
Something isn't working
Comments
我也遇到同样的问题 |
是不是回退的时候没有触发销毁? |
回退的时候需要什么操作销毁widget吗? |
应该需要内部处理掉的,我来看一下。 |
自定义元素使用StatefulWidget,在kraken里移除相关DOM,也没有触发dispose |
好的, |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
使用的 Kraken 版本 | What version of kraken are you using
0.10.0+3
重现步骤 | Steps To Reproduce
加上自定义元素后,进入kraken,然后执行Navigator.pop(context);回退到上一页,报错
重现代码 | Code example:
预期结果 | Expected results:
正常显示
实际结果 | Actual results:
======== Exception caught by widgets library =======================================================
The following assertion was thrown building Overlay-[LabeledGlobalKey#4108e](state: OverlayState#bc13e(entries: [OverlayEntry#216d1(opaque: true; maintainState: false), OverlayEntry#fee08(opaque: false; maintainState: true)])):
'package:flutter/src/widgets/framework.dart': Failed assertion: line 5131 pos 14: '_dependents.isEmpty': is not true.
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:
MaterialApp MaterialApp:file:///D:/Project/kraken_nl/lib/main.dart:40:12
When the exception was thrown, this was the stack:
#2 InheritedElement.debugDeactivated. (package:flutter/src/widgets/framework.dart:5131:14)
#3 InheritedElement.debugDeactivated (package:flutter/src/widgets/framework.dart:5133:6)
#4 _InactiveElements._deactivateRecursively. (package:flutter/src/widgets/framework.dart:1905:15)
#5 _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:1907:6)
#6 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#7 _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:1903:13)
#8 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#9 _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:1903:13)
#10 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#11 _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:1903:13)
#12 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#13 _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:1903:13)
#14 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6182:14)
#15 _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:1903:13)
#16 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#17 _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:1903:13)
#18 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#19 _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:1903:13)
#20 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#21 _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:1903:13)
#22 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#23 _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:1903:13)
#24 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#25 _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:1903:13)
#26 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6182:14)
#27 _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:1903:13)
#28 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#29 _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:1903:13)
#30 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#31 _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:1903:13)
#32 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4719:14)
#33 _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:1903:13)
#34 _InactiveElements.add (package:flutter/src/widgets/framework.dart:1915:7)
#35 Element.deactivateChild (package:flutter/src/widgets/framework.dart:3709:30)
#36 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5793:11)
#37 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6356:17)
#38 Element.updateChild (package:flutter/src/widgets/framework.dart:3412:15)
#39 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4690:16)
#40 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4840:11)
#41 Element.rebuild (package:flutter/src/widgets/framework.dart:4355:5)
#42 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2620:33)
#43 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:882:21)
#44 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:319:5)
#45 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1143:15)
#46 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1080:9)
#47 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:996:5)
#51 _invoke (dart:ui/hooks.dart:166:10)
#52 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:270:5)
#53 _drawFrame (dart:ui/hooks.dart:129:31)
(elided 5 frames from class _AssertionError and dart:async)
The text was updated successfully, but these errors were encountered: