Re: TRandom3-related Seg Fault

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Wed, 13 Apr 2011 07:09:10 +0200


The TRandomX::Rndm() functions are not static functions!!, doing TRandom3::Rndm() is illegal.
You must instantiate an object, ie

     TRandom3 r
      r.Rndm()

Rene

On 13/04/2011 05:31, Richard Ruiz wrote:
> Dear All,
>
> I am running into a problem trying to generate a random number with
> TRandomX::Rndm(), for X = 2,3, which causes a seg fault. See below.
> Any suggestions on what I can/should do?
> Yes, this problem occurs after a fresh boot.
>
> Thanks,
> richard
>
> Here is my OS info:
> Linux version 2.6.35-28-generic (buildd_at_allspice) (gcc version 4.4.5
> (Ubuntu/Linaro 4.4.4-14ubuntu5) ) #50-Ubuntu SMP Fri Mar 18 18:42:20
> UTC 2011
> x86_64
>
> ROOT info:
> ROOT 5.18/00b (branches/v5-18-00-patches_at_22563, Apr 06 2010, 02:11:00
> on linuxx8664gcc)
> CINT/ROOT C/C++ Interpreter version 5.16.29, Jan 08, 2008
>
>
> ~/Desktop/PS08$ root -l
> TDR Style initialized
> TDR Style initialized
> root [0] TRandom3::Rndm()
>
> *** Break *** segmentation violation
> Attaching to program: /proc/3915/exe, process 3915
> Could not attach to process. If your uid matches the uid of the target
> process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
> again as the root user. For more details, see
> /etc/sysctl.d/10-ptrace.conf
> ptrace: Operation not permitted.
> /home/richard/Desktop/PS08/3915: No such file or directory.
> error detected on stdin
> Root >
> root [1]
> root [1] .q
> ~/Desktop/PS08$ root -l
> TDR Style initialized
> TDR Style initialized
> root [0] TRandom2::Rndm()
>
> *** Break *** segmentation violation
> Attaching to program: /proc/4126/exe, process 4126
> Could not attach to process. If your uid matches the uid of the target
> process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
> again as the root user. For more details, see
> /etc/sysctl.d/10-ptrace.conf
> ptrace: Operation not permitted.
> /home/richard/Desktop/PS08/4126: No such file or directory.
> error detected on stdin
> Root >
> root [1] .q
>
Received on Wed Apr 13 2011 - 07:09:16 CEST

This archive was generated by hypermail 2.2.0 : Wed Apr 13 2011 - 11:50:01 CEST