Skip to content
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

Crash when attempting to perform a layout with a zero frame size #26

Open
jbmorley opened this issue Jan 7, 2025 · 0 comments
Open

Comments

@jbmorley
Copy link
Collaborator

jbmorley commented Jan 7, 2025

I've been seeing a crash in Bookmarks on macOS when attempting to perform a layout pass and the frame is zero. Definitely a result of a behavior change in the latest incarnation of SwiftUI. It's currently unclear to me if this is an actual SwiftUI bug, or an issue in the layout logic / custom constraints resolution in SelectableCollectionView. Either way, ideally SelectableCollectionView should be robust to this kind of issue though and we should add a test case for this and guard against it if possible.

jbmorley added a commit to inseven/bookmarks that referenced this issue Jan 7, 2025
This is a work around for a possible issue in `SelectableCollectionView` (see inseven/SelectableCollectionView#26) which was leading to a crash on first run when the default window frame hadn't been set. This change explicitly sets the minimum size of the collection view to 640x480 which hopefully isn't _too_ large for users with smaller screens.
jbmorley added a commit to inseven/bookmarks that referenced this issue Jan 7, 2025
This is a work around for a possible issue in `SelectableCollectionView`
(see inseven/SelectableCollectionView#26)
which was leading to a crash on first run when the default window frame
hadn't been set. This change explicitly sets the minimum size of the
collection view to 640x480 which hopefully isn't _too_ large for users
with smaller screens.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant