Lots of Errors

[code]void
infinite_loop_of_segmentation_violations()
{
string foo;

    sprintf(foo.c_str(), "foo");

}
[/code]

I know I have to use

[code]void
foo()
{
Char_t foo[0];

    sprintf(foo, "foo");

}
[/code]

but I was thinking that countless error messages are bug?

Hello Dimitar,

I can not reproduce this problem. It is probably due to diffierence of environment. So far, I’ve tried with MacOS-X, Windows-XP VC++7.0
and Windows-XP Cygwin5.1.

What kind of errors are you seeing?

Masa Goto

Hi,

The error messages are:

Root >
*** Break *** segmentation violation
Generating stack trace…
0x42029188 in from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/bin/root.exe
0x4130652e in _IO_funlockfile + 0x1e from /lib/i686/libpthread.so.0
0x413046d9 in from /lib/i686/libpthread.so.0
0x41304740 in siglongjmp + 0x20 from /lib/i686/libpthread.so.0
0x4017bb93 in Throw(int) + 0x2b from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/lib/libCore.so
0x4028f7c8 in TUnixSystem::DispatchSignals(ESignals) + 0x144 from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/lib/libCore.so
0x4028e44f in from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/lib/libCore.so
0x40293821 in from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/lib/libCore.so
0x41305f05 in from /lib/i686/libpthread.so.0
0x42029188 in from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/bin/root.exe
0x4130652e in _IO_funlockfile + 0x1e from /lib/i686/libpthread.so.0
0x413046d9 in from /lib/i686/libpthread.so.0
0x41304740 in siglongjmp + 0x20 from /lib/i686/libpthread.so.0
0x4017bb93 in Throw(int) + 0x2b from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/lib/libCore.so
0x4028f7c8 in TUnixSystem::DispatchSignals(ESignals) + 0x144 from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/lib/libCore.so
0x4028e44f in from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/lib/libCore.so
0x40293821 in from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/lib/libCore.so
0x41305f05 in from /lib/i686/libpthread.so.0
0x42029188 in from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/bin/root.exe
0x4130652e in _IO_funlockfile + 0x1e from /lib/i686/libpthread.so.0
0x413046d9 in from /lib/i686/libpthread.so.0
0x41304740 in siglongjmp + 0x20 from /lib/i686/libpthread.so.0
0x4017bb93 in Throw(int) + 0x2b from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/lib/libCore.so
0x4028f7c8 in TUnixSystem::DispatchSignals(ESignals) + 0x144 from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/lib/libCore.so
0x4028e44f in from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/lib/libCore.so
0x40293821 in from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/lib/libCore.so
0x41305f05 in from /lib/i686/libpthread.so.0
0x42029188 in from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/bin/root.exe
0x4130652e in _IO_funlockfile + 0x1e from /lib/i686/libpthread.so.0
0x413046d9 in from /lib/i686/libpthread.so.0
0x41304740 in siglongjmp + 0x20 from /lib/i686/libpthread.so.0
0x4017bb93 in Throw(int) + 0x2b from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/lib/libCore.so
0x4028f7c8 in TUnixSystem::DispatchSignals(ESignals) + 0x144 from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/lib/libCore.so
0x4028e44f in from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/lib/libCore.so
0x40293821 in from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/lib/libCore.so
0x41305f05 in from /lib/i686/libpthread.so.0
0x42029188 in from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/bin/root.exe
0x4130652e in _IO_funlockfile + 0x1e from /lib/i686/libpthread.so.0
0x413046d9 in from /lib/i686/libpthread.so.0
0x41304740 in siglongjmp + 0x20 from /lib/i686/libpthread.so.0
0x4017bb93 in Throw(int) + 0x2b from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/lib/libCore.so
0x4028f7c8 in TUnixSystem::DispatchSignals(ESignals) + 0x144 from /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root/lib/libCore.so

and this is repeating forever:)

As you see I don’t have local instalation of ROOT and I’m using:
setenv ROOTSYS /afs/cern.ch/sw/root/v4.01.02/rh73_gcc296/root
setenv PATH ${ROOTSYS}/bin:${PATH}
setenv LD_LIBRARY_PATH ${ROOTSYS}/lib:${LD_LIBRARY_PATH}

Pleaase see:
root.cern.ch/root/roottalk/RoottalkRules.html

Rene

Hello,

It looks like the errors are comming from ROOT. I guess what Rene
tries to say is that if this is a ROOT error, you should post it in
ROOT support forum. Probably, it is a bit difficult for an innocent
user to tell whether the errors come from Cint or ROOT. Anyway, please
consult Rene, Fons or Philippe for solving this problem.

Thank you
Masa Goto