Unable to read Landsat Tiff file. Problem with Tags reading ?
Mantis Issue 392, reported by cmoisy, assigned to cvalladeau, created: 2011-07-28
ImageFileReader is unable to read USGS Landsat (5 TM) Geotiff file. I have got a malloc error while launching the UpdateOutputInformation() method on the reader
The data format is Byte (unsigned char). I have also used SimpleViewer by modifying the PixelType
The file saved in simple binary format (envi IMG) is readable.
result of command (same in gdb) : *** glibc detected *** ./SimpleViewer: malloc(): memory corruption: 0x0000000001f36480 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x79d7a)[0x7effc0cf5d7a] /lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x6e)[0x7effc0cf831e] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_Znwm+0x1d)[0x7effc12dfe0d] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSs4_Rep9_S_createEmmRKSaIcE+0x5d)[0x7effc12c2e6d] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSs4_Rep8_M_cloneERKSaIcEm+0x2b)[0x7effc12c3bfb] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSs7reserveEm+0x30)[0x7effc12c3ce0] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE8overflowEi+0xac)[0x7effc12bcd9c] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt15basic_streambufIcSt11char_traitsIcEE6xsputnEPKcl+0x35)[0x7effc12c13b5] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intImEES3_S3_RSt8ios_basecT_+0x15f)[0x7effc12ac0ef] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE6do_putES3_RSt8ios_basecm+0x16)[0x7effc12ac356] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSo9_M_insertImEERSoT_+0xc6)[0x7effc12b7f86] /usr/local/lib/otb/libotbossim.so.18162.1(_ZN11ossimString8toStringEj+0x42)[0x7effc33c041c] /usr/local/lib/otb/libotbossim.so.18162.1(_ZN12ossimGeoTiff12parsePcsCodeEv+0x27)[0x7effc364b887] /usr/local/lib/otb/libotbossim.so.18162.1(_ZN12ossimGeoTiff8readTagsEP4tiffjb+0x3d6)[0x7effc3649006] /usr/local/lib/otb/libotbossim.so.18162.1(_ZNK26ossimTiffProjectionFactory16createProjectionEP17ossimImageHandler+0xc0)[0x7effc370ac60] /usr/local/lib/otb/libotbossim.so.18162.1(_ZNK30ossimProjectionFactoryRegistry16createProjectionEP17ossimImageHandler+0x5b)[0x7effc36d3135] /usr/local/lib/otb/libotbossim.so.18162.1(_ZNK25ossimImageGeometryFactory16createProjectionEP17ossimImageHandler+0x2f)[0x7effc38ac6c5] /usr/local/lib/otb/libotbossim.so.18162.1(_ZNK25ossimImageGeometryFactory14extendGeometryEP17ossimImageHandler+0x96)[0x7effc38ac40c] /usr/local/lib/otb/libotbossim.so.18162.1(_ZNK26ossimImageGeometryRegistry14extendGeometryEP17ossimImageHandler+0x50)[0x7effc398840e] /usr/local/lib/otb/libotbossim.so.18162.1(_ZN17ossimImageHandler16getImageGeometryEv+0xdb)[0x7effc3918115] /usr/local/lib/otb/libOTBOssimAdapters.so.3.10(_ZN3otb12ReadGeometryERKSs+0x162)[0x7effc626dcd2] ./SimpleViewer(_ZN3otb15ImageFileReaderINS_5ImageIhLj2EEEE25GenerateOutputInformationEv+0xc07)[0x50cf6d] /usr/local/lib/otb/libITKCommon.so.3.20(_ZN3itk13ProcessObject23UpdateOutputInformationEv+0x1ee)[0x7effc5edc2ae] ./SimpleViewer(_ZN3itk9ImageBaseILj2EE23UpdateOutputInformationEv+0x73)[0x4c84e1] ./SimpleViewer(_ZN3otb19StandardImageViewerINS_5ImageIhLj2EEENS_10VectorDataIdLj2EdEENS_19PackedWidgetManagerEE6UpdateEv+0x166)[0x4c48d8] ./SimpleViewer(main+0x117)[0x4bb57b] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xff)[0x7effc0c9aeff] ./SimpleViewer[0x4bb3a9]
1311846029 - julienmI can read the file in monteverdi without problems. Can you check this ?
If you can read it in monteverdi, then please also attach the code which reproduce the problem.
1311848501 - chmoisyMonteverdi crashes with the same error. If you can read it, maybe I have a problem of library. I have GDAL 1.8.0 and OTB 3.10
1311849214 - julienmI'm on linux too with gdal1.8, and OTB trunk.
Are you sure your build is clean and there is no shared lib conflicts on your system ?
1311854016 - chmoisyI have installed OTB 3.10 yesterday from the source (new directories for source and binary files)
ldd SimpleViewer ... libotbossimplugins.so.18162.1 => /usr/local/lib/otb/libotbossimplugins.so.18162.1 (0x00007f9d6fd0b000) libotbossim.so.18162.1 => /usr/local/lib/otb/libotbossim.so.18162.1 (0x00007f9d6eaa6000) libgdal.so.1 => /usr/local/lib/libgdal.so.1 (0x00007f9d6d872000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f9d6ceb0000) libgcc_s.so.1 =>