-
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
Fix/free dependents #1142
Merged
Merged
Fix/free dependents #1142
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yuanyan
reviewed
Feb 7, 2022
yuanyan
reviewed
Feb 7, 2022
yuanyan
reviewed
Feb 7, 2022
wssgcg1213
previously approved these changes
Feb 9, 2022
yuanyan
reviewed
Feb 9, 2022
yuanyan
reviewed
Feb 9, 2022
yuanyan
reviewed
Feb 9, 2022
yuanyan
reviewed
Feb 9, 2022
wssgcg1213
approved these changes
Feb 9, 2022
yuanyan
approved these changes
Feb 9, 2022
@answershuto 自己定义组件在切换页面后报出这个错,貌似在有些情况下element.renderObjectElement是null
════════ Exception caught by widgets library ═══════════════════════════════════
'package:kraken[/src/widget/widget_to_element_adaptor.dart]()': Failed assertion: line 268 pos 12: 'renderObjectElement != null': is not true.```` |
写个 issue 然后提供一个 demo 吧,是最新的 main 上面的问题吗? @donfo |
我把这行断言注释了就正常了, 不知道会带来其它影响不 |
是最新的版本,kraken: ^0.10.2+1 |
看起来还是生命周期的某个环节有问题,注释掉了可以正常 work ,但是状态依旧是异常的,可能会产生泄漏等影响。可以给我一个最小化的 demo 我来排查一下。 @donfo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
close #1129
报错原因是 InheritedWidget 在收集的依赖在 Widget 对应的 element 在在销毁或者隐藏状态下没有调用 deactivate 去清除相应的依赖,导致断言检测异常直接抛出错误。处理的方式是需要在 Kraken Widiget 相应的生命周期中调用所有下属自定义 Widget 的 deactivate 方法。