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

window_settings example crashes on startup #17227

Closed
BenjaminBrienen opened this issue Jan 8, 2025 · 6 comments · Fixed by #17358
Closed

window_settings example crashes on startup #17227

BenjaminBrienen opened this issue Jan 8, 2025 · 6 comments · Fixed by #17358
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior C-Examples An addition or correction to our examples D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Investigation This issue requires detective work to figure out what's going wrong

Comments

@BenjaminBrienen
Copy link
Contributor

BenjaminBrienen commented Jan 8, 2025

Bevy version

The release number or commit hash of the version you're using.

Relevant system information

2025-01-08T03:45:51.952043Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Windows 11 Pro", kernel: "26100", cpu: "12th Gen Intel(R) Core(TM) i7-12700H", core_count: "14", memory: "31.7 GiB" }
2025-01-08T03:45:52.183462Z  INFO bevy_render::renderer: AdapterInfo { name: "Intel(R) Iris(R) Xe Graphics", vendor: 32902, device: 18086, device_type: IntegratedGpu, driver: "Intel Corporation", driver_info: "101.6325", backend: Vulkan }

What you did

cargo run --example window_settings

What went wrong

     Running `target\debug\examples\window_settings.exe`
2025-01-08T03:45:51.952043Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Windows 11 Pro", kernel: "26100", cpu: "12th Gen Intel(R) Core(TM) i7-12700H", core_count: "14", memory: "31.7 GiB" }
2025-01-08T03:45:52.183462Z  INFO bevy_render::renderer: AdapterInfo { name: "Intel(R) Iris(R) Xe Graphics", vendor: 32902, device: 18086, device_type: IntegratedGpu, driver: "Intel Corporation", driver_info: "101.6325", backend: Vulkan }
2025-01-08T03:45:53.220275Z  INFO bevy_winit::system: Creating new window I am a window! (0v1)
thread 'main' panicked at C:\Users\BenjaminBrienen\source\bevy\crates\bevy_ecs\src\system\function_system.rs:216:28:
bevy_winit::accessibility::update_accessibility_nodes could not access system parameter Res<InputFocus>
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `bevy_app::main_schedule::Main::run_main`!
error: process didn't exit successfully: `target\debug\examples\window_settings.exe` (exit code: 101)
@BenjaminBrienen BenjaminBrienen added A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior C-Examples An addition or correction to our examples D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Investigation This issue requires detective work to figure out what's going wrong labels Jan 8, 2025
@rparrett
Copy link
Contributor

rparrett commented Jan 8, 2025

Should be fixed in #17224 but maybe we want to break the fix out.

@rparrett
Copy link
Contributor

rparrett commented Jan 8, 2025

Maybe it's extremely intermittent, but I can't seem to reproduce on macOS.

Could you fix up the issue title?

@BenjaminBrienen BenjaminBrienen changed the title cargo run --example window_settings window_settings example crashes on startup Jan 8, 2025
@BenjaminBrienen BenjaminBrienen changed the title window_settings example crashes on startup window_settings example crashes on startup Jan 8, 2025
@BenjaminBrienen
Copy link
Contributor Author

Sorry, I must have accidentally pasted the command there instead of into the description

@I-Ruiz
Copy link

I-Ruiz commented Jan 12, 2025

I tested in Windows 11 Pro
Downloaded zip Bevy v0.15.1
and ran
Without issue

@IceSentry
Copy link
Contributor

I get the same issue on windows 10 with latest main

@ChristopherBiscardi
Copy link
Contributor

linking #16961 to this as well since its the same issue

github-merge-queue bot pushed a commit that referenced this issue Jan 14, 2025
# Objective

- Stop bevy from crashing when losing window focus

## Solution

- The InputFocus resource is optional but is accessed unconditionally in
bevy_winit. Make it optional.

## Testing

- Ran the window_settings example

## Note

It's possible this might not be a full fix for the issue, but this stop
bevy from crashing.

Closes #16961 
Closes #17227
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior C-Examples An addition or correction to our examples D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Investigation This issue requires detective work to figure out what's going wrong
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants