Skip to content

resolve segfault triggered by rust_minifb #1

Description

@wdoconnell

To date, testing has been done on my 2019 Macbook Pro. It has these relevant specs

  • 2.3 GHz 8-core Intel i9 processor
  • 16 GB 2667 Mhz DDR memory
  • AMD Radeon Pro 5500M 4GB graphics card

On OSX, after the concurrency refactors with crossbeam to send and receive audio/video via channels (e531111, 9807462), I now get approx. 60 FPS and clear audio on OSX.

Ultimately the goal is to optimize this for embedded devices so that it can be used on cheap "connector" hardware that I can keep plugged in. Today I tested it on a raspberry pi zero 2:

  • 1GHz quad-core 64-bit Arm Cortex-A53 CPU
  • 512MB SDRAM
  • VideoCore IV GPU

No good results there. A video opens briefly, shows one frame of black screen, and is followed by a segfault, which appears to be coming from rust_minifb, which we use for windowed framebuffer output.

wdo@raspberrypi: $ valgrind ./target/debug/rustds
. . .
Invalid write of size 4:
image_resize_linear_stride (scalar.c:54)
image_resize_linear_aspect_fill (scalar.c:91)
minifb::os::posix::x11::Window::raw_blit:buffer (x11.rs:911)
minifb::os::posix::x11:: Window::update_with_buffer_stride (x11.rs:585)
minifb::os::posix::Window::update_with_buffer_stride (mod.rs:98)
minifb::Window::update_with_buffer (lib.rs:387)
rustds::serve_video (main.rs:73)

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