DIPlib / diplib

Quantitative Image Analysis in C++, MATLAB and Python
https://diplib.org
Apache License 2.0
228 stars 50 forks source link

Python zsh: segmentation fault at the end of the script #181

Open ogencoglu opened 5 days ago

ogencoglu commented 5 days ago

Component PyDIP - 3.5.1 (latest)

Describe the bug

I have a long python script that performs various computations with numpy, pandas, scipy etc. At one place, I have replaced my scipy.ndimage.binary_fill_holes() with dip.FillHoles() and it works as expected and is faster. But at the end of the script, python crashes and I get

zsh: segmentation fault

I don't get the error at FillHoles stage but only at the very end (related to destructor, garbage collector maybe?)

Any tips would be appreciated.

System information:

crisluengo commented 5 days ago

Thanks for reporting!

It would be useful to know the exact set of steps needed to reproduce the bug. It likely involves an incompatibility between DIPlib and some other package you're using. We know this for example happens with some Conda-built packages (see #130). Here's a quick guide on how to create a minimal reproducible example: https://stackoverflow.com/help/minimal-reproducible-example. I know that's quite a lot of effort, but it's the only way we can learn what might be causing this issue. Much appreciated!