Open robbietuk opened 1 month ago
So the issue is with the stir::Scanner::get_scanner_from_name("D690");
The name is not valid and returns new Scanner(Unknown_scanner)
but with no warning. Access of this "Unknown_scanner" object is weird (I'm not looking into it) and leads to the Floating point exception (core dumped)
message and error state.
Obviously, the initialisation with an Unknown_scanner
shouldn't cause seg-faults later on. Sigh.
Note that you now do have to call set_up()
after creating a Scanner
(not checked sufficiently yet).
auto stir_scanner = stir::Scanner::get_scanner_from_name("D690");
Note that this currently causes a memory leak in your example, as it returns a bare pointer. It really should return a std::unique_ptr
, but then we'll have to add a SWIG work-around as that's only supported very recently.
Looks like Scanner
needs some work.
Reopening as we didn't really fix this
Found this issue in an code base. I can replicate the issue with a modification of
using_installed_STIR
C++ example https://github.com/UCL/STIR/tree/master/examples/C%2B%2B/using_installed_STIRSetup
Fresh STIR clone, build and install, most options like ROOT, Python, OpenMP are disabled.
This all works fine, create the expected output and test interfiles are created.
Modify the
demo_create_image.cxx
file toIt produces the
Floating point exception (core dumped)
duringstir_scanner->get_num_axial_blocks()
I have a setup with a windows install and I don't get this issue. I am not sure what I am missing...