emilk / emilk/egui

segmentation fault when program is closed

Open
#7,660 3 comments 2 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
30.6k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
72

Description

**Describe the bug**

In wayland, using egui-winit with the `clipboard` feature causes segmentation fault when the program is closed. Program starts fine and runs fine but when closed, segmentation fault occurs. This is reproducible with the [pure_glow](https://github.com/emilk/egui/blob/main/crates/egui_glow/examples/pure_glow.rs) example by running the example with the `clipboard` feature included.

**To Reproduce**
Steps to reproduce the behavior:
1. Run the `pure_glow` example with `clipboard` feature
```sh
cargo run -p egui_glow --example pure_glow --features=winit,egui/default_fonts,clipboard
```
2. After the program runs and window appears, close the program, i. e., click on Quit in the UI or close it with ctrl + c.
3. segmentation fault (core dumped) is shown

**Expected behavior**

Program should close without segmentation fault.

**Screenshots**

**Desktop (please complete the following information):**
- OS: Arch Linux with sway
- Browser
- Version

**Smartphone (please complete the following information):**
- Device:
- OS:
- Browser
- Version

**Additional context**

It probably has something to do with [smithay-clipboard](https://crates.io/crates/smithay-clipboard), because the debugger shows the following

Image

Contributor guide

Open the contributing guide

Research direction

Start with the pure_glow example and reproduce the failure using the documented cargo command on Wayland with the clipboard feature enabled. Inspect the shutdown path and the smithay-clipboard interaction, including the debugger evidence in the issue. Done means the example closes normally without a segmentation fault.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.