bevyengine / bevyengine/bevy

Bus error setting cursor.visible

Open
#11,009 3 comments 0 reactions 0 assignees View on GitHub
A-Windowing C-Bug O-MacOS S-Needs-Investigation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

12.1

## Relevant system information

macOS Sonoma 14.2

## What you did

I tried to hide the cursor by setting `window.cursor.visible = false`. Here's the code:
https://github.com/jeffs/edu-bevy-spaceship-game/blob/hide-cursor/game-main/src/main.rs#L19-L24

## What went wrong

The program crashed. It crashes reliably on Startup or PostStartup:

```
$ cargo run
Finished dev [optimized + debuginfo] target(s) in 0.29s
Running `target/debug/game-main`
2023-12-17T13:36:44.505720Z INFO bevy_render::renderer: AdapterInfo { name: "Apple M2 Pro", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
2023-12-17T13:36:44.646591Z INFO bevy_winit::system: Creating new window "App" (0v0)
2023-12-17T13:36:44.674669Z INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "MacOS 14.2 ", kernel: "23.2.0", cpu: "Apple M2 Pro", core_count: "12", memory: "32.0 GiB" }
[1] 14694 bus error cargo run
```

## Additional information

This seems to be rooted in winit. I also just filed:
* https://github.com/rust-windowing/winit/issues/3267
* https://github.com/rust-windowing/winit/issues/3268

The surrounding code is based on Zymartu's [Bevy 0.12 Beginner Tutorial Series](https://www.youtube.com/watch?v=f-Q8vOb5qRY), but I don't think it's relevant.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.