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

gfx-backend-metal v0.6.0: "window does not have a valid contentView" #3345

Closed
parasyte opened this issue Aug 21, 2020 · 2 comments
Closed

gfx-backend-metal v0.6.0: "window does not have a valid contentView" #3345

parasyte opened this issue Aug 21, 2020 · 2 comments

Comments

@parasyte
Copy link

The SDL2 example in pixels used to work with gfx-backend-metal v0.5.6.

Repro:

brew install sdl2
git clone https://github.com/parasyte/pixels.git
cd pixels

# This should work
git checkout 0.1.0
cargo run --release --package minimal-sdl2

# This will fail
git checkout 0.2.0
RUST_BACKTRACE=1 cargo run --release --package minimal-sdl2
Error:
    Finished release [optimized] target(s) in 0.14s
     Running `target/release/minimal-sdl2`
thread 'main' panicked at 'window does not have a valid contentView', /Users/parasyte/.cargo/registry/src/github.com-1ecc6299db9ec823/gfx-backend-metal-0.6.0/src/lib.rs:391:13
stack backtrace:
   0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
   1: core::fmt::write
   2: std::io::Write::write_fmt
   3: std::panicking::default_hook::{{closure}}
   4: std::panicking::default_hook
   5: std::panicking::rust_panic_with_hook
   6: std::panicking::begin_panic
   7: gfx_backend_metal::Instance::create_surface_from_nsview
   8: wgpu_core::instance::<impl wgpu_core::hub::Global<G>>::instance_create_surface
   9: minimal_sdl2::main
  10: std::rt::lang_start::{{closure}}
  11: std::rt::lang_start_internal
  12: main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
@parasyte
Copy link
Author

This might be a duplicate of #3329. It looks like wgpu 0.6.0 no longer does the necessary nsview creation that 0.5.0 did.

@kvark
Copy link
Member

kvark commented Aug 21, 2020

Indeed, closing as a dupe

@kvark kvark closed this as completed Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants