Skip to content

Commit aee0512

Browse files
committed
Don't try to modify image in-place in python operator dataflow example
The shared memory image must not be modified because it might be sent to other receivers too. Trying to modify it will result in a SEGFAULT now that we map the shared memory region as read-only.
1 parent 9795736 commit aee0512

File tree

1 file changed

+1
-0
lines changed
  • examples/python-operator-dataflow

1 file changed

+1
-0
lines changed

examples/python-operator-dataflow/plot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def on_input(
5858
dora_input["value"]
5959
.to_numpy()
6060
.reshape((CAMERA_HEIGHT, CAMERA_WIDTH, 3))
61+
.copy() # copy the image because we want to modify it below
6162
)
6263
self.image = frame
6364

0 commit comments

Comments
 (0)