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

Demo panics on window close due to context not being destroyed #489

Open
simbleau opened this issue Jan 23, 2022 · 0 comments
Open

Demo panics on window close due to context not being destroyed #489

simbleau opened this issue Jan 23, 2022 · 0 comments

Comments

@simbleau
Copy link

simbleau commented Jan 23, 2022

Dually noticed, I noticed and included a warning where std::mem wasn't being used. Perhaps someone previously meant to drop the context somehow and this was removed erroneously in a later commit.

warning: unused import: `std::mem`
  --> demo/native/src/main.rs:29:5
   |
29 | use std::mem;
   |     ^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

warning: 1 warning emitted

    Finished dev [unoptimized + debuginfo] target(s) in 0.11s
     Running `/home/spencer/temp2/pathfinder/target/debug/demo`
The application panicked (crashed).
Message:  Contexts must be destroyed explicitly with `destroy_context`!
Location: /home/spencer/.cargo/git/checkouts/surfman-d15b9f3e86c2e263/f3df871/surfman/src/platform/generic/egl/context.rs:67

Run with RUST_BACKTRACE=full to include source snippets.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                          (6 post panic frames hidden)                          
 6: <surfman::platform::generic::egl::context::EGLBackedContext as core::ops::drop::Drop>::drop::haf8881ec64f40d0d
    at /home/spencer/.cargo/git/checkouts/surfman-d15b9f3e86c2e263/f3df871/surfman/src/platform/generic/egl/context.rs:67
 7: core::ptr::drop_in_place::h6eb68001a3d08473
    at /home/spencer/.rustup/toolchains/1.47.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:184
 8: core::ptr::drop_in_place::h61014e53c0a8f1f0
    at /home/spencer/.rustup/toolchains/1.47.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:184
 9: core::ptr::drop_in_place::h29abdcc4f568a051
    at /home/spencer/.rustup/toolchains/1.47.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:184
10: core::ptr::drop_in_place::h7ad202d87997c881
    at /home/spencer/.rustup/toolchains/1.47.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:184
11: core::ptr::drop_in_place::h36d0fab1009939a1
    at /home/spencer/.rustup/toolchains/1.47.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:184
12: core::ptr::drop_in_place::h1ca77ec8b801b1ba
    at /home/spencer/.rustup/toolchains/1.47.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:184
13: demo::main::h58ec6edcf139b09a
    at /home/spencer/temp2/pathfinder/demo/native/src/main.rs:102
14: core::ops::function::FnOnce::call_once::h67dcb2985cae8b0f
    at /home/spencer/.rustup/toolchains/1.47.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227
15: std::sys_common::backtrace::__rust_begin_short_backtrace::hab23bac9cd9775d0
    at /home/spencer/.rustup/toolchains/1.47.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:137
                        (10 runtime init frames hidden)                         
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant