[Dcmlib] SIEMENS_GBS_III-16-ACR_NEMA_1.acr sur MacOSX

Mathieu Malaterre mathieu.malaterre at kitware.com
Wed Nov 3 23:34:34 CET 2004


C'est marrant 132096 = 256*516
Mais PrintHeader me dis que Rows=256 et Col=256

...
Mathieu

Mathieu Malaterre wrote:
> Salut,
> 
>     Bonne nouvelle si j'enleve l'image SIEMENS_GBS_III-16-ACR_NEMA_1.acr 
> (= je la blacklist). Les tests passent sans seg fault sur Mac.
>     On dirait que l'on ne fais pas quelque chose de bien beau. valgrind 
> se plaint aussi de chose bizarre (*). Tout ce que l'on fais c'est de 
> lire un morceau de fichier. J'ai affiche' la taille du morceau a lire:
> 
> PixelDataLength:132096
> 
> Pareil sur MacOSX. Est-ce que quelqu'un peut me confirmer que la taille 
> est valide ?
> 
> Merci
> Mathieu
> Ps: j'ai changer l'interface de TestReadWriteReadCompare  on peux 
> l'executer fichier par fichier maintenant:
> 
> $ gdcmTests TestReadWriteReadCompare SIEMENS_GBS_III-16-ACR_NEMA_1.acr 
> output.dcm
> 
> 
> (*)
> $ purify /home/malaterre/Creatis/gdcmbin/bin/gdcmTests 
> TestReadWriteReadCompare 
> /home/malaterre/Creatis/gdcmData/SIEMENS_GBS_III-16-ACR_NEMA_1.acr foo.dcm
> ==20362== Memcheck, a memory error detector for x86-linux.
> ==20362== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
> ==20362== Using valgrind-2.3.0.CVS, a program supervision framework for 
> x86-linux.
> ==20362== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
> ==20362== For more details, rerun with: -v
> ==20362==
>    Testing: 
> /home/malaterre/Creatis/gdcmData/SIEMENS_GBS_III-16-ACR_NEMA_1.acr
> PixelDataLength:132096
> ==20362== Invalid write of size 1
> ==20362==    at 0x3065E3C: std::basic_streambuf<char, 
> std::char_traits<char> >::xsgetn(char*, int) (in 
> /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x30294B8: std::basic_filebuf<char, 
> std::char_traits<char> >::xsgetn(char*, int) (in 
> /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x30336A8: std::istream::read(char*, int) (in 
> /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x1BD800C9: 
> gdcm::PixelConvert::ReadAndDecompressPixelData(std::basic_ifstream<char, 
> std::char_traits<char> >*) (gdcmPixelConvert.cxx:612)
> ==20362==    by 0x1BD71DE3: gdcm::File::GetDecompressed() 
> (gdcmFile.cxx:509)
> ==20362==    by 0x1BD712AF: gdcm::File::GetImageData() (gdcmFile.cxx:303)
> ==20362==    by 0x80544AE: CompareInternal(std::string const&, 
> std::string const&) (TestReadWriteReadCompare.cxx:27)
> ==20362==    by 0x8054984: TestReadWriteReadCompare(int, char**) 
> (TestReadWriteReadCompare.cxx:116)
> ==20362==    by 0x805149A: main (gdcmTests.cxx:193)
> ==20362==  Address 0x1CE6ADC8 is 0 bytes after a block of size 131072 
> alloc'd
> ==20362==    at 0x1B9040FD: operator new[](unsigned) 
> (vg_replace_malloc.c:138)
> ==20362==    by 0x1BD7E967: gdcm::PixelConvert::AllocateDecompressed() 
> (gdcmPixelConvert.cxx:96)
> ==20362==    by 0x1BD7FF97: 
> gdcm::PixelConvert::ReadAndDecompressPixelData(std::basic_ifstream<char, 
> std::char_traits<char> >*) (gdcmPixelConvert.cxx:585)
> ==20362==    by 0x1BD71DE3: gdcm::File::GetDecompressed() 
> (gdcmFile.cxx:509)
> ==20362==    by 0x1BD712AF: gdcm::File::GetImageData() (gdcmFile.cxx:303)
> ==20362==    by 0x80544AE: CompareInternal(std::string const&, 
> std::string const&) (TestReadWriteReadCompare.cxx:27)
> ==20362==    by 0x8054984: TestReadWriteReadCompare(int, char**) 
> (TestReadWriteReadCompare.cxx:116)
> ==20362==    by 0x805149A: main (gdcmTests.cxx:193)
> ==20362==
> ==20362== Invalid write of size 1
> ==20362==    at 0x1B9039A2: memcpy (mac_replace_strmem.c:285)
> ==20362==    by 0x3065DFA: std::basic_streambuf<char, 
> std::char_traits<char> >::xsgetn(char*, int) (in 
> /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x30294B8: std::basic_filebuf<char, 
> std::char_traits<char> >::xsgetn(char*, int) (in 
> /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x30336A8: std::istream::read(char*, int) (in 
> /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x1BD800C9: 
> gdcm::PixelConvert::ReadAndDecompressPixelData(std::basic_ifstream<char, 
> std::char_traits<char> >*) (gdcmPixelConvert.cxx:612)
> ==20362==    by 0x1BD71DE3: gdcm::File::GetDecompressed() 
> (gdcmFile.cxx:509)
> ==20362==    by 0x1BD712AF: gdcm::File::GetImageData() (gdcmFile.cxx:303)
> ==20362==    by 0x80544AE: CompareInternal(std::string const&, 
> std::string const&) (TestReadWriteReadCompare.cxx:27)
> ==20362==    by 0x8054984: TestReadWriteReadCompare(int, char**) 
> (TestReadWriteReadCompare.cxx:116)
> ==20362==    by 0x805149A: main (gdcmTests.cxx:193)
> ==20362==  Address 0x1CE6B1C7 is not stack'd, malloc'd or (recently) free'd
> ==20362==
> ==20362== Invalid write of size 1
> ==20362==    at 0x1B9039A8: memcpy (mac_replace_strmem.c:286)
> ==20362==    by 0x3065DFA: std::basic_streambuf<char, 
> std::char_traits<char> >::xsgetn(char*, int) (in 
> /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x30294B8: std::basic_filebuf<char, 
> std::char_traits<char> >::xsgetn(char*, int) (in 
> /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x30336A8: std::istream::read(char*, int) (in 
> /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x1BD800C9: 
> gdcm::PixelConvert::ReadAndDecompressPixelData(std::basic_ifstream<char, 
> std::char_traits<char> >*) (gdcmPixelConvert.cxx:612)
> ==20362==    by 0x1BD71DE3: gdcm::File::GetDecompressed() 
> (gdcmFile.cxx:509)
> ==20362==    by 0x1BD712AF: gdcm::File::GetImageData() (gdcmFile.cxx:303)
> ==20362==    by 0x80544AE: CompareInternal(std::string const&, 
> std::string const&) (TestReadWriteReadCompare.cxx:27)
> ==20362==    by 0x8054984: TestReadWriteReadCompare(int, char**) 
> (TestReadWriteReadCompare.cxx:116)
> ==20362==    by 0x805149A: main (gdcmTests.cxx:193)
> ==20362==  Address 0x1CE6B1C6 is not stack'd, malloc'd or (recently) free'd
> ==20362==
> ==20362== Invalid write of size 1
> ==20362==    at 0x1B9039AE: memcpy (mac_replace_strmem.c:287)
> ==20362==    by 0x3065DFA: std::basic_streambuf<char, 
> std::char_traits<char> >::xsgetn(char*, int) (in 
> /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x30294B8: std::basic_filebuf<char, 
> std::char_traits<char> >::xsgetn(char*, int) (in 
> /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x30336A8: std::istream::read(char*, int) (in 
> /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x1BD800C9: 
> gdcm::PixelConvert::ReadAndDecompressPixelData(std::basic_ifstream<char, 
> std::char_traits<char> >*) (gdcmPixelConvert.cxx:612)
> ==20362==    by 0x1BD71DE3: gdcm::File::GetDecompressed() 
> (gdcmFile.cxx:509)
> ==20362==    by 0x1BD712AF: gdcm::File::GetImageData() (gdcmFile.cxx:303)
> ==20362==    by 0x80544AE: CompareInternal(std::string const&, 
> std::string const&) (TestReadWriteReadCompare.cxx:27)
> ==20362==    by 0x8054984: TestReadWriteReadCompare(int, char**) 
> (TestReadWriteReadCompare.cxx:116)
> ==20362==    by 0x805149A: main (gdcmTests.cxx:193)
> ==20362==  Address 0x1CE6B1C5 is not stack'd, malloc'd or (recently) free'd
> ==20362==
> ==20362== Invalid write of size 1
> ==20362==    at 0x1B9039B7: memcpy (mac_replace_strmem.c:288)
> ==20362==    by 0x3065DFA: std::basic_streambuf<char, 
> std::char_traits<char> >::xsgetn(char*, int) (in 
> /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x30294B8: std::basic_filebuf<char, 
> std::char_traits<char> >::xsgetn(char*, int) (in 
> /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x30336A8: std::istream::read(char*, int) (in 
> /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x1BD800C9: 
> gdcm::PixelConvert::ReadAndDecompressPixelData(std::basic_ifstream<char, 
> std::char_traits<char> >*) (gdcmPixelConvert.cxx:612)
> ==20362==    by 0x1BD71DE3: gdcm::File::GetDecompressed() 
> (gdcmFile.cxx:509)
> ==20362==    by 0x1BD712AF: gdcm::File::GetImageData() (gdcmFile.cxx:303)
> ==20362==    by 0x80544AE: CompareInternal(std::string const&, 
> std::string const&) (TestReadWriteReadCompare.cxx:27)
> ==20362==    by 0x8054984: TestReadWriteReadCompare(int, char**) 
> (TestReadWriteReadCompare.cxx:116)
> ==20362==    by 0x805149A: main (gdcmTests.cxx:193)
> ==20362==  Address 0x1CE6B1C4 is not stack'd, malloc'd or (recently) free'd
> ==20362==
> ==20362== Invalid write of size 1
> ==20362==    at 0x1B9039CB: memcpy (mac_replace_strmem.c:292)
> ==20362==    by 0x3065DFA: std::basic_streambuf<char, 
> std::char_traits<char> >::xsgetn(char*, int) (in 
> /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x30294B8: std::basic_filebuf<char, 
> std::char_traits<char> >::xsgetn(char*, int) (in 
> /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x30336A8: std::istream::read(char*, int) (in 
> /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x1BD800C9: 
> gdcm::PixelConvert::ReadAndDecompressPixelData(std::basic_ifstream<char, 
> std::char_traits<char> >*) (gdcmPixelConvert.cxx:612)
> ==20362==    by 0x1BD71DE3: gdcm::File::GetDecompressed() 
> (gdcmFile.cxx:509)
> ==20362==    by 0x1BD712AF: gdcm::File::GetImageData() (gdcmFile.cxx:303)
> ==20362==    by 0x80544AE: CompareInternal(std::string const&, 
> std::string const&) (TestReadWriteReadCompare.cxx:27)
> ==20362==    by 0x8054984: TestReadWriteReadCompare(int, char**) 
> (TestReadWriteReadCompare.cxx:116)
> ==20362==    by 0x805149A: main (gdcmTests.cxx:193)
> ==20362==  Address 0x1CE6ADCB is 3 bytes after a block of size 131072 
> alloc'd
> ==20362==    at 0x1B9040FD: operator new[](unsigned) 
> (vg_replace_malloc.c:138)
> ==20362==    by 0x1BD7E967: gdcm::PixelConvert::AllocateDecompressed() 
> (gdcmPixelConvert.cxx:96)
> ==20362==    by 0x1BD7FF97: 
> gdcm::PixelConvert::ReadAndDecompressPixelData(std::basic_ifstream<char, 
> std::char_traits<char> >*) (gdcmPixelConvert.cxx:585)
> ==20362==    by 0x1BD71DE3: gdcm::File::GetDecompressed() 
> (gdcmFile.cxx:509)
> ==20362==    by 0x1BD712AF: gdcm::File::GetImageData() (gdcmFile.cxx:303)
> ==20362==    by 0x80544AE: CompareInternal(std::string const&, 
> std::string const&) (TestReadWriteReadCompare.cxx:27)
> ==20362==    by 0x8054984: TestReadWriteReadCompare(int, char**) 
> (TestReadWriteReadCompare.cxx:116)
> ==20362==    by 0x805149A: main (gdcmTests.cxx:193)
> 
> valgrind: vg_malloc2.c:151 (mk_plain_bszB): Assertion `bszB != 0' failed.
> ==20362==    at 0xB0029ED6: vgPlain_skin_assert_fail (vg_mylibc.c:1140)
> ==20362==    by 0xB0029ED5: assert_fail (vg_mylibc.c:1136)
> ==20362==    by 0xB0029F13: vgPlain_core_assert_fail (vg_mylibc.c:1147)
> ==20362==    by 0xB00269C0: vgPlain_arena_malloc (vg_malloc2.c:1031)
> ==20362==    by 0xB00271D4: vgPlain_cli_malloc (vg_malloc2.c:1372)
> ==20362==    by 0xB115B94F: vgSkin___builtin_new 
> (mac_malloc_wrappers.c:175)
> 
> sched status:
> 
> Thread 1: status = Runnable, associated_mx = 0x0, associated_cv = 0x0
> ==20362==    at 0x1B903EBF: operator new(unsigned) 
> (vg_replace_malloc.c:132)
> ==20362==    by 0x3064C88: std::__default_alloc_template<true, 
> 0>::allocate(unsigned) (in /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x306A5A7: std::string::_Rep::_S_create(unsigned, 
> std::allocator<char> const&) (in /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x306B2EE: (within /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x3067AC8: std::string::string(char const*, 
> std::allocator<char> const&) (in /usr/lib/libstdc++.so.5.0.5)
> ==20362==    by 0x1BD86DA5: gdcm::Util::Format(char const*, ...) 
> (gdcmUtil.cxx:48)
> ==20362==    by 0x1BD5D37F: gdcm::DictEntry::TranslateToKey(unsigned 
> short, unsigned short) (gdcmDictEntry.cxx:64)
> ==20362==    by 0x1BD65ED5: gdcm::Document::GetDocEntryByNumber(unsigned 
> short, unsigned short) (gdcmDocument.cxx:1182)
> ==20362==    by 0x1BD76AF6: gdcm::Header::HasLUT() (gdcmHeader.cxx:1062)
> ==20362==    by 0x1BD712D0: gdcm::File::GetImageData() (gdcmFile.cxx:310)
> ==20362==    by 0x80544AE: CompareInternal(std::string const&, 
> std::string const&) (TestReadWriteReadCompare.cxx:27)
> ==20362==    by 0x8054984: TestReadWriteReadCompare(int, char**) 
> (TestReadWriteReadCompare.cxx:116)
> ==20362==    by 0x805149A: main (gdcmTests.cxx:193)
> 
> 
> Note: see also the FAQ.txt in the source distribution.
> It contains workarounds to several common problems.
> 
> If that doesn't help, please report this bug to: valgrind.kde.org
> 
> In the bug report, send all the above text, the valgrind
> version, and what Linux distro you are using.  Thanks.
> 
> 
> 
> _______________________________________________
> Dcmlib mailing list
> Dcmlib at creatis.insa-lyon.fr
> http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib
> 






More information about the Dcmlib mailing list