GithubHelp home page GithubHelp logo

Compute Task Pool (7)' panicked at crates\bevy_render\src\view\window\mod.rs:365:21: Couldn't get swap chain texture, operation unrecoverable: A timeout was encountered while trying to acquire the next frame about bevy HOT 8 OPEN

kuolas avatar kuolas commented on May 28, 2024
Compute Task Pool (7)' panicked at crates\bevy_render\src\view\window\mod.rs:365:21: Couldn't get swap chain texture, operation unrecoverable: A timeout was encountered while trying to acquire the next frame

from bevy.

Comments (8)

kristoff3r avatar kristoff3r commented on May 28, 2024

It looks a bit like the issue handled here:

let may_erroneously_timeout = || {

Except it's on Windows. I have made a branch on top of v0.13.2 without that cfg line here, can you try and see if that fixes it?

bevy = { git = "https://github.com/kristoff3r/bevy.git", branch = "timeout" }

from bevy.

kuolas avatar kuolas commented on May 28, 2024

It gives me this error

error[E0425]: cannot find value `render_instance` in this scope
   --> crates\bevy_render\src\view\window\mod.rs:300:13
    |
300 |             render_instance
    |             ^^^^^^^^^^^^^^^ help: a tuple struct with a similar name exists: `RenderInstance`
    |
   ::: crates\bevy_render\src\renderer\mod.rs:119:1
    |
119 | pub struct RenderInstance(pub Arc<Instance>);
    | --------------------------------------------- similarly named tuple struct `RenderInstance` defined here

For more information about this error, try `rustc --explain E0425`.
error: could not compile `bevy_render` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

from bevy.

kuolas avatar kuolas commented on May 28, 2024

Line 255 says
#[cfg(target_os = "linux")] render_instance: Res<RenderInstance>,

Removing #[cfg(target_os = "linux")] and running yields

PS C:\Users\alvarok\Documents\GitHub\bevy> cargo run --example breakout
warning: unused variable: `may_erroneously_timeout`
   --> crates\bevy_render\src\view\window\mod.rs:299:13
    |
299 |         let may_erroneously_timeout = || {
    |             ^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_may_erroneously_timeout`
    |
    = note: `#[warn(unused_variables)]` on by default

warning: `bevy_render` (lib) generated 1 warning (run `cargo fix --lib -p bevy_render` to apply 1 suggestion)
    Finished dev [unoptimized + debuginfo] target(s) in 3.69s
     Running `target\debug\examples\breakout.exe`
2024-05-02T22:25:15.421500Z  INFO bevy_winit::system: Creating new window "App" (0v1)
2024-05-02T22:25:15.623565Z  INFO bevy_render::renderer: AdapterInfo { name: "Radeon (TM) Pro WX 9100", vendor: 4098, device: 26721, device_type: DiscreteGpu, driver: "AMD proprietary driver", driver_info: "24.3.1 (AMD proprietary shader compiler)", backend: Vulkan }
2024-05-02T22:25:16.064344Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Windows 11 Pro", kernel: "22631", cpu: "AMD Ryzen 9 7900X 12-Core Processor", core_count: "12", memory: "31.2 GiB" }
thread 'Compute Task Pool (8)' panicked at crates\bevy_render\src\view\window\mod.rs:361:21:
Couldn't get swap chain texture, operation unrecoverable: A timeout was encountered while trying to acquire the next frame
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `bevy_render::view::window::prepare_windows`!
thread 'Compute Task Pool (8)' panicked at crates\bevy_render\src\pipelined_rendering.rs:49:67:
called `Result::unwrap()` on an `Err` value: RecvError
error: process didn't exit successfully: `target\debug\examples\breakout.exe` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

I am running AMD PRO edition drivers

Driver Version
23.19.12-240220a-400788C-AMD-Software-PRO-Edition
Vulkan™ Driver Version
2.0.279
Vulkan™ API Version
1.3.260
GPU1 - Radeon (TM) Pro WX 9100 - Primary/Discrete
VRAM1 - 16368 MB - HBM2 945 MHz
Driver Version - 23.19.12-240220a-400788C-AMD-Software-PRO-Edition
AMD Windows Driver Version - 31.0.21912.14
Direct3D API Version - 12.1
Vulkan™ API Version - 1.3.260
OpenCL™ API Version - 2.0
OpenGL® API Version - 4.6
Direct3D® Driver Version - 8.14.10.0251
Vulkan™ Driver Version - 2.0.279
OpenCL® Driver Version - 31.0.24027.1012
OpenGL® Driver Version - 24.02.230729_569461f
2D Driver Version - 8.1.1.1634
2D Driver File Path - /REGISTRY/MACHINE/SYSTEM/CurrentControlSet/Control/Class/{4d36e968-e325-11ce-bfc1-08002be10318}/0000
UI Version - 2024.0307.1232.2016
AMD Audio Driver Version - 10.0.1.30
Driver Provider - Advanced Micro Devices, Inc.
Windows Edition - Windows 11 Professional (64 bit)
Windows Version - 23H2

from bevy.

kristoff3r avatar kristoff3r commented on May 28, 2024

Ah, there's a bunch more cfg, specifically you also need to remove this one to check: https://github.com/kristoff3r/bevy/blob/f162c28068fa733caa4d1cc3251ab4ca5fdf98f3/crates/bevy_render/src/view/window/mod.rs#L353

from bevy.

kuolas avatar kuolas commented on May 28, 2024

Removing #[cfg(target_os = "linux")] on line 353 yields

Running `target\debug\examples\breakout.exe`
2024-05-03T19:27:44.490317Z  INFO bevy_winit::system: Creating new window "App" (0v1)
2024-05-03T19:27:44.712185Z  INFO bevy_render::renderer: AdapterInfo { name: "Radeon (TM) Pro WX 9100", vendor: 4098, device: 26721, device_type: DiscreteGpu, driver: "AMD proprietary driver", driver_info: "24.3.1 (AMD proprietary shader compiler)", backend: Vulkan }
2024-05-03T19:27:45.162774Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Windows 11 Pro", kernel: "22631", cpu: "AMD Ryzen 9 7900X 12-Core Processor", core_count: "12", memory: "31.2 GiB" }
error: process didn't exit successfully: `target\debug\examples\breakout.exe` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

At least is not swap chain problem or timeout.

from bevy.

kristoff3r avatar kristoff3r commented on May 28, 2024

Yeah ok then I'm out of ideas. It seems like your graphics driver just dies. Do wgpu examples or stuff like vkCube work on your machine? What about other bevy examples, or older versions of bevy? Are other games having problems?

from bevy.

kuolas avatar kuolas commented on May 28, 2024

I've installed AMD 3rd Party Drivers from https://www.amernimezone.com and it seems to work.

2024-05-03T23:31:01.183945Z ERROR log: ID3D12CommandQueue::ExecuteCommandLists: Using IDXGISwapChain::Present on Command List (0x0000023A446007C0:'Internal DXGI CommandList'): Resource state (0x586FEC40: D3D12_RESOURCE_STATE_RENDER_TARGET) of resource (0x0000023A44679B40:'Unnamed ID3D12Resource Object') (subresource: 0) is invalid for use as a PRESENT_SOURCE. Expected State Bits (all): 0x586FEC20: D3D12_RESOURCE_STATE_[COMMON|PRESENT], Actual State: 0x586FEC00: D3D12_RESOURCE_STATE_RENDER_TARGET, Missing State: 0x0: D3D12_RESOURCE_STATE_[COMMON|PRESENT]. [ EXECUTION ERROR #538: INVALID_SUBRESOURCE_STATE]

Screenshot 2024-05-03 203059

from bevy.

kuolas avatar kuolas commented on May 28, 2024

It works on main branch commit 99b4fb6

image

I will keep looking other drivers, and test wgpu, and open a wgpu issue if it's the case.

Thank you for all your help and time.

from bevy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.