X11: panic on window creation: Failed to call XMapRaised (BadIDChoice)
Maintainers usually reply within 4 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- linux, rust
- Domain
- desktop, operating-systems
Research direction
Start in platform_impl/linux/x11/window.rs at lines 1145 and 586, where XMapRaised reports BadIDChoice and the follow-up mutex error panics. Reproduce the startup failure with winit 0.30.13 under X11 using the reported Alacritty scenario, then verify that window creation no longer aborts with these panics and handles the X error gracefully.
Written by the indexing model from the issue text.
Description
Description
Hi, I encountered a consistent fatal crash when launching applications (such as Alacritty) built with the latest winit 0.30.13 under X11 environment.
During the initialization phase, the XMapRaised call triggers an asynchronous BadIDChoice XError, which immediately results in a panic inside winit instead of handling the error or returning a Result gracefully.
Steps to Reproduce
Run any application using winit 0.30.13 (e.g., Alacritty 0.17+ or latest git master) under X11.
The application panics instantly on startup and dumps core.
Backtrace / Log Output
thread 'main' (8376) panicked at /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.13/src/platform_impl/linux/x11/window.rs:1145:41:
Failed to call XMapRaised: XError { description: "BadIDChoice (invalid resource ID chosen for this connection)", error_code: 14, request_code: 138, minor_code: 31 }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' (8376) panicked at /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.13/src/platform_impl/linux/x11/window.rs:586:34:
called `Result::unwrap()` on an `Err` value: PoisonError { .. }
stack backtrace:
0: 0x55d61d336b2b - <unknown>
1: 0x55d61d1eb5da - <unknown>
2: 0x55d61d33fc46 - <unknown>
3: 0x55d61d310ad0 - <unknown>
4: 0x55d61d330016 - <unknown>
5: 0x55d61d33020b - <unknown>
6: 0x55d61d310b88 - <unknown>
7: 0x55d61d308009 - <unknown>
8: 0x55d61d315cfd - <unknown>
9: 0x55d61d1ebd3c - <unknown>
10: 0x55d61d1ebb12 - <unknown>
11: 0x55d61d4670fb - <unknown>
12: 0x55d61cf48459 - <unknown>
13: 0x55d61cf67742 - <unknown>
14: 0x55d61cf61566 - <unknown>
15: 0x55d61cfa7e41 - <unknown>
16: 0x55d61cf8eb76 - <unknown>
17: 0x55d61cf445e8 - <unknown>
18: 0x55d61d09ee24 - <unknown>
19: 0x55d61d0a2d7b - <unknown>
20: 0x55d61cfa637f - <unknown>
21: 0x55d61cfdb5c6 - <unknown>
22: 0x55d61d0f16cc - <unknown>
23: 0x55d61d32e534 - <unknown>
24: 0x55d61cfab004 - <unknown>
25: 0x7fd06a42793e - <unknown>
26: 0x7fd06a427a7c - __libc_start_main
27: 0x55d61cf3e1d5 - <unknown>
28: 0x0 - <unknown>
thread 'main' (8376) panicked at library/core/src/panicking.rs:233:5:
panic in a destructor during cleanup
thread caused non-unwinding panic. aborting.
中止 (核心已傾印)alacritty
OS and window mananger
OS: Artix Linux
Window manager: i3-wm
Winit version
0.30.13
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.5k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 16
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rust-windowing/winit
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
rust-windowing/winit#4731 · 1 comment ·
Maintainers usually reply within 4 days
-
macOS: Dictation (voice input) silently drops text — selectedRange returns NSNotFoundPossibly taken @lucasmerlin claimed this 19 days ago. OpenB - bug DS - appkit
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
rust-windowing/winit#4666 · 1 comment ·
Maintainers usually reply within 4 days
-
DS - x11
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
rust-windowing/winit#4479 · 5 comments · 1 reaction ·
Maintainers usually reply within 4 days
-
B - bug DS - x11
Difficulty 4/5 1-2 days Newbie friendliness 48/100
rust-windowing/winit#4789 ·
Maintainers usually reply within 4 days
-
Difficulty 4/5 3-5 days Newbie friendliness 58/100
rust-windowing/winit#4777 ·
Maintainers usually reply within 4 days
All issues in rust-windowing/winit
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
status:untriaged
Difficulty 1/5 Under an hour Newbie friendliness 72/100
midnightntwrk/midnight-zk#592 ·
Maintainers usually reply within 3 days
-
QuartoHub: have the Document name before the filename in the browser tabPossibly taken @cscheid claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
quarto-dev/q2#930 · 1 comment ·
Maintainers usually reply within 1 day
-
muse P3
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
HerringtonDarkholme/hd-lang#923 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day