@poughov Yes I am. git blame should point toward me I guess.
The idea is that stringification is done with wanabe-safe C functions. In order to avoid overflows, a portable snprintf is provided. Then the assertion checks that we were able to fully generate the string in the destination static-buffer.
Have you ran the command in gbd or analysed to core dumped? What are the values of pos, of sr_gr_prefix and of idx?
It seems the assertion has been written with the assumption that SR_PREFIX was a char const[N], but it's actually a std::string. We should replace all the sizeof(SR_PREFIX) (and other keys from "ossimSarSensorModelPathsAndKeys.h) with SR_PREFIX.size().
It looks like the incorrect assertion has been there for quite some time. Sorry ^^'
and now it fails somewhere else (line 1156 of the above diff)
(gdb) up#2 0x00007ffff7421412 in __GI___assert_fail (assertion=0x7fffee9ee9e8 "pos >= SR_PREFIX.size()+4 && pos < 1024", file=0x7fffee9edf90 "/home/poughov/cnes/dev/otb/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSentinel1Model.cpp", line=1156, function=0x7fffee9ef040 <ossimplugins::ossimSentinel1Model::readGeoLocationGrid(ossimXmlNode const&)::__PRETTY_FUNCTION__> "void ossimplugins::ossimSentinel1Model::readGeoLocationGrid(const ossimXmlNode&)") at assert.c:101101 in assert.c(gdb) print posNo symbol "pos" in current context.(gdb) up#3 0x00007fffee986828 in ossimplugins::ossimSentinel1Model::readGeoLocationGrid (this=0x5555555b3f90, productRoot=...) at /home/poughov/cnes/dev/otb/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSentinel1Model.cpp:11561156 assert(pos >= SR_PREFIX.size()+4 && pos < 1024);(gdb) print pos$1 = 25(gdb) print SR_PREFIX$2 = "support_data.geom.srd.coords.sr"(gdb) print sr_gr_prefixNo symbol "sr_gr_prefix" in current context.(gdb) SR_PREFIX.size()Undefined command: "SR_PREFIX". Try "help".(gdb) print SR_PREFIX.size()$3 = 31(gdb) print pos$4 = 25(gdb) bt#0 __GI_abort () at abort.c:49#1 0x00007ffff742139a in __assert_fail_base (fmt=0x7ffff75a87d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7fffee9ee9e8 "pos >= SR_PREFIX.size()+4 && pos < 1024", file=file@entry=0x7fffee9edf90 "/home/poughov/cnes/dev/otb/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSentinel1Model.cpp", line=line@entry=1156, function=function@entry=0x7fffee9ef040 <ossimplugins::ossimSentinel1Model::readGeoLocationGrid(ossimXmlNode const&)::__PRETTY_FUNCTION__> "void ossimplugins::ossimSentinel1Model::readGeoLocationGrid(const ossimXmlNode&)") at assert.c:92#2 0x00007ffff7421412 in __GI___assert_fail (assertion=0x7fffee9ee9e8 "pos >= SR_PREFIX.size()+4 && pos < 1024", file=0x7fffee9edf90 "/home/poughov/cnes/dev/otb/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSentinel1Model.cpp", line=1156, function=0x7fffee9ef040 <ossimplugins::ossimSentinel1Model::readGeoLocationGrid(ossimXmlNode const&)::__PRETTY_FUNCTION__> "void ossimplugins::ossimSentinel1Model::readGeoLocationGrid(const ossimXmlNode&)") at assert.c:101#3 0x00007fffee986828 in ossimplugins::ossimSentinel1Model::readGeoLocationGrid (this=0x5555555b3f90, productRoot=...) at /home/poughov/cnes/dev/otb/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSentinel1Model.cpp:1156#4 0x00007fffee981d93 in ossimplugins::ossimSentinel1Model::read (this=0x5555555b3f90, annotationXml=...) at /home/poughov/cnes/dev/otb/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSentinel1Model.cpp:815#5 0x00007fffee97fd3e in ossimplugins::ossimSentinel1Model::readProduct (this=0x5555555b3f90, productXmlFile=...) at /home/poughov/cnes/dev/otb/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSentinel1Model.cpp:629#6 0x00007fffee97d928 in ossimplugins::ossimSentinel1Model::open (this=0x5555555b3f90, file=...) at /home/poughov/cnes/dev/otb/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSentinel1Model.cpp:273#7 0x00007fffee946e03 in ossimplugins::doBuildProjection<ossimplugins::ossimSentinel1Model> (filename=...) at /home/poughov/cnes/dev/otb/Modules/ThirdParty/OssimPlugins/src/ossim/ossimPluginProjectionFactory.cpp:128#8 0x00007fffee944467 in ossimplugins::ossimPluginProjectionFactory::createProjection (this=0x7fffeea53810 <ossimplugins::ossimPluginProjectionFactory::factoryInstance>, file_name=...) at /home/poughov/cnes/dev/otb/Modules/ThirdParty/OssimPlugins/src/ossim/ossimPluginProjectionFactory.cpp:173#9 0x00007ffff25984ef in otb::ReadGeometryFromImage ( filename="/home/poughov/Downloads/S1A_IW_GRDH_1SDV_20181216T110608_20181216T110633_025050_02C38F_BAB0.SAFE/measurement/s1a-iw-grd-vh-20181216t110608-20181216t110633-025050-02c38f-002.tiff", checkRpcTag=true) at /home/poughov/cnes/dev/otb/Modules/Adapters/OSSIMAdapters/src/otbImageKeywordlist.cxx:240#10 0x00007ffff4c46b1d in otb::ImageFileReader<otb::VectorImage<float, 2u>, otb::DefaultConvertPixelTraits<float> >::GenerateOutputInformation (this=0x5555555aa0e0) at /home/poughov/cnes/dev/otb/Modules/IO/ImageIO/include/otbImageFileReader.hxx:429#11 0x00007ffff7ebe68d in itk::ProcessObject::UpdateOutputInformation() () from /home/poughov/build/SuperBuild-depends/install/lib/libITKCommon-4.13.so.1#12 0x00007ffff674263e in otb::Wrapper::InputImageParameter::GetImage<otb::VectorImage<float, 2u> > (this=0x5555555a6d90) at /home/poughov/cnes/dev/otb/Modules/Wrappers/ApplicationEngine/include/otbWrapperInputImageParameter.hxx:59#13 0x00007ffff6cda2a1 in otb::Wrapper::Application::GetParameterImage<otb::VectorImage<float, 2u> > (this=0x5555555a5e20, parameter="in") at /home/poughov/cnes/dev/otb/Modules/Wrappers/ApplicationEngine/include/otbWrapperApplication.h:860#14 0x00007ffff6cd3088 in otb::Wrapper::Application::GetParameterImage (this=0x5555555a5e20, parameter="in") at /home/poughov/cnes/dev/otb/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx:1184#15 0x00007fffecdc6a53 in otb::Wrapper::DynamicConvert::DoUpdateParameters (this=0x5555555a5e20) at /home/poughov/cnes/dev/otb/Modules/Applications/AppImageUtils/app/otbDynamicConvert.cxx:209#16 0x00007ffff6ccd4e5 in otb::Wrapper::Application::UpdateParameters (this=0x5555555a5e20) at /home/poughov/cnes/dev/otb/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx:450#17 0x00007ffff7fd99a1 in otb::Wrapper::CommandLineLauncher::LoadParameters (this=0x5555555a2bc0) at /home/poughov/cnes/dev/otb/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx:475#18 0x00007ffff7fd8443 in otb::Wrapper::CommandLineLauncher::BeforeExecute (this=0x5555555a2bc0) at /home/poughov/cnes/dev/otb/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx:272#19 0x00007ffff7fd7338 in otb::Wrapper::CommandLineLauncher::ExecuteAndWriteOutputNoCatch (this=0x5555555a2bc0) at /home/poughov/cnes/dev/otb/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx:140#20 0x00007ffff7fd7447 in otb::Wrapper::CommandLineLauncher::ExecuteAndWriteOutput (this=0x5555555a2bc0) at /home/poughov/cnes/dev/otb/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx:166#21 0x000055555555d3cc in main (argc=7, argv=0x7fffffffe1c8) at /home/poughov/cnes/dev/otb/Modules/Wrappers/CommandLine/src/otbApplicationLauncherCommandLine.cxx:311(gdb)