InsightSoftwareConsortium / InsightSoftwareConsortium/ITK

`DeformableRegistration8Test3` seems broken (requires `ITK_USE_BRAINWEB_DATA`)

Open
#5,170 5 comments 0 reactions 0 assignees View on GitHub
type:Bug
Dominant language
C++
Stars
1.7k
Forks
748
Avg merge
1d 1h
Merged PRs (30d)
64

Description

I suspect ITK_USE_BRAINWEB_DATA does not get a lot of testing...

If I enable that option, build, then do `ctest -V -R DeformableRegistration8Test3`, I get a failure like:

```
Starting Registration
ExceptionObject caught !

itk::ImageFileReaderException (0x60f000002280)
Location: "virtual void itk::ImageFileReader>::GenerateOutputInformation() [TOutputImage = itk::Image, ConvertPixelTraits = itk::DefaultConvertPixelTraits]"
File: /Users/sean/external/ITK/Modules/IO/ImageBase/include/itkImageFileReader.hxx
Line: 135
Description: Could not create IO object for reading file /Users/sean/external/ITK-ASan-bin/Testing/Temporary/BSplineWarping2Test.mhd
The file doesn't exist.
Filename = /Users/sean/external/ITK-ASan-bin/Testing/Temporary/BSplineWarping2Test.mhd
```

Indeed that file is not there. If I then do `ctest -j22 -R .`, that seems to tickle something else to get/create the file. Now if I run just `DeformableRegistration8Test3` it finds that file, and I get farther.

It runs for minutes and consumes tonnes of RAM. I have 192 GiB of physical RAM and it uses it all and starts swapping.

If I then enable UBSan I find a use of a null pointer. I chased it a bit and if you take this `virtualImage`:

https://github.com/InsightSoftwareConsortium/ITK/blob/1090d31e0360022b4414d0c3cbf27927a7d55901/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.hxx#L32

and add the line after `assert(virtualImage->GetBufferPointer());` that's the null, which I believe is unexpected.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.