Skip to content
This repository was archived by the owner on Jul 10, 2023. It is now read-only.
This repository was archived by the owner on Jul 10, 2023. It is now read-only.

Using openvr on windows leads to TrackedDevicePose_t uninitilized error #105

Open
@ghost

Description

Hi,

i am using the HTC Vive on windows, with OpenVR.
If i start use the device like in the example, i get an error, TrackedDevicePose_t uninitilized.
The stacktrace leads to:
https://github.com/servo/rust-webvr/blob/master/rust-webvr/src/api/openvr/display.rs#L118

At first i tought i did setup the device wrong, but seeing the code two lines above. Can it be, that indeed struct should be initilized?

Rust Version:
nightly-x86_64-pc-windows-msvc (default)
rustc 1.53.0-nightly (07e0e2ec2 2021-03-24)

' panicked at 'attempted to leave type `api::openvr::binding::TrackedDevicePose_t` uninitialized, which is invalid', C:\Users\gojira\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\mem\mod.rs:660:9
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597\/library\std\src\panicking.rs:493
   1: core::panicking::panic_fmt
             at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597\/library\core\src\panicking.rs:92
   2: core::panicking::panic
             at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597\/library\core\src\panicking.rs:50
   3: core::mem::uninitialized
             at C:\Users\gojira\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\mem\mod.rs:660
   4: rust_webvr::api::openvr::display::{{impl}}::synced_frame_data
             at C:\Users\gojira\.cargo\registry\src\github.com-1ecc6299db9ec823\rust-webvr-0.19.0\src\api\openvr\display.rs:118
   5: shadow_of_truth::vr::VirtualReality::sync_data

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