Skip to content
This repository has been archived by the owner on Aug 22, 2020. It is now read-only.

Panic when running hello-cube example #28

Closed
mbernat opened this issue Apr 26, 2020 · 5 comments
Closed

Panic when running hello-cube example #28

mbernat opened this issue Apr 26, 2020 · 5 comments
Labels

Comments

@mbernat
Copy link

mbernat commented Apr 26, 2020

Hi. I'm running into the following issue on the current master (47fa1a9).

➜  harmony git:(master) cargo run --example hello-cube
   Compiling harmony v0.1.0 (/home/marek/dev/harmony)
    Finished dev [unoptimized + debuginfo] target(s) in 11.36s
     Running `target/debug/examples/hello-cube`
[2020-04-26T11:04:11Z WARN  gfx_backend_vulkan] Unable to find extension: VK_KHR_wayland_surface
[2020-04-26T11:04:11Z WARN  gfx_backend_vulkan] Unable to find layer: VK_LAYER_LUNARG_standard_validation
[2020-04-26T11:04:11Z WARN  wgpu_core::device] Requested size 1024x768 is outside of the supported range: Extent2D { width: 1914, height: 1151 }..=Extent2D { width: 1914, height: 1151 }
[2020-04-26T11:04:19Z WARN  gfx_memory::heaps] Unable to allocate 134217728 with Linear: TooManyObjects
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `Extent { width: 1024, height: 768, depth: 1 }`,
 right: `Extent { width: 1914, height: 1151, depth: 1 }`', <::std::macros::panic macros>:5:6
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Removing the resize method from hello-cube.rs fixes the panic and I can see a nice example with rotating cube.

@StarArawn
Copy link
Owner

StarArawn commented Apr 26, 2020

Hi, thanks for the issue report. Looks like it might be either an issue with how I am using DPI settings on resize or something internal to wgpu:
gfx-rs/wgpu-rs#24

Not able to reproduce on windows or macos. Seems related to linux?

@StarArawn StarArawn added this to In progress in Harmony 0.0 to 0.1 Apr 26, 2020
@StarArawn StarArawn added the good first issue Good for newcomers label Apr 26, 2020
@floatingmountain
Copy link
Collaborator

floatingmountain commented Apr 27, 2020

        let mut camera_data = CameraData::new_perspective(
            70.0,
            actual_window_size.width,

Maybe not directly related: The new_perspective fn actually wants Radians. We need to convert .to_radians() before passing it. Perhaps you changed the fov and it crashed?
Edit:Edit:Missed that you got it working

@mbernat
Copy link
Author

mbernat commented Apr 27, 2020

Thanks for the hints, both of you, I'll try debugging this later today.

Btw, yes, I am on Linux. Would posting some additional traces help?

@mbernat
Copy link
Author

mbernat commented Apr 27, 2020

The issue goes away on the latest master (84969b8).

So I guess it was a wgpu bug.

@StarArawn
Copy link
Owner

Closing this as it appears to be fixed.

Harmony 0.0 to 0.1 automation moved this from In progress to Done May 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Development

No branches or pull requests

3 participants