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

cargo run --example tour crashes with (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION) #447

Closed
dotjpg3141 opened this issue Jul 10, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@dotjpg3141
Copy link

Related (duplicate?) of #98.

I'm trying to run cargo run --example tour on Windows 10, but it crashes:

$> cargo run --package tour
    Finished dev [unoptimized + debuginfo] target(s) in 0.50s
     Running `target\debug\tour.exe`
error: process didn't exit successfully: `target\debug\tour.exe` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

I have an additional monitor connected to my laptop, which is my primary display:

  1. Laptop monitor
  2. Additional monitor (primary display)

grafik

However, I can start the application successfully by I either making my laptop (1) the primary display or by disconnecting my additional monitor (2) (which makes my laptop monitor also the primary display I guess).

I have these graphic cards with the latest drivers installed:

  • Intel(R) HD Graphics 530
  • NVIDIA GeForce GTX 970M
Iced is using the Vulkan renderer and is crashing somewhere here trying to create the swap chain.

struct wgpu_native::id::Id<wgpu_native::swap_chain::SwapChain<gfx_backend_empty::Backend>> wgpu_native::device::device_create_swap_chain<gfx_backend_vulkan::Backend>(struct wgpu_native::hub::Global *, struct wgpu_native::id::Id<wgpu_native::device::Device<gfx_backend_empty::Backend>>, struct wgpu_native::id::Id<wgpu_native::instance::Surface>, struct wgpu_native::swap_chain::SwapChainDescriptor *) (~\.cargo\registry\src\github.com-1ecc6299db9ec823\wgpu-native-0.4.3\src\device.rs:2091)
struct wgpu_native::id::Id<wgpu_native::swap_chain::SwapChain<gfx_backend_empty::Backend>> wgpu_native::device::wgpu_device_create_swap_chain(struct wgpu_native::id::Id<wgpu_native::device::Device<gfx_backend_empty::Backend>>, struct wgpu_native::id::Id<wgpu_native::instance::Surface>, struct wgpu_native::swap_chain::SwapChainDescriptor *) (~\.cargo\registry\src\github.com-1ecc6299db9ec823\wgpu-native-0.4.3\src\device.rs:2125)
struct wgpu::SwapChain wgpu::Device::create_swap_chain(struct wgpu::Surface *, struct wgpu_native::swap_chain::SwapChainDescriptor *) (~\.cargo\registry\src\github.com-1ecc6299db9ec823\wgpu-0.4.0\src\lib.rs:834)
static struct wgpu::SwapChain iced_wgpu::window::swap_chain::new_swap_chain(struct wgpu::Surface *, wgpu_native::resource::TextureFormat, unsigned int, unsigned int, struct wgpu::Device *) (~\.cargo\registry\src\github.com-1ecc6299db9ec823\iced_wgpu-0.2.3\src\window\swap_chain.rs:47)
struct iced_wgpu::window::swap_chain::SwapChain iced_wgpu::window::swap_chain::SwapChain::new(struct wgpu::Surface *, wgpu_native::resource::TextureFormat, unsigned int, unsigned int) (~\.cargo\registry\src\github.com-1ecc6299db9ec823\iced_wgpu-0.2.3\src\window\swap_chain.rs:26)
struct iced_wgpu::window::swap_chain::SwapChain iced_wgpu::window::backend::{{impl}}::create_swap_chain(struct iced_wgpu::window::backend::Backend *, struct wgpu::Surface *, unsigned int, unsigned int) (~\.cargo\registry\src\github.com-1ecc6299db9ec823\iced_wgpu-0.2.3\src\window\backend.rs:64)
void iced_winit::application::Application::run<iced::application::Instance<test::Counter>>(struct iced_winit::settings::Settings<()>, struct iced_wgpu::settings::Settings) (~\.cargo\registry\src\github.com-1ecc6299db9ec823\iced_winit-0.1.0\src\application.rs:187)
static void iced::application::Application::run<test::Counter>(struct iced::settings::Settings<()>) (~\.cargo\registry\src\github.com-1ecc6299db9ec823\iced-0.1.1\src\application.rs:201)
void iced::sandbox::Sandbox::run<test::Counter>(struct iced::settings::Settings<()>) (~\.cargo\registry\src\github.com-1ecc6299db9ec823\iced-0.1.1\src\sandbox.rs:139)
static void test::main() (d:\Dev\Programming\Rust\test\src\main.rs:5)
int std::rt::lang_start::{{closure}}<()>(struct std::rt::lang_start::closure-0 *) (~\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\src\libstd\rt.rs:67)
void std::rt::lang_start_internal() (@std::rt::lang_start_internal::hb00fb1ac5aa11932:57)
__int64 std::rt::lang_start<()>( *, __int64, unsigned char * *) (~\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\src\libstd\rt.rs:67)
main (@main:10)
static int __scrt_common_main_seh() (@7ff6c99dc390..7ff6c99dc3f7:3)
BaseThreadInitThunk (@BaseThreadInitThunk:9)
RtlUserThreadStart (@RtlUserThreadStart:12)

I have tested the cube example in wgpu-rs which worked fine for me.

@hecrj hecrj added the bug Something isn't working label Jul 11, 2020
@hecrj
Copy link
Member

hecrj commented Jul 11, 2020

Thanks for the report!

Could you try the game_of_life or solar_system examples? Unlike the tour, they should always choose the most powerful GPU.

@dotjpg3141
Copy link
Author

Both work fine for me.

@andy5995
Copy link

Both work fine for me.

For me, cargo run works if I'm in iced/examples/tour, otherwise:

andy@oceanus:~/src/rust/iced$ cargo run --example tour
error: no example target named `tour`
andy@oceanus:~/src/rust/iced$ uname -a
Linux oceanus 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux

@Absolucy
Copy link

Absolucy commented Dec 6, 2020

I'm getting a similar error: (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION).

Using the iced_glow renders works perfectly fine.

  • Windows 10 20H2, build 19042.662
  • AMD Radeon RX 5700 XT, driver version 20.45.01.24-201125a-361677E-RadeonSoftwareAdrenalin2020

Some hopefully helpful debug info:

@hecrj hecrj closed this as completed Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants