Closed
Description
Description of the bug
We got crashes by using samples_mv
when the original fitz handle was already deallocated.
IMO samples_mv
should be changes so it should be renamed to something like unsafe_samples_mv
.
How to reproduce the bug
Unfortunately I wasn't able to reproduce this outside of our production setting, but it went away by changing this code:
np.frombuffer(pixmap.samples_mv, ...)
to
np.frombuffer(pixmap.samples_mv, ...).copy()
PyMuPDF version
1.25.1
Operating system
Linux
Python version
3.12