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

[Linux] Frequent crashes when starting application, X-related #446

Closed
the-drunk-coder opened this issue May 28, 2021 · 18 comments
Closed

[Linux] Frequent crashes when starting application, X-related #446

the-drunk-coder opened this issue May 28, 2021 · 18 comments
Labels
eframe Relates to epi and eframe egui-winit porblems related to winit native-linux Problem specific to Linux

Comments

@the-drunk-coder
Copy link

the-drunk-coder commented May 28, 2021

Hi,

recently I'm having plenty of (non-deterministic) crashes when starting my egui-based application.

[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
megra_rs: xcb_io.c:269: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.

Not really sure what this means. Usually I have to try two or three times, then the application starts. Any hints ?

I'm on Arch, Xorg, AwesomeWM

Best,
N

@slve
Copy link

slve commented Jun 2, 2021

I see get the same message, not just frequently, but any time I try to use the lib through epick.
Arch, xorg, dwm here.

@jhimcras
Copy link

jhimcras commented Jun 2, 2021

I've got exactly same error message above.
I'm on Arch(Manjaro), i3wm

@the-drunk-coder
Copy link
Author

There was something in the underlying winit library, supposedly fixed:

rust-windowing/winit#458

@emilk emilk added the native-glium Relates to running egui_glium on native label Jun 7, 2021
@d4h0
Copy link

d4h0 commented Jul 4, 2021

I get this error as well (also on Arch Linux with i3, running the egui_template or the demo app).

Does anybody know how to overcome this?

The web backend works, fortunately, but it would be nice to run apps without a browser and the limitations of WASM.

@d4h0
Copy link

d4h0 commented Jul 4, 2021

Because this was tagged with egui_glium I tried to run glium's examples. 80% percent fail with the same error that everybody here gets (the other 20% fail in different ways).

I cloned egui_template again, and tried to execute the example without modifying the code in any way. The app opened once, but not again after.

Edit: Actually, these are glitum's examples, not glium's (but glium seems to depend on glitum)

@emilk
Copy link
Owner

emilk commented Sep 26, 2021

Similar issue, reported closed: rust-windowing/winit#458

Because this was tagged with egui_glium I tried to run glium's examples. 80% percent fail with the same error that everybody here gets (the other 20% fail in different ways).

Let's figure out if this is a problem with glium or winit. There is a new glium-free backend in the works at #685 - can you check it out and try to run it?

I cloned egui_template again, and tried to execute the example without modifying the code in any way. The app opened once, but not again after.

try removing the state at /home/UserName/.local/share/egui_template - does it work now? If so, see if you can figure out what part of the config file is causing the problem (maybe restoring the position or the size of the window?)

@AZMCode
Copy link

AZMCode commented Sep 26, 2021

After some testing with the glium-free backend, it seems this is not a problem with glium. I'd advise to remove the egui_glium tag,

@AZMCode
Copy link

AZMCode commented Sep 28, 2021

Since I'm running Gentoo after all I've been compiling a lot of stuff. And I don't know if this is a lead or not, but there seem to be less crashes when my computer is busy doing something.

@the-drunk-coder
Copy link
Author

After some testing with the glium-free backend, it seems this is not a problem with glium. I'd advise to remove the egui_glium tag,

Yes, just tried with the glow backend, same problem.

@emilk emilk added eframe Relates to epi and eframe native-linux Problem specific to Linux and removed native-glium Relates to running egui_glium on native labels Dec 28, 2021
@smorokin
Copy link

smorokin commented Feb 2, 2022

I get also the same error message using the eframe_template on Kubuntu 21.10:

[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
egui_test: ../../src/xcb_io.c:269: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.

Using the glow backend produces the same error.

@emilk emilk added the egui-winit porblems related to winit label Feb 2, 2022
@LongHairedHacker
Copy link

LongHairedHacker commented Feb 3, 2022

I ran into the same !xcb_xlib_threads_sequence_lost assertion a few days ago.
For me any egui example I try to run crashes 100% of the time, so my system might be a good environment to reproduce this problem.

Since rust-windowing/glutin#1034 (comment) suggests that it might be window manager related, I'd like to add that I also use i3 (also on Arch Linux).

I did not yet test the glow backend, but I will give it a try if can free up some time later today.

If there is anything else I should give a try just point me at piece of code and I'll try it out.
Likewise if there is any additional information about my system (software versions, graphics hardware...) that might be helpful, just ask.

Also I have one casual observation I'd like to add: Most of the earlier reports for this problem mention Arch Linux, and only the later one other distros like Ubuntu.
So it might be change Xorg/XCB/Mesa, that got adopted early by Arch and has now made its way into Ubuntu that causes the issue.

@LongHairedHacker
Copy link

Nope ... unfortunately the glow_example #685 runs into the same error:

[sebastian@laptop egui_glow] (master)$ cargo run --example pure
    Finished dev [unoptimized + debuginfo] target(s) in 0.16s
     Running `/tmp/egui/target/debug/examples/pure`
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
pure: xcb_io.c:269: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Aborted (core dumped)

@LongHairedHacker
Copy link

LongHairedHacker commented Feb 3, 2022

Just for kicks I patched my mesa library using https://bugs.freedesktop.org/attachment.cgi?id=143767 and it actually seems to solve the problem. All examples I tested work now.
So if this is actually a mesa bug creating an error where there shouldn't be one, is there anything that can be done to work around it on the application side?

@NiceneNerd
Copy link
Contributor

NiceneNerd commented Mar 18, 2022

I can confirm the same issue on Arch under both i3 and Plasma. Patching mesa does indeed fix it.

@the-drunk-coder
Copy link
Author

Hmm I just updated to egui 0.17.0, using glow instead of glium. Seems like it doesn't happen anymore ? But there's other things that changed in my system configuration as well, so I can't really tell what fixed it.

@emilk
Copy link
Owner

emilk commented Mar 22, 2022

Should we perhaps close this in favor of rust-windowing/glutin#1034 ?

@the-drunk-coder
Copy link
Author

Not opposed to that ...

@emilk
Copy link
Owner

emilk commented Apr 19, 2022

Closed in favor of rust-windowing/glutin#1034

@emilk emilk closed this as completed Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eframe Relates to epi and eframe egui-winit porblems related to winit native-linux Problem specific to Linux
Projects
None yet
Development

No branches or pull requests

9 participants