Open crisluengo opened 1 week ago
The cause of the hang was an infinite loop in dip::GetOptimalDFTSize()
caused by unsigned integer overflow. In the 64-bit case overflow didn’t happen because none of the test inputs were large enough to make that happen. But for the 32-bit case, one of the test cases was large enough.
The relevant sources are here: https://github.com/DIPlib/diplib/blob/master/src/transform/dft_optimal_size.cpp
The algorithm was adapted from PocketFFT, here is the issue I submitted to that project: https://github.com/mreineck/pocketfft/issues/15
I have tried to fix the overflow problem. It no longer hangs but I haven’t gotten a correct algorithm yet. I think part of the solution will be to limit the size of the input, as suggested by the PocketFFT author.
The CI tests for the 32-bit cross-compile build on Ubuntu have issues. The first time it ran, it showed a few tests failing, and then it hanged.
I've fixed all but one of the failing tests (
FindHoughCircles
still needs to be fixed).The test program hangs during the execution of the test "[DIPlib] testing the SingularValueDecomposition and related functions" (
src/support/matrix.cpp
, line 569). I added "print debug statements", and saw it run all the way to the end of the test case, but doctest was not reporting the time it took to run that test, so it seems this is happening somewhere in the cleanup for the test case.For the time being, I've disabled running the tests for this build.
For reference, the
FindHoughCircles
failed checks:The two circles are swapped, and one center is off by a few pixels in x and r.