Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invariantImageSimilarity Rcpp Segfault #119

Closed
cfhammill opened this issue Oct 26, 2016 · 4 comments
Closed

invariantImageSimilarity Rcpp Segfault #119

cfhammill opened this issue Oct 26, 2016 · 4 comments

Comments

@cfhammill
Copy link
Contributor

Hi I've run into a segfault with invariantImageSimilarity. Any thoughts and suggestions would be greatly appreciated.

ANTsR and ITKR were install via devtools::install_github with no customizations,. The system is ubuntu 12.04, system gcc is 4.6.3

GDB backtrace:

> library(ANTsR)
> fi<-antsImageRead( getANTsRData("r16"))
> mi<-antsImageRead( getANTsRData("r64"))
> mival<-invariantImageSimilarity( fi, mi, c(0,10,20) )
terminate called after throwing an instance of 'Rcpp::not_compatible'
  what():  expecting a single value

Program received signal SIGABRT, Aborted.
0x00007ffff71c4035 in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) 
(gdb) bt
#0  0x00007ffff71c4035 in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007ffff71c779b in __GI_abort () at abort.c:91
#2  0x00007ffff37d969d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff37d7846 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff37d7873 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff37d796e in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007fffefcca16f in Rcpp::internal::primitive_as<unsigned int> (x=<optimized out>) at /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/library/Rcpp/include/Rcpp/as.h:32
#7  0x00007ffff056b84a in as<unsigned int> (x=<optimized out>) at /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/library/Rcpp/include/Rcpp/as.h:41
#8  as<unsigned int> (x=<optimized out>) at /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/library/Rcpp/include/Rcpp/as.h:144
#9  invariantSimilarityHelper<2u, itk::AffineTransform<double, 2u> > (image1=..., image2=..., r_thetas=0x1ec6780, r_thetas2=0x1ec1e40, r_thetas3=0x1ec1f78, r_lsits=<optimized out>, r_WM=0x271b018, r_scale=0x27238b8, r_doreflection=0x2723888, r_txfn=0x2740788)
    at invariantImageSimilarity.cpp:147
#10 0x00007ffff0532bd8 in invariantImageSimilarity (r_in_image1=<optimized out>, r_in_image2=<optimized out>, thetas=0x1ec6780, thetas2=0x1ec1e40, thetas3=0x1ec1f78, localSearchIterations=0x2af23c8, whichMetric=0x271b018, r_scale=0x27238b8, r_doref=0x2723888, 
    txfn=0x2740788, whichTransform=0x2723588) at invariantImageSimilarity.cpp:572
#11 0x00007ffff784704b in R_doDotCall () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#12 0x00007ffff7855136 in do_dotcall () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#13 0x00007ffff7890610 in Rf_eval () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#14 0x00007ffff7894bd7 in do_set () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#15 0x00007ffff78903fa in Rf_eval () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#16 0x00007ffff7893bf7 in do_begin () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#17 0x00007ffff78903fa in Rf_eval () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#18 0x00007ffff7892bc8 in do_if () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#19 0x00007ffff78903fa in Rf_eval () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#20 0x00007ffff7893bf7 in do_begin () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#21 0x00007ffff78903fa in Rf_eval () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#22 0x00007ffff78916de in Rf_applyClosure () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#23 0x00007ffff7890727 in Rf_eval () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#24 0x00007ffff7894bd7 in do_set () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#25 0x00007ffff78903fa in Rf_eval () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#26 0x00007ffff78d038f in Rf_ReplIteration () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#27 0x00007ffff78d0554 in R_ReplConsole () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#28 0x00007ffff78d1ebb in run_Rmainloop () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#29 0x00007ffff78d1ed0 in Rf_mainloop () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#30 0x0000000000400846 in main ()
#31 0x00007ffff71af7ed in __libc_start_main (main=0x400814 <main>, argc=1, ubp_av=0x7fffffffd418, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd408) at libc-start.c:226
#32 0x0000000000400759 in _start ()

valgrind

> library(ANTsR)
==27293== Invalid read of size 8
==27293==    at 0x5750DBD: _wordcopy_fwd_dest_aligned (wordcopy.c:205)
==27293==    by 0x574A9DB: __GI_memmove (memmove.c:76)
==27293==    by 0x5705672: realpath@@GLIBC_2.3 (canonicalize.c:192)
==27293==    by 0xF493C02: itksys::SystemTools::ClassInitialize() (in /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/library/ANTsR/libs/ANTsR.so)
==27293==    by 0xE6D9B56: _GLOBAL__sub_I_antsImageHeaderInfo.cpp (SystemTools.hxx:71)
==27293==    by 0x400F2C5: call_init.part.0 (dl-init.c:85)
==27293==    by 0x400F39E: _dl_init (dl-init.c:52)
==27293==    by 0x4013A99: dl_open_worker (dl-open.c:549)
==27293==    by 0x400F135: _dl_catch_error (dl-error.c:178)
==27293==    by 0x40132D9: _dl_open (dl-open.c:639)
==27293==    by 0x6C88F25: dlopen_doit (dlopen.c:67)
==27293==    by 0x400F135: _dl_catch_error (dl-error.c:178)
==27293==  Address 0x7e0cb50 is 96 bytes inside a block of size 99 alloc'd
==27293==    at 0x4C2B1C7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27293==    by 0xC306A88: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==27293==    by 0xC308494: char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==27293==    by 0xC3085E2: std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==27293==    by 0xF493BDD: itksys::SystemTools::ClassInitialize() (in /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/library/ANTsR/libs/ANTsR.so)
==27293==    by 0xE6D9B56: _GLOBAL__sub_I_antsImageHeaderInfo.cpp (SystemTools.hxx:71)
==27293==    by 0x400F2C5: call_init.part.0 (dl-init.c:85)
==27293==    by 0x400F39E: _dl_init (dl-init.c:52)
==27293==    by 0x4013A99: dl_open_worker (dl-open.c:549)
==27293==    by 0x400F135: _dl_catch_error (dl-error.c:178)
==27293==    by 0x40132D9: _dl_open (dl-open.c:639)
==27293==    by 0x6C88F25: dlopen_doit (dlopen.c:67)
==27293==
==27293== Invalid read of size 8
==27293==    at 0x5750DBD: _wordcopy_fwd_dest_aligned (wordcopy.c:205)
==27293==    by 0x574A9DB: __GI_memmove (memmove.c:76)
==27293==    by 0x5705672: realpath@@GLIBC_2.3 (canonicalize.c:192)
==27293==    by 0xF493E02: itksys::SystemTools::ClassInitialize() (in /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/library/ANTsR/libs/ANTsR.so)
==27293==    by 0xE6D9B56: _GLOBAL__sub_I_antsImageHeaderInfo.cpp (SystemTools.hxx:71)
==27293==    by 0x400F2C5: call_init.part.0 (dl-init.c:85)
==27293==    by 0x400F39E: _dl_init (dl-init.c:52)
==27293==    by 0x4013A99: dl_open_worker (dl-open.c:549)
==27293==    by 0x400F135: _dl_catch_error (dl-error.c:178)
==27293==    by 0x40132D9: _dl_open (dl-open.c:639)
==27293==    by 0x6C88F25: dlopen_doit (dlopen.c:67)
==27293==    by 0x400F135: _dl_catch_error (dl-error.c:178)
==27293==  Address 0x7e0ceb8 is 88 bytes inside a block of size 93 alloc'd
==27293==    at 0x4C2B1C7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27293==    by 0xC306A88: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==27293==    by 0xC308494: char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==27293==    by 0xC3085E2: std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==27293==    by 0xF493DE0: itksys::SystemTools::ClassInitialize() (in /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/library/ANTsR/libs/ANTsR.so)
==27293==    by 0xE6D9B56: _GLOBAL__sub_I_antsImageHeaderInfo.cpp (SystemTools.hxx:71)
==27293==    by 0x400F2C5: call_init.part.0 (dl-init.c:85)
==27293==    by 0x400F39E: _dl_init (dl-init.c:52)
==27293==    by 0x4013A99: dl_open_worker (dl-open.c:549)
==27293==    by 0x400F135: _dl_catch_error (dl-error.c:178)
==27293==    by 0x40132D9: _dl_open (dl-open.c:639)
==27293==    by 0x6C88F25: dlopen_doit (dlopen.c:67)
==27293==
==27293== Invalid read of size 8
==27293==    at 0x5750D67: _wordcopy_fwd_dest_aligned (wordcopy.c:184)
==27293==    by 0x574A9DB: __GI_memmove (memmove.c:76)
==27293==    by 0x5705672: realpath@@GLIBC_2.3 (canonicalize.c:192)
==27293==    by 0xF493E02: itksys::SystemTools::ClassInitialize() (in /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/library/ANTsR/libs/ANTsR.so)
==27293==    by 0xE6D9B56: _GLOBAL__sub_I_antsImageHeaderInfo.cpp (SystemTools.hxx:71)
==27293==    by 0x400F2C5: call_init.part.0 (dl-init.c:85)
==27293==    by 0x400F39E: _dl_init (dl-init.c:52)
==27293==    by 0x4013A99: dl_open_worker (dl-open.c:549)
==27293==    by 0x400F135: _dl_catch_error (dl-error.c:178)
==27293==    by 0x40132D9: _dl_open (dl-open.c:639)
==27293==    by 0x6C88F25: dlopen_doit (dlopen.c:67)
==27293==    by 0x400F135: _dl_catch_error (dl-error.c:178)
==27293==  Address 0x7e0dc90 is 48 bytes inside a block of size 54 alloc'd
==27293==    at 0x4C2B1C7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27293==    by 0xC306A88: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==27293==    by 0xC308494: char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==27293==    by 0xC3085E2: std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==27293==    by 0xF493DE0: itksys::SystemTools::ClassInitialize() (in /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/library/ANTsR/libs/ANTsR.so)
==27293==    by 0xE6D9B56: _GLOBAL__sub_I_antsImageHeaderInfo.cpp (SystemTools.hxx:71)
==27293==    by 0x400F2C5: call_init.part.0 (dl-init.c:85)
==27293==    by 0x400F39E: _dl_init (dl-init.c:52)
==27293==    by 0x4013A99: dl_open_worker (dl-open.c:549)
==27293==    by 0x400F135: _dl_catch_error (dl-error.c:178)
==27293==    by 0x40132D9: _dl_open (dl-open.c:639)
==27293==    by 0x6C88F25: dlopen_doit (dlopen.c:67)
==27293==
> fi<-antsImageRead( getANTsRData("r16"))
> mi<-antsImageRead( getANTsRData("r64"))
> mival<-invariantImageSimilarity( fi, mi, c(0,10,20) )
terminate called after throwing an instance of 'Rcpp::not_compatible'
  what():  expecting a single value
@stnava
Copy link
Member

stnava commented Oct 26, 2016

did you install this recently?

anyway, i cant reproduce this error on either osx or centos.

maybe latest Rcpp + antsr would help. no immediate thoughts.

brian

On Wed, Oct 26, 2016 at 5:45 PM, Chris Hammill [email protected]
wrote:

Hi I've run into a segfault with invariantImageSimilarity. Any thoughts
and suggestions would be greatly appreciated.

ANTsR and ITKR were install via devtools::install_github with no
customizations,. The system is ubuntu 12.04, system gcc is 4.6.3

GDB backtrace:

library(ANTsR)
fi<-antsImageRead( getANTsRData("r16"))
mi<-antsImageRead( getANTsRData("r64"))
mival<-invariantImageSimilarity( fi, mi, c(0,10,20) )
terminate called after throwing an instance of 'Rcpp::not_compatible'
what(): expecting a single value

Program received signal SIGABRT, Aborted.
0x00007ffff71c4035 in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb)
(gdb) bt
#0 0x00007ffff71c4035 in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007ffff71c779b in __GI_abort () at abort.c:91
#2 0x00007ffff37d969d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007ffff37d7846 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff37d7873 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007ffff37d796e in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007fffefcca16f in Rcpp::internal::primitive_as (x=) at /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/library/Rcpp/include/Rcpp/as.h:32
#7 0x00007ffff056b84a in as (x=) at /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/library/Rcpp/include/Rcpp/as.h:41
#8 as (x=) at /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/library/Rcpp/include/Rcpp/as.h:144
#9 invariantSimilarityHelper<2u, itk::AffineTransform<double, 2u> > (image1=..., image2=..., r_thetas=0x1ec6780, r_thetas2=0x1ec1e40, r_thetas3=0x1ec1f78, r_lsits=, r_WM=0x271b018, r_scale=0x27238b8, r_doreflection=0x2723888, r_txfn=0x2740788)
at invariantImageSimilarity.cpp:147
#10 0x00007ffff0532bd8 in invariantImageSimilarity (r_in_image1=, r_in_image2=, thetas=0x1ec6780, thetas2=0x1ec1e40, thetas3=0x1ec1f78, localSearchIterations=0x2af23c8, whichMetric=0x271b018, r_scale=0x27238b8, r_doref=0x2723888,
txfn=0x2740788, whichTransform=0x2723588) at invariantImageSimilarity.cpp:572
#11 0x00007ffff784704b in R_doDotCall () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#12 0x00007ffff7855136 in do_dotcall () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#13 0x00007ffff7890610 in Rf_eval () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#14 0x00007ffff7894bd7 in do_set () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#15 0x00007ffff78903fa in Rf_eval () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#16 0x00007ffff7893bf7 in do_begin () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#17 0x00007ffff78903fa in Rf_eval () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#18 0x00007ffff7892bc8 in do_if () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#19 0x00007ffff78903fa in Rf_eval () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#20 0x00007ffff7893bf7 in do_begin () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#21 0x00007ffff78903fa in Rf_eval () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#22 0x00007ffff78916de in Rf_applyClosure () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#23 0x00007ffff7890727 in Rf_eval () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#24 0x00007ffff7894bd7 in do_set () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#25 0x00007ffff78903fa in Rf_eval () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#26 0x00007ffff78d038f in Rf_ReplIteration () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#27 0x00007ffff78d0554 in R_ReplConsole () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#28 0x00007ffff78d1ebb in run_Rmainloop () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#29 0x00007ffff78d1ed0 in Rf_mainloop () from /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/lib/libR.so
#30 0x0000000000400846 in main ()
#31 0x00007ffff71af7ed in __libc_start_main (main=0x400814

, argc=1, ubp_av=0x7fffffffd418, init=, fini=, rtld_fini=, stack_end=0x7fffffffd408) at libc-start.c:226
#32 0x0000000000400759 in _start ()

valgrind

library(ANTsR)
==27293== Invalid read of size 8
==27293== at 0x5750DBD: _wordcopy_fwd_dest_aligned (wordcopy.c:205)
==27293== by 0x574A9DB: __GI_memmove (memmove.c:76)
==27293== by 0x5705672: realpath@@GLIBC_2.3 (canonicalize.c:192)
==27293== by 0xF493C02: itksys::SystemTools::ClassInitialize() (in /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/library/ANTsR/libs/ANTsR.so)
==27293== by 0xE6D9B56: _GLOBAL__sub_I_antsImageHeaderInfo.cpp (SystemTools.hxx:71)
==27293== by 0x400F2C5: call_init.part.0 (dl-init.c:85)
==27293== by 0x400F39E: _dl_init (dl-init.c:52)
==27293== by 0x4013A99: dl_open_worker (dl-open.c:549)
==27293== by 0x400F135: _dl_catch_error (dl-error.c:178)
==27293== by 0x40132D9: _dl_open (dl-open.c:639)
==27293== by 0x6C88F25: dlopen_doit (dlopen.c:67)
==27293== by 0x400F135: _dl_catch_error (dl-error.c:178)
==27293== Address 0x7e0cb50 is 96 bytes inside a block of size 99 alloc'd
==27293== at 0x4C2B1C7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27293== by 0xC306A88: std::string::Rep::S_create(unsigned long, unsigned long, std::allocator const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==27293== by 0xC308494: char* std::string::S_construct<char const*>(char const, char const
, std::allocator const&, std::forward_iterator_tag) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==27293== by 0xC3085E2: std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const
, std::allocator const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==27293== by 0xF493BDD: itksys::SystemTools::ClassInitialize() (in /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/library/ANTsR/libs/ANTsR.so)
==27293== by 0xE6D9B56: _GLOBAL__sub_I_antsImageHeaderInfo.cpp (SystemTools.hxx:71)
==27293== by 0x400F2C5: call_init.part.0 (dl-init.c:85)
==27293== by 0x400F39E: _dl_init (dl-init.c:52)
==27293== by 0x4013A99: dl_open_worker (dl-open.c:549)
==27293== by 0x400F135: _dl_catch_error (dl-error.c:178)
==27293== by 0x40132D9: _dl_open (dl-open.c:639)
==27293== by 0x6C88F25: dlopen_doit (dlopen.c:67)
==27293==
==27293== Invalid read of size 8
==27293== at 0x5750DBD: _wordcopy_fwd_dest_aligned (wordcopy.c:205)
==27293== by 0x574A9DB: __GI_memmove (memmove.c:76)
==27293== by 0x5705672: realpath@@GLIBC_2.3 (canonicalize.c:192)
==27293== by 0xF493E02: itksys::SystemTools::ClassInitialize() (in /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/library/ANTsR/libs/ANTsR.so)
==27293== by 0xE6D9B56: _GLOBAL__sub_I_antsImageHeaderInfo.cpp (SystemTools.hxx:71)
==27293== by 0x400F2C5: call_init.part.0 (dl-init.c:85)
==27293== by 0x400F39E: _dl_init (dl-init.c:52)
==27293== by 0x4013A99: dl_open_worker (dl-open.c:549)
==27293== by 0x400F135: _dl_catch_error (dl-error.c:178)
==27293== by 0x40132D9: _dl_open (dl-open.c:639)
==27293== by 0x6C88F25: dlopen_doit (dlopen.c:67)
==27293== by 0x400F135: dl_catch_error (dl-error.c:178)
==27293== Address 0x7e0ceb8 is 88 bytes inside a block of size 93 alloc'd
==27293== at 0x4C2B1C7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27293== by 0xC306A88: std::string::Rep::S_create(unsigned long, unsigned long, std::allocator const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==27293== by 0xC308494: char
std::string::S_construct<char const*>(char const, char const
, std::allocator const&, std::forward_iterator_tag) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==27293== by 0xC3085E2: std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const
, std::allocator const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==27293== by 0xF493DE0: itksys::SystemTools::ClassInitialize() (in /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/library/ANTsR/libs/ANTsR.so)
==27293== by 0xE6D9B56: _GLOBAL__sub_I_antsImageHeaderInfo.cpp (SystemTools.hxx:71)
==27293== by 0x400F2C5: call_init.part.0 (dl-init.c:85)
==27293== by 0x400F39E: _dl_init (dl-init.c:52)
==27293== by 0x4013A99: dl_open_worker (dl-open.c:549)
==27293== by 0x400F135: _dl_catch_error (dl-error.c:178)
==27293== by 0x40132D9: _dl_open (dl-open.c:639)
==27293== by 0x6C88F25: dlopen_doit (dlopen.c:67)
==27293==
==27293== Invalid read of size 8
==27293== at 0x5750D67: _wordcopy_fwd_dest_aligned (wordcopy.c:184)
==27293== by 0x574A9DB: __GI_memmove (memmove.c:76)
==27293== by 0x5705672: realpath@@GLIBC_2.3 (canonicalize.c:192)
==27293== by 0xF493E02: itksys::SystemTools::ClassInitialize() (in /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/library/ANTsR/libs/ANTsR.so)
==27293== by 0xE6D9B56: _GLOBAL__sub_I_antsImageHeaderInfo.cpp (SystemTools.hxx:71)
==27293== by 0x400F2C5: call_init.part.0 (dl-init.c:85)
==27293== by 0x400F39E: _dl_init (dl-init.c:52)
==27293== by 0x4013A99: dl_open_worker (dl-open.c:549)
==27293== by 0x400F135: _dl_catch_error (dl-error.c:178)
==27293== by 0x40132D9: _dl_open (dl-open.c:639)
==27293== by 0x6C88F25: dlopen_doit (dlopen.c:67)
==27293== by 0x400F135: _dl_catch_error (dl-error.c:178)
==27293== Address 0x7e0dc90 is 48 bytes inside a block of size 54 alloc'd
==27293== at 0x4C2B1C7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27293== by 0xC306A88: std::string::Rep::S_create(unsigned long, unsigned long, std::allocator const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==27293== by 0xC308494: char
std::string::S_construct<char const*>(char const, char const
, std::allocator const&, std::forward_iterator_tag) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==27293== by 0xC3085E2: std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const*, std::allocator const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==27293== by 0xF493DE0: itksys::SystemTools::ClassInitialize() (in /axiom2/projects/software/arch/R-versions/R-3.3.1/lib/R/library/ANTsR/libs/ANTsR.so)
==27293== by 0xE6D9B56: _GLOBAL__sub_I_antsImageHeaderInfo.cpp (SystemTools.hxx:71)
==27293== by 0x400F2C5: call_init.part.0 (dl-init.c:85)
==27293== by 0x400F39E: _dl_init (dl-init.c:52)
==27293== by 0x4013A99: dl_open_worker (dl-open.c:549)
==27293== by 0x400F135: _dl_catch_error (dl-error.c:178)
==27293== by 0x40132D9: _dl_open (dl-open.c:639)
==27293== by 0x6C88F25: dlopen_doit (dlopen.c:67)
==27293==
fi<-antsImageRead( getANTsRData("r16"))
mi<-antsImageRead( getANTsRData("r64"))
mival<-invariantImageSimilarity( fi, mi, c(0,10,20) )
terminate called after throwing an instance of 'Rcpp::not_compatible'
what(): expecting a single value


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#119, or mute the thread
https://github.com/notifications/unsubscribe-auth/AATyfss7WVvCWGsKn7OLKuta1sL6Wf8Rks5q38oJgaJpZM4KhtR1
.

@cfhammill
Copy link
Contributor Author

Hmm, I rebuild Rcpp and ANTsR, to no avail, both were already at the latest version anyway.

I'm getting the following message from devtools::install_github("stnava/ANTsR")

Warning message:
GitHub repo contains submodules, may not function as expected! 

But I suspect that message is harmless.

@stnava
Copy link
Member

stnava commented Oct 27, 2016

probably harmless.

knowing the location of the segfault would be helpful

std::cout in the invariant...cpp file can help there.

brian

On Thu, Oct 27, 2016 at 4:26 PM, Chris Hammill [email protected]
wrote:

Hmm, I rebuild Rcpp and ANTsR, to no avail, both were already at the
latest version anyway.

I'm getting the following message from devtools::install_github("
stnava/ANTsR")

Warning message:
GitHub repo contains submodules, may not function as expected!

But I suspect that message is harmless.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#119 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AATyfoPXdKfQmKxkXNInxjVF7Z3ii8Qqks5q4Qj-gaJpZM4KhtR1
.

@cfhammill
Copy link
Contributor Author

I replicated the build on ubuntu 16.04 and ran into the same issue. I won't be able to debug the c++ code in the near term, but will try to have a look when I get a chance.

@stnava stnava closed this as completed May 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants