AttributeGraph: cycle detected through attribute
Kyle-Ye opened this issue · 5 comments
When entering PostView, we'll get many warning saying "AttributeGraph: cycle detected through attribute" and sometimes got crashes for it
// Warning
=== AttributeGraph: cycle detected through attribute 33496 ===
=== AttributeGraph: cycle detected through attribute 33496 ===
=== AttributeGraph: cycle detected through attribute 32904 ===
// Crash
Thread 1: Fatal error: attempting to create attribute with no subgraph:
UnwrapConditional<ViewDescriptor, Optional<Text>, Text>
See more info here https://kyleye.top/posts/demystify-attributegraph-1/
See more info here https://kyleye.top/posts/demystify-attributegraph-1/
Interesting reading, thanks for sharing. Do you think it is Apple at fault? Seems to me that the NavigationSplitView
triggered unnecessary view updates which lead to AG cycle. 🤔
See more info here kyleye.top/posts/demystify-attributegraph-1
Interesting reading. Do you think it is Apple at fault? Seems to me that the
NavigationSplitView
triggered unnecessary view updates which lead to AG cycle. 🤔
IMO it is mainly due to the legacy API design and implementation of Foundation.NSAttributedString.
Generally speaking, it should be Apple's fault. But it doesn't seem to have much to do with SwiftUI.NavigationSplitView or AttibutedGraph's implementation.
Out of curiosity, if you happened to have installed Xcode 15 beta 5, do you still see the AG cycle issue on an iOS 17 simulator? 🤔 Thanks.
Out of curiosity, if you happened to have installed Xcode 15 beta 5, do you still see the AG cycle issue on an iOS 17 simulator? 🤔 Thanks.
No. Could you point out the reproductive steps so that I can take a look?
- Does this happen on this repo?
- If yes, which branch are you using? The current active deployment branch is os_2023/main not main.