Hello rooters. (First the most important) I'm running ROOT 3.02/03 (configured with a.o. option --build=debug and compiled locally) on an x86 with RH 6.1 and gcc version egcs-2.91.66. (Then the actual problem) I recently encountered a problem where when deleting an object, there is no reference to it in gObjectTable. This occurs after running through a number of events, thus after a lot of objects created on and deleted from the stack and the heap. The warning message is along the lines of Warning in <TObjectTable:: Remove>: <object address> not found at <index> I introduced some more debug statements into my TObjectTable, e.g. in TObjectTable::Add(TObject *op) in the case that fTable[slot] != 0. I then found that several times before I got the first Remove warning (the one above) FindElement returned a non empty slot in Add. I therefore started wondering if there is some upper limit for the number of objects that TObjectTable can handle. Looking at the documentation for TMath::Hash(const void *txt, Int_t ntxt), i.e. the one used if no OLD_HASH is defined, it says that ....."random" numbers made as R = Hash(1), Hash(2), ...Hash(N) tested by <R>, <R*R>, <Ri*Ri+1> gives the same result as for libc rand(). I wonder does this statement mean that for N < RAND_MAX, TMath::Hash(const void *txt, Int_t ntxt) will return a unique index? Or in other words is the fact that FindElement in TObjectTable::Add(TObject *op) returns a non-empty slot most probably my fault or TMath::Hash's fault. :) On my system RAND_MAX is defined as 2147483647. Hoping for some enlightening answers. Best wishes from Jens Ivar Jordre -- Jens Ivar Jřrdre e-mail: JensIvar.Jordre@fi.uib.no usually: Dep. of Phys., Allégt. 55, N-5007 BERGEN, NORWAY currently: Bldg 510D, P.O.Box 5000, Upton, NY 11973-5000, USA phone: +1-631-344-4223
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:08 MET