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

Update winit_test and re-enable tests/present_and_fetch #179

Closed
wants to merge 2 commits into from

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Nov 14, 2023

No description provided.

@ids1024 ids1024 requested a review from notgull November 14, 2023 16:40
@ids1024 ids1024 requested a review from john01dav as a code owner November 14, 2023 16:40
@ids1024
Copy link
Member Author

ids1024 commented Nov 14, 2023

Looks like the test needs to be updated for WASM. The SIGSEGV on macOS is more concerning though.

@notgull
Copy link
Member

notgull commented Nov 14, 2023

@madsmtm Any insight into this segfault?

@madsmtm
Copy link
Member

madsmtm commented Nov 15, 2023

Hmm, yeah, that is troubling, I'm looking into it.

@madsmtm
Copy link
Member

madsmtm commented Nov 15, 2023

Oh, I thought I had migrated softbuffer to use objc2 already, it would've prevented this issue...

The issue is fairly simple once you see it, both CALayer and the window reference are not retained (in part due to servo/core-foundation-rs#643), so I think the window ends up being double-freed (or free'd before the CALayer has a chance to release it's own reference to it).

@madsmtm
Copy link
Member

madsmtm commented Nov 15, 2023

Fixed in #180

@notgull notgull requested a review from daxpedda November 15, 2023 03:20
@daxpedda
Copy link
Member

This is unfortunately not going to work on Wasm, because Window::inner_size() will always return None on Window creation. You have to wait for a Resized event for that to work properly.

I guess this is an issue in winit-test, see notgull/winit-test#11.

}

let window = builder.build(elwt).unwrap();

// winit does not wait for the window to be mapped... sigh
#[cfg(not(target_arch = "wasm32"))]
std::thread::sleep(std::time::Duration::from_millis(1));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just leaving this here as another argument for notgull/winit-test#11: my system needed longer to work correctly.

@notgull
Copy link
Member

notgull commented May 7, 2024

The test was removed as part of #214, so I'll close this PR. We will revisit this in the future.

@notgull notgull closed this May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants