Let me begin by complementing you on this library, it feels almost magical how fast it's able to process complex masks with so many different functions.
To the bug report: I've observed crashes with complement() and crop() with certain inputs. I haven't been able to debug it further due to my limited C skills. The error message shown is either realloc(): invalid next size or corrupted size vs. prev_size.
This does not occur on ARM-based macs but does occur reliably on x86_64 Ubuntu machines. The library is installed from commit 2e7964e, python version is 3.10.13.
I have tried to check if e.g. the rle size is wrong or if pycocotools.mask.encode(pycocotools.mask.decode(data)) changes the RLE, but this does not seem to be the case.
I appreciate any insights you might have on this issue.
Let me begin by complementing you on this library, it feels almost magical how fast it's able to process complex masks with so many different functions.
To the bug report: I've observed crashes with
complement()
andcrop()
with certain inputs. I haven't been able to debug it further due to my limited C skills. The error message shown is eitherrealloc(): invalid next size
orcorrupted size vs. prev_size
.This does not occur on ARM-based macs but does occur reliably on x86_64 Ubuntu machines. The library is installed from commit
2e7964e
, python version is3.10.13
.Reproduction
Samples
For complement()
For crop()
I have tried to check if e.g. the rle size is wrong or if
pycocotools.mask.encode(pycocotools.mask.decode(data))
changes the RLE, but this does not seem to be the case.I appreciate any insights you might have on this issue.