Skip to content

Crash on mem::zeroed  #77

Description

@bshubenok-sigma

I'm trying to run a stream capture example on arm64 device and getting this type of error:

The application panicked (crashed).
Message:  attempted to zero-initialize type `buffer::Metadata`, which is invalid
Location: library/core/src/panicking.rs:126

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 7 frames hidden ⋮
   8: core::panicking::panic_nounwind_fmt::hef625da4d1887edc
      at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:96
   9: core::panicking::panic_nounwind::h39541cbd5a72f09a
      at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:126
  10: core::mem::zeroed::hffae7c8a55c7cecb
      at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/mem/mod.rs:653
  11: v4l::io::mmap::stream::Stream::with_buffers::h57158218617a1fba
      at /home/noah/.cargo/git/checkouts/libv4l-rs-917e1f4ffd90b94a/9844291/src/io/mmap/stream.rs:55
  12: lib::mediaengine::MediaEngine::process_video::{{closure}}::h36fd47a510f39921

As if it is enclosed in unsafe this may be somehow expected, I guess, but how could I overcome this?
Or is this me lacking some compiler settings?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions