Closed nicopap closed 7 months ago
I'm now getting the same error on main (06bf9289276bdaa9397a03ccb54f02c9f1de2dcc) on many_foxes
, but it doesn't panic.
Same as #11150 but I don't get a panic at all. This now seems to be much easier to trigger since #10411 merged.
I couldn't reproduce this on the latest main (e3126a494f4759d52f2492559d3f585a41a4ce29). After Running the multiple windows example and closing one of them, I got this:
2024-02-01T09:28:37.133424Z INFO log: GENERAL [Loader Message (0x0)]
Using "NVIDIA GeForce RTX 3060 Laptop GPU" with driver: "libGLX_nvidia.so.0"
2024-02-01T09:28:37.133429Z INFO log: objects: (type: INSTANCE, hndl: 0x5614e9dd3b60, name: ?)
2024-02-01T09:28:37.717473Z INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Linux rolling Arch Linux", kernel: "6.7.2-zen1-1-zen", cpu: "", core_count: "14", memory: "31.1 GiB" }
2024-02-01T09:28:37.758296Z INFO bevy_winit::system: Creating new window "Second window" (4v1)
2024-02-01T09:28:37.758494Z INFO log: Guessed window scale factor: 2
2024-02-01T09:28:38.394059Z INFO log: GENERAL [NVIDIA (0x4)]
Requested image extent (2560x1440) does not match surface (2560x1468), marking swapchain out of date
2024-02-01T09:28:38.394196Z INFO log: objects: (type: SWAPCHAIN_KHR, hndl: 0x5614efebcb00, name: ?)
2024-02-01T09:28:38.427726Z INFO log: GENERAL [NVIDIA (0x4)]
Requested image extent (2560x1440) does not match surface (2560x1468), marking swapchain out of date
2024-02-01T09:28:38.427760Z INFO log: objects: (type: SWAPCHAIN_KHR, hndl: 0x5614efd18020, name: ?)
2024-02-01T09:28:49.233193Z INFO log: GENERAL [NVIDIA (0x4)]
Requested image extent (2560x1468) does not match surface (1920x1440), marking swapchain out of date
2024-02-01T09:28:49.233231Z INFO log: objects: (type: SWAPCHAIN_KHR, hndl: 0x5614efd18020, name: ?)
2024-02-01T09:28:50.141623Z INFO bevy_winit::system: Closing window 4v1
2024-02-01T09:28:50.174612Z WARN bevy_winit: Window 4v1 is missing `Window` component, skipping event RedrawRequested
2024-02-01T09:28:50.175029Z WARN bevy_winit: Window 4v1 is missing `Window` component, skipping event Destroyed
It seems fixed now.
I am still getting a panic on multiple_windows
on main (e618426faa779662ec42a877867e023e39f9e9ec).
Though specifically: Only when closing "Second window" first. If I close "First window". It keeps running, but the text on the second window changes from "Second window" to "Second" and the font gets smaller.
That's what I get if I close the second window first:
ERROR log: X11 error: XError {
description: "BadWindow (invalid Window parameter)",
error_code: 3,
request_code: 148,
minor_code: 1,
}
thread 'main' panicked at /winit-0.29.10/src/platform_impl/linux/x11/event_processor.rs:978:30:
Failed to focus input context: XError { description: "BadWindow (invalid Window parameter)", error_code: 3, request_code: 148, minor_code: 1 }
Still getting the error on many_foxes
, without the panic:
ERROR bevy_winit: winit event loop returned an error: os error at /winit-0.29.10/src/platform_impl/linux/x11/mod.rs:433: Xlib error: X error: BadWindow (invalid Window parameter) (code: 3, request code: 148, minor code: 1)
I managed to trigger something similar to this last night in a multi-window app while sending close window via keyboard(same as window close button), to the second window, in my case the application live-locked and the first window never continued rendering.
2024-02-21T18:53:26.922192Z INFO bevy_winit::system: Closing window 1v1
the last log message I ever get, after this no frame ever gets rendered again in the primary window.
Even gracefully despawning a second window causes this for me, so it's not related to sending a window close command manually as above.
I am also encountering this error in a basic "initial window" app.
use bevy::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_systems(Startup, setup)
.run();
}
fn setup(mut commands: Commands) {
commands.spawn(Camera2dBundle::default());
}
Clicking the X to close the window results in the error below:
2024-02-24T21:52:13.876644Z INFO bevy_render::renderer: AdapterInfo { name: "AMD Radeon Vega 10 Graphics (RADV RAVEN)", vendor: 4098, device: 5592, device_type: IntegratedGpu, driver: "radv", driver_info: "Mesa 23.3.3-manjaro1.1", backend: Vulkan }
2024-02-24T21:52:14.005388Z INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Linux 23.1.3 Manjaro Linux", kernel: "6.1.69-1-MANJARO", cpu: "AMD Ryzen 7 3750H with Radeon Vega Mobile Gfx", core_count: "4", memory: "13.6 GiB" }
2024-02-24T21:52:22.077129Z INFO bevy_window::system: No windows are open, exiting
2024-02-24T21:52:22.077582Z INFO bevy_winit::system: Closing window 0v1
2024-02-24T21:52:22.146762Z ERROR log: X11 error: XError {
description: "BadWindow (invalid Window parameter)",
error_code: 3,
request_code: 148,
minor_code: 1,
}
2024-02-24T21:52:22.154026Z ERROR bevy_winit: winit event loop returned an error: os error at /home/travis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.10/src/platform_impl/linux/x11/mod.rs:433: Xlib error: X error: BadWindow (invalid Window parameter) (code: 3, request code: 148, minor code: 1)
What you did
multiple_windows
example withcargo run --example multiple_windows
.What went wrong
Closing a window results in a panic with the following error:
Additional information
Probably related to #10702