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

Crash when moving Window to background in Example #58

Closed
seivan opened this issue Feb 13, 2019 · 5 comments
Closed

Crash when moving Window to background in Example #58

seivan opened this issue Feb 13, 2019 · 5 comments
Labels
help required We need community help to make this happen. type: bug Something isn't working

Comments

@seivan
Copy link
Contributor

seivan commented Feb 13, 2019

This sample crashes when running with Metal on macOS Mojave.

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ()', src/libcore/result.rs:1009:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:211
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:227
   4: <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get
             at src/libstd/panicking.rs:491
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:398
   6: std::panicking::try::do_call
             at src/libstd/panicking.rs:325
   7: core::char::methods::<impl char>::escape_debug
             at src/libcore/panicking.rs:95
   8: <parking_lot::raw_mutex::RawMutex as lock_api::mutex::RawMutex>::unlock
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libcore/macros.rs:26
   9: <parking_lot::raw_mutex::RawMutex as lock_api::mutex::RawMutex>::unlock
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libcore/result.rs:808
  10: core::alloc::Layout::repeat
             at wgpu-native/src/swap_chain.rs:159
  11: wgpu::TextureCopyView::into_native
             at wgpu-rs/src/lib.rs:673
  12: core::ptr::real_drop_in_place
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libcore/ptr.rs:204
  13: cube::framework::run
             at gfx-examples/src/framework.rs:111
  14: cube::main
             at gfx-examples/src/cube.rs:330
  15: std::rt::lang_start::{{closure}}
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libstd/rt.rs:74
  16: std::panicking::try::do_call
             at src/libstd/rt.rs:59
             at src/libstd/panicking.rs:310
  17: panic_unwind::dwarf::eh::read_encoded_pointer
             at src/libpanic_unwind/lib.rs:102
  18: <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get
             at src/libstd/panicking.rs:289
             at src/libstd/panic.rs:398
             at src/libstd/rt.rs:58
  19: std::rt::lang_start
             at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libstd/rt.rs:74
  20: <cube::Vertex as core::clone::Clone>::clone
@kvark
Copy link
Member

kvark commented Feb 13, 2019

Thanks for filing the issue!
There isn't proper support here yet for swapchain resizing/recreation/errors.

@kvark kvark added type: bug Something isn't working help required We need community help to make this happen. labels Feb 13, 2019
@seivan
Copy link
Contributor Author

seivan commented Feb 18, 2019

@kvark Is that an issue in gfx-hal, gfx-examples or WebGPU itself?
I mean as far as I remember, gfx-hal didn't have this issue at all, so it could be the example or WebGPU?

@kvark
Copy link
Member

kvark commented Feb 18, 2019 via email

@seivan
Copy link
Contributor Author

seivan commented Feb 19, 2019

This also happens on iOS but I'm not 100% sure it's related.

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: ()', src/libcore/result.rs:1009:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::_print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: std::panicking::rust_panic_with_hook
   5: std::panicking::continue_panic_fmt
   6: rust_begin_unwind
   7: core::panicking::panic_fmt
   8: core::result::unwrap_failed
   9: <core::result::Result<T, E>>::unwrap
  10: wgpu_swap_chain_present
  11: <wgpu::SwapChainOutput<'a> as core::ops::drop::Drop>::drop
  12: core::ptr::real_drop_in_place

Seems to be a swapchain issue - but I can't tell further.

@seivan
Copy link
Contributor Author

seivan commented Feb 25, 2019

Resolved in #69
However still limited to N amount of Swapchains (or MTLDrawables returned from a swapchain)

@seivan seivan closed this as completed Feb 25, 2019
mitchmindtree pushed a commit to mitchmindtree/wgpu that referenced this issue Feb 23, 2020
58: Update to latest wgpu native r=kvark a=rukai

This PR is waiting on gfx-rs#276 but also allows us to test 276

Co-authored-by: Rukai <rubickent@gmail.com>
kvark pushed a commit to kvark/wgpu that referenced this issue Jun 3, 2021
58: Update to latest wgpu native r=kvark a=rukai

This PR is waiting on gfx-rs#276 but also allows us to test 276

Co-authored-by: Rukai <rubickent@gmail.com>
Patryk27 pushed a commit to Patryk27/wgpu that referenced this issue Nov 23, 2022
* Move from travis to github actions (gfx-rs#58)

* Added github actions

* Remove travis

* Fixed clippy warnings

* Add the clippy check to ci

* Move workflows to .github

* Fix missing clippy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help required We need community help to make this happen. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants