On Wed, 9 Apr 2003, Jiri Masik wrote: > Dmitri Litvintsev <litvinse@fnal.gov> writes: > > > Hi ROOTers, > > > > well, this is typical picture: > > > > root [27] TH1 h100 = (*h5)-(*h6); > > root [28] h100.Draw(); > > > > *** Break *** segmentation violation > > Root > > > > > *** Break *** segmentation violation > > Root > > > > > *** Break *** segmentation violation > > Root > > > > > I forgot to type 'F' (TH1 istead of TH1F) > > How can I recover from '*** Break *** segmentation violation' ? > > > > all I can manage is to ^Z, kill root, start all over again. Is it the only > > way? I understand that I need to type right, but the punishment seems to > > be to severe especially in the case when in order to get to that point you > > need to run macros for half and hour. i would never let a 'macro' run for half a hour, but rather compile the stuff (program or aclic). but since i started root quite long ago, when this behaviour was 'normal', i just am used to do ctr-Z. to make life easier i have a short script: # ----- ps > ./killroot.1 awk '/root/' ./killroot.1 > ./killroot.2 awk '{print "kill -9 ", $1}' ./killroot.2 > ./killroot.3 chmod 700 ./killroot.3 ./killroot.3 rm ./killroot.1 rm ./killroot.2 rm ./killroot.3 # ----- which i am used to, but of cours you can also do: # killall root good night, martin > > > > Hi Dmitri, > > from the general point of view Root and cint don't protect against > memory management errors. > > Some internal Root data are overwritten here. The interpreter is only > checking whether a statement is valid or not. In this particular case > the statement is valid so there is no reason to stop. The memory is > overwritten and the problem lies in the TH1 classes - (maybe > instantiation of TH1 objects could be forbidden?) > > On the other hand the command-line validity checks in the interpreter > could be also improved. Consider a similar situation: assignment > operations between TH1F and TH1D are not implemented > > TH1D *h1 = new TH1D("h1","",10,0.,1.); > TH1F h = (*h1); // > > but they can be freely performed in the interpreter. > Please correct me if I'm wrong. > cheers > > Jiri > > > >
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET