Closed GKnirps closed 10 months ago
I fiddled around with the code a bit. In wellenbrecher-canvas/srs/lib.rs
, in Canvas::open
, the variable size
is larger than the actual size of shared_memory
after the initialization of the shared memory. Later, the shared memory is accessed as if it had the size of size
, which leads to memory corruption.
Hi, thanks for giving wellenbrecher a try :)
Yep, you are right.
Any component (wellenbrecher, seebruecke, …) will create a shared memory if there is no present ( :thinking: maybe only wellenbrecher should be able to do that?).
There are mechanics in wellenbrecher to remove that shared memory on exit but they did not receive much attention yet.
wellenbrecher --help
# …
# -l, --canvas-file-link <CANVAS_FILE_LINK>
# Canvas shared memory file link [default: /tmp/wellenbrecher-canvas]
# --keep-canvas-file-link
# Keep canvas shared memory file link
# …
/tmp/wellenbrecher-canvas
contains the shared memory that you can find under /dev/shm/
.
cat /tmp/wellenbrecher-canvas
# /shmem_<some id>
Remove the canvas manually:
sudo rm "/dev/shm$(cat /tmp/wellenbrecher-canvas)" /tmp/wellenbrecher-canvas
The canvas is persisted between restarts
Yes that is actually a feature :D
TODOs:
Hi, I tried out wellenbrecher, and I get a segfault under certain circumstances.
Steps to reproduce:
Expected result: The pixels get printed in the expected area. Actual result: wellenbrecher gets terminated because of a segmentation fault.
Additionally: The canvas is persisted between restarts. I tried to figure out where and how to reset it, but I was unsuccessful. Maybe that can go into the README.md as well?