-
Notifications
You must be signed in to change notification settings - Fork 51
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 with large windows on x11 #168
Comments
I am getting this error currently with a small demo app adapted from the existing softbuffer README example to work on latest winit, it doesn't even require resizing too large, it seems resizing quickly does it. |
Also having this same issue on 0.3.2 (in WSL2 Ubuntu). |
The only change for X11 we made was migrating to POSIX SHM for shared memory. Do these issues affect the commit a405e03? |
Nope! I tried again at that commit and it works without issue. |
I tried also on the master branch and actually it breaks again with the same error as above. (This is with Wayland-related features disabled on softbuffer and winit but with other default features specified.) |
It's also especially odd that the error is coming from Xlib, since this crate exclusively uses libxcb. It almost feels like a bug in the shared communication channels used by Xlib and XCB. A |
So I was actually trying to obtain one (I'm not the best with gdb) but gdb is not registering this as an error in any way I guess, so the program just exits. I'm not sure where to set a breakpoint for this, but if you have any tips on how I can obtain a backtrace for this let me know! |
These occur with c0e8723, but not the previous commit. This doesn't entirely make sense though. Nothing is shown closing fd 3 before the call getting |
I guess The could also be an issue an issue with how fds are handled in |
Ah, I only changed the |
@notgull Would it be best to work around this with a I'm not really familiar with exactly how this works in x11rb and the X protocol. Though I'd guess this is an issue in x11rb, and it's shouldn't close or keep the fd, but should just be sent over the socket to the X server which maintains its own reference to the file description. |
Okay, I guess https://docs.rs/x11rb/0.12.0/x11rb/protocol/shm/trait.ConnectionExt.html#method.shm_attach_fd takes |
This function takes `Into<RawFdContainer>`. So it accepts an owned fd, and closes it. So as long as the API is like this, we need to dup a new fd it can close when calling it. `Into<RawFdContainer>` is implemented for anything implementing `IntoRawFd`, so passing `OwnedFd` works. Fixes #168. Should be backported to 0.3.x.
This function takes `Into<RawFdContainer>`. So it accepts an owned fd, and closes it. So as long as the API is like this, we need to dup a new fd it can close when calling it. `Into<RawFdContainer>` is implemented for anything implementing `IntoRawFd`, so passing `OwnedFd` works. Fixes #168. Should be backported to 0.3.x.
Thank you for fixing this bug. |
This function takes `Into<RawFdContainer>`. So it accepts an owned fd, and closes it. So as long as the API is like this, we need to dup a new fd it can close when calling it. `Into<RawFdContainer>` is implemented for anything implementing `IntoRawFd`, so passing `OwnedFd` works. Fixes #168. Should be backported to 0.3.x. Cherry-picked from `master` to 0.3.
I've tagged and published v0.3.3 which applies this fix without the breaking change in #132. |
With softbuffer master branch at 18c9447 , on X11 a large buffer size causes a loss of the X connection.
How to reproduce:
cargo run --example winit
Observe:
The text was updated successfully, but these errors were encountered: