Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

vsync disabled results in OoM

Aperta
#1 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
arch-linux, rust

Direzione di ricerca

Inizia da src/renderer.rs:265 e segui il ciclo dei frame attraverso src/lib.rs, quindi esamina le chiamate della swap-chain mostrate negli stack frame wgpu-native e rgx. Riproduci il problema con vsync disabilitato sulla configurazione Vulkan segnalata e determina perché i frame o le immagini della swap-chain si accumulano. Il lavoro è completato quando l’applicazione non raggiunge più OutOfHostMemory e non emette ripetutamente gli errori di validazione segnalati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

type:bug

Runs fine if I enable vsync.
This seems similar to other issues I have encountered on nvidia GPU's where there is no delay when vsync is disabled so it renders and queues frames way too fast until it ooms.
Quite possibly an issue with wgpu instead of rx, but I haven't investigated it at all.

Occurs on:
OS: Arch Linux
GPU: GTX 960
Driver: Nvidia proprietary driver, version 418
Backend: Vulkan

The validation errors repeat many times before hitting the panic, I omitted most of them.

[2019-08-25T10:44:59Z ERROR gfx_backend_vulkan] 
VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 (0)] : vkCreateSwapchainKHR() called with imageExtent = (850,1402), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (851,1402), minImageExtent = (851,1402), maxImageExtent = (851,1402). The Vulkan spec states: imageExtent must be between minImageExtent and maxImageExtent, inclusive, where minImageExtent and maxImageExtent are members of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)
object info: (type: DEVICE, hndl: 94080094017968)

[2019-08-25T10:44:59Z ERROR gfx_backend_vulkan] 
VALIDATION [UNASSIGNED-CoreValidation-DrawState-SwapchainTooManyImages (0)] : vkAcquireNextImageKHR: Application has already acquired the maximum number of images (0x1)
object info: (type: SWAPCHAIN_KHR, hndl: 11880)

[2019-08-25T10:44:59Z ERROR gfx_backend_vulkan] 
VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 (0)] : vkCreateSwapchainKHR() called with imageExtent = (850,1402), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (851,1402), minImageExtent = (851,1402), maxImageExtent = (851,1402). The Vulkan spec states: imageExtent must be between minImageExtent and maxImageExtent, inclusive, where minImageExtent and maxImageExtent are members of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)
object info: (type: DEVICE, hndl: 94080094017968)

[2019-08-25T10:44:59Z ERROR gfx_backend_vulkan] 
VALIDATION [UNASSIGNED-CoreValidation-DrawState-SwapchainTooManyImages (0)] : vkAcquireNextImageKHR: Application has already acquired the maximum number of images (0x1)
object info: (type: SWAPCHAIN_KHR, hndl: 11904)

[2019-08-25T10:44:59Z ERROR gfx_backend_vulkan] 
VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 (0)] : vkCreateSwapchainKHR() called with imageExtent = (850,1402), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (851,1402), minImageExtent = (851,1402), maxImageExtent = (851,1402). The Vulkan spec states: imageExtent must be between minImageExtent and maxImageExtent, inclusive, where minImageExtent and maxImageExtent are members of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)
object info: (type: DEVICE, hndl: 94080094017968)

[2019-08-25T10:44:59Z ERROR gfx_backend_vulkan] 
VALIDATION [UNASSIGNED-CoreValidation-DrawState-SwapchainTooManyImages (0)] : vkAcquireNextImageKHR: Application has already acquired the maximum number of images (0x1)
object info: (type: SWAPCHAIN_KHR, hndl: 11928)

[2019-08-25T10:44:59Z ERROR gfx_backend_vulkan] 
VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 (0)] : vkCreateSwapchainKHR() called with imageExtent = (850,1402), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (851,1402), minImageExtent = (851,1402), maxImageExtent = (851,1402). The Vulkan spec states: imageExtent must be between minImageExtent and maxImageExtent, inclusive, where minImageExtent and maxImageExtent are members of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)
object info: (type: DEVICE, hndl: 94080094017968)

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: OutOfMemory(OutOfHostMemory)', src/libcore/result.rs:999:5
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:47
   3: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:36
   4: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:200
   5: std::panicking::default_hook
             at src/libstd/panicking.rs:214
   6: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:477
   7: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:384
   8: rust_begin_unwind
             at src/libstd/panicking.rs:311
   9: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
  10: core::result::unwrap_failed
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/macros.rs:18
  11: core::result::Result<T,E>::unwrap
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/result.rs:800
  12: wgpu_native::device::device_create_swap_chain
             at /home/rubic/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-native-0.3.3/src/device.rs:1905
  13: wgpu_swap_chain_get_next_texture
             at /home/rubic/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-native-0.3.3/src/swap_chain.rs:150
  14: wgpu::SwapChain::get_next_texture
             at /home/rubic/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.3.0/src/lib.rs:1369
  15: rgx::core::SwapChain::next
             at /home/rubic/.cargo/registry/src/github.com-1ecc6299db9ec823/rgx-0.1.0/src/core/mod.rs:1150
  16: rx::renderer::Renderer::frame
             at src/renderer.rs:265
  17: rx::init::{{closure}}::{{closure}}
             at ./src/lib.rs:157
  18: rx::FrameTimer::run
             at ./src/lib.rs:56
  19: rx::init::{{closure}}
             at ./src/lib.rs:156
  20: rx::platform::backend::Events::run::{{closure}}
             at ./src/platform/winit.rs:26
  21: winit::platform_impl::platform::sticky_exit_callback
             at /home/rubic/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.20.0-alpha3/src/platform_impl/linux/mod.rs:656
  22: winit::platform_impl::platform::x11::EventLoop<T>::run_return
             at /home/rubic/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.20.0-alpha3/src/platform_impl/linux/x11/mod.rs:285
  23: winit::platform_impl::platform::x11::EventLoop<T>::run
             at /home/rubic/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.20.0-alpha3/src/platform_impl/linux/x11/mod.rs:382
  24: winit::platform_impl::platform::EventLoop<T>::run
             at /home/rubic/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.20.0-alpha3/src/platform_impl/linux/mod.rs:603
  25: winit::event_loop::EventLoop<T>::run
             at /home/rubic/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.20.0-alpha3/src/event_loop.rs:140
  26: rx::platform::backend::Events::run
             at ./src/platform/winit.rs:24
  27: rx::init
             at ./src/lib.rs:116
  28: rx::main
             at src/main.rs:16
  29: std::rt::lang_start::{{closure}}
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/rt.rs:64
  30: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:49
  31: std::panicking::try::do_call
             at src/libstd/panicking.rs:296
  32: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:82
  33: std::panicking::try
             at src/libstd/panicking.rs:275
  34: std::panic::catch_unwind
             at src/libstd/panic.rs:394
  35: std::rt::lang_start_internal
             at src/libstd/rt.rs:48
  36: std::rt::lang_start
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/rt.rs:64
  37: main
  38: __libc_start_main
  39: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Lingua principale
Rust
Stelle
3.5k
Fork
110
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cloudhead/rx

Tutte le issue di cloudhead/rx

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.