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

multi_window.rs always segfaults #429

Open
ghost opened this issue May 17, 2019 · 2 comments
Open

multi_window.rs always segfaults #429

ghost opened this issue May 17, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented May 17, 2019

All other examples work fine. The issue is resolved when the window-spawning iterator's 0..3 is changed to 0..1, so it's either a problem with the gfx library (seems likely) or an OS issue. The gfx-rs library has been deprecated anyway: https://github.com/gfx-rs/gfx

rustc: 1.34.2 stable-x86_64-unknown-linux-gnu

Linux 4.4.0-145-generic #174-Ubuntu

@uhuntu
Copy link

uhuntu commented Nov 7, 2019

https://github.com/rust-windowing/winit.git

tag v0.19.1

commit d4faf28cbe211d2b2c4b797862fb46339416f368 (HEAD -> tag-v0.19.1)
Author: Hunt Lin <hunt.lin@tes-tec.com>
Date:   Thu Nov 7 14:29:42 2019 +0800

    Determine im before close it.

diff --git a/src/platform/linux/x11/ime/inner.rs b/src/platform/linux/x11/ime/inner.rs
index 34bfbe7..72ee481 100644
--- a/src/platform/linux/x11/ime/inner.rs
+++ b/src/platform/linux/x11/ime/inner.rs
@@ -9,7 +9,9 @@ use super::input_method::PotentialInputMethods;
 use super::context::ImeContext;
 
 pub unsafe fn close_im(xconn: &Arc<XConnection>, im: ffi::XIM) -> Result<(), XError> {
-    (xconn.xlib.XCloseIM)(im);
+    if !im.is_null() {
+        (xconn.xlib.XCloseIM)(im);
+    }
     xconn.check_errors()
 }

@squint2
Copy link

squint2 commented Jul 28, 2020

CAN ANYBODY PLEASE FIX THIS??

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

2 participants