Occasional segfault in RadonTransformCircles
anntzer opened this issue · 2 comments
anntzer commented
Component
diplib 3.4.1 installed from PyPI.
Describe the bug
RadonTransformCircles sometimes segfaults. This appears to occur nondeterministically depending on the input.
To Reproduce
for it in $(seq 0 100); do
python -c 'import diplib as d, numpy as np; np.random.seed(18); d.RadonTransformCircles(np.random.randn(100, 100), mode="projection", options={"hollow"})' ||
echo "fail at iteration $it"
done
This appears to fail every couple of iterations, even though the input is always the same (np.random.seed + np.random.randn is just used to generate a fixed input. The error message is
Fatal Python error: Segmentation fault
Current thread 0x00000001fbcf7ac0 (most recent call first):
File "<string>", line 1 in <module>
Extension modules: numpy.core._multiarray_umath, numpy.core._multiarray_tests, numpy.linalg._umath_linalg, numpy.fft._pocketfft_internal, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator (total: 13)
System information:
- What OS do you have? macOS 14.4
- If PyDIP, what version of Python do you have? 3.12.0
- If DIPimage, what version of MATLAB do you have? (type
ver
at the MATLAB command prompt, and copy-paste the result here). N/A - If compiled from sources, what compiler and version did you use? N/A
crisluengo commented
Thank you for pointing this out!
It's a simple fix, but what to fix was not easy to figure out. :)
crisluengo commented
If you upgrade to 3.4.3, this issue will be fixed.