Post

Replies

Boosts

Views

Activity

Reply to ScrollView triggers (almost) endless View redrawing.
I am also running into this exception with ScrollView and LazyVGrid specifically (which is how I found this thread). I see the same behavior you describe, where the scroll bar flickers if it's on the verge of being (not) needed on resize, but in my case, that alone does not cause an exception, perhaps simply because I don't have that many Views yet. Instead, I get semi-consistent crashes when switching off of and onto the View containing this setup, even with an empty ScrollView. Seemingly randomly, but not rarely, it causes a hitch and will throw either the same exception as you've written: The window has been marked as needing another Display Window pass, but it has already had more Display Window passes than there are views in the window. or another variation: The window has been marked as needing another Update Constraints in Window pass, but it has already had more Update Constraints in Window passes than there are views in the window. <SwiftUI.AppKitWindow: 0x130a34000> 0x56f4 (22260) {{306, 187}, {1000, 650}} en Future marking as needing Update Constraints in Window might be ignored. Sometimes, it also crashes on startup, right as the window appears. Removing just the ScrollView alone fixes this entirely, so does removing the .scaleEffect that I have on the ContentView. Perhaps the ScrollView struggles when scaling is applied to it, though I don't see why that would make it re-render, especially when .compositingGroup is applied to the parent view.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’25