[Dcmlib] seg fault in gdcm

Mathieu Malaterre mathieu.malaterre at kitware.com
Mon Jul 19 18:06:19 CEST 2004


JP,

	A force de faire des string::erase on atteinds la chaine vide. Est-ce 
que c'est le comportement voulu ?

Mathieu

gdbrun  /home/malaterre/Creatis/gdcmbin/bin/gdcmTests PrintAllDocument
[...]
0008|1110 lg :    x(ffff) -1       Off.:     x(216) 534     [SQ] 
                                   [Referenced Study Sequence]
    |  --- SQItem number 0
    | fffe|e000 lg :    x(ffff) -1       Off.:     x(21e) 542     [UL] 
                                                              [Item]
    | 0008|0000 lg :       x(4) 4        Off.:     x(226) 550     [UL] 
                                                      [Group Length] 
[16] x(10)
    | 0008|1150 lg :       x(0) 0        Off.:     x(232) 562     [UI] 
                                          [Referenced SOP Class UID]
Program received signal SIGABRT, Aborted.
[Switching to Thread -1085370240 (LWP 934)]
0x00743c32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
(gdb) bt
#0  0x00743c32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x032fc989 in raise () from /lib/tls/libc.so.6
#2  0x032fe342 in abort () from /lib/tls/libc.so.6
#3  0x011f3467 in __cxa_call_unexpected () from /usr/lib/libstdc++.so.5
#4  0x011f34a4 in std::terminate() () from /usr/lib/libstdc++.so.5
#5  0x011f3616 in __cxa_throw () from /usr/lib/libstdc++.so.5
#6  0x011a9b20 in std::__throw_out_of_range(char const*) () from 
/usr/lib/libstdc++.so.5
#7  0x011e20e5 in std::string::_M_check(unsigned) const () from 
/usr/lib/libstdc++.so.5
#8  0x011e317d in std::string::erase(unsigned, unsigned) () from 
/usr/lib/libstdc++.so.5
#9  0x004917a2 in gdcmValEntry::Print(std::ostream&) (this=0x9f958d0, 
os=@0x8066688) at /home/malaterre/Creatis/gdcm/src/gdcmValEntry.cxx:114
#10 0x0048d9d0 in gdcmSQItem::Print(std::ostream&) (this=0x9f95930, 
os=@0x8066688) at /home/malaterre/Creatis/gdcm/src/gdcmSQItem.cxx:77
#11 0x0048c9e5 in gdcmSeqEntry::Print(std::ostream&) (this=0x9f959f0, 
os=@0x8066688) at /home/malaterre/Creatis/gdcm/src/gdcmSeqEntry.cxx:69
#12 0x0048f527 in gdcmElementSet::Print(std::ostream&) (this=0x9f7a838, 
os=@0x8066688) at /home/malaterre/Creatis/gdcm/src/gdcmElementSet.cxx:70
#13 0x08054657 in PrintAllDocument(int, char**) () at 
/home/malaterre/Creatis/gdcm/Test/PrintAllDocument.cxx:36
#14 0x08051af4 in main (ac=2, av=0xbff739f4) at 
/home/malaterre/Creatis/gdcmbin/Test/gdcmTests.cxx:172
(gdb) up
#1  0x032fc989 in raise () from /lib/tls/libc.so.6
(gdb) up
#2  0x032fe342 in abort () from /lib/tls/libc.so.6
(gdb)
#3  0x011f3467 in __cxa_call_unexpected () from /usr/lib/libstdc++.so.5
(gdb)
#4  0x011f34a4 in std::terminate() () from /usr/lib/libstdc++.so.5
(gdb)
#5  0x011f3616 in __cxa_throw () from /usr/lib/libstdc++.so.5
(gdb)
#6  0x011a9b20 in std::__throw_out_of_range(char const*) () from 
/usr/lib/libstdc++.so.5
(gdb)
#7  0x011e20e5 in std::string::_M_check(unsigned) const () from 
/usr/lib/libstdc++.so.5
(gdb)
#8  0x011e317d in std::string::erase(unsigned, unsigned) () from 
/usr/lib/libstdc++.so.5
(gdb)
#9  0x004917a2 in gdcmValEntry::Print(std::ostream&) (this=0x9f958d0, 
os=@0x8066688) at /home/malaterre/Creatis/gdcm/src/gdcmValEntry.cxx:114
114                    v.erase(v.length()-1, 1);
(gdb) p v
$1 = {static npos = 4294967295, _M_dataplus = {<allocator<char>> = {<No 
data fields>}, _M_p = 0x9f98f0c ""}, static _S_empty_rep_storage = {0, 
0, 148, 0}}





More information about the Dcmlib mailing list