Skip to content

thread 'main' panicked at 'attempted to leave type uninitialized, which is invalid (regression 1.47 -> 1.48) #80485

Closed
@amarao

Description

@amarao

Code

I tried this code:
https://github.com/amarao/equart/tree/b07f31318b0529d3c01fe5d077497f3511dbc779

(sorry, it happens somewhere deep inside Piston library I use, so the whole application is needed to make it runable).

I expected to see this happen:

Application should work (display a picture).

Instead, this happened:

Application crashes if mouse is moved over the window (Linux).

thread 'main' panicked at 'attempted to leave type platform::platform::x11::util::input::PointerState uninitialized, which is invalid', .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:658:9

It most recently worked on: Rust 1.47

Version with regression

Rust 1.48.0

rustc 1.48.0 (7eac88abb 2020-11-16)
binary: rustc
commit-hash: 7eac88abb2e57e752f3302f02be5f3ce3d7adfb4
commit-date: 2020-11-16
host: x86_64-unknown-linux-gnu
release: 1.48.0
LLVM version: 11.0

Backtrace

thread 'main' panicked at 'attempted to leave type `platform::platform::x11::util::input::PointerState` uninitialized, which is invalid', /home/amarao/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:658:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:483
   1: core::panicking::panic_fmt
             at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/panicking.rs:85
   2: core::panicking::panic
             at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/panicking.rs:50
   3: winit::platform::platform::x11::util::input::<impl winit::platform::platform::x11::xdisplay::XConnection>::query_pointer
   4: winit::platform::platform::x11::EventsLoop::process_event
   5: glutin_window::GlutinWindow::poll_event
   6: <glutin_window::GlutinWindow as window::Window>::poll_event
   7: event_loop::Events::next
   8: equart::main

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions