Error: Symbol G__exception

Hi,

I’m facing following Errors while compilling my code, and finaly it stopes.
Could anyone suggest what may be the possible errors in my code ?

Error: Symbol #include is not defined in current scope hij_AuAu200.C:325:
Error: Symbol exception is not defined in current scope hij_AuAu200.C:325:
Syntax Error: #include hij_AuAu200.C:325:
Error: Symbol G__exception is not defined in current scope hij_AuAu200.C:325:
Error: type G__exception not defined FILE:/pool01/nihar/HIJING@/Auau200gev/MOMENTS/./hij_AuAu200.C LINE:325
*** Interpreter error recovered ***

Thanking you in Advance,

Hi,

This only indicates that you code has thrown an exception, we do not know which one nor from where.

You might be able to improve the output by issuing:

#include

on the command prompt before executing your code.
Alternative your can run ‘gdb root.exe’ and ask gdb to catch the throws (literaly by issuing at the gdb prompt: catch throw )

Cheers,
Philippe.

Hi…Philippe,

Thankx for your reply,

I used #include in my code,
But it gives Following.

root [0] .L hij_AuAu200.C
Warning in TClass::TClass: no dictionary for class exception is available
root [1]

in your ulternate suggetion, regarding gdb .
i’m in try to use gdb.
Please, suggest little more on it abt usage.

Thankx again.[/b]

Hi,

before runnign your script, please type “.exception”. That should show you where the problem is.

Cheers, Axel.

hi,Axel…

Thankx for your reply.

it shows Following , but it doesn’t disply where the problem is ?

root [3] .exceptiom
G__catchexception=1

Please, suggest.

regards,

Hi Nihar,

You ought to actually run your code to see the problem:root [0] .exception root [1] .L hij_AuAu200.C root [2] hij_AuAu200();

To use gdb do:[code]gdb root.exe

catch throw
run
root [0] .exception
root [1] .L hij_AuAu200.C
root [2] hij_AuAu200();[/code]

Cheers,
Philippe.

Hi,

i hav done following way and finally i got

root [0] .exception
G__catchexception=0
root [1] .L hij_AuAu200.C
Detaching after fork from child process 29050.
root [2] hij_AuAu200 t;
root [3] t.Loop();
Processing event: 199
Processing event: 399
Processing event: 599
Processing event: 799
Processing event: 999
Processing event: 1199
Processing event: 1399
Processing event: 1599
Processing event: 1799
Processing event: 1999
Processing event: 2199
Processing event: 2399
Processing event: 2599
Processing event: 2799
Processing event: 2999
Processing event: 3199
Processing event: 3399
Processing event: 3599
Processing event: 3799
terminate called after throwing an instance of 'std::bad_alloc’
what(): St9bad_alloc

Program received signal SIGABRT, Aborted.
[Switching to Thread -1208248640 (LWP 29047)]
0x008787a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
(gdb)

I can’t Follow what is wrong.
Plz, suggest something…

regards

Hi Nihar,

To get a bit more information you can try:[code]root [0] .exception
G__catchexception=0
root [1] .L hij_AuAu200.C+
root [2] hij_AuAu200 t;
root [3] t.Loop();

Processing event: 3799
terminate called after throwing an instance of 'std::bad_alloc’
what(): St9bad_alloc

Program received signal SIGABRT, Aborted.
[Switching to Thread -1208248640 (LWP 29047)]
0x008787a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
(gdb) where
…[/code]

[quote]terminate called after throwing an instance of 'std::bad_alloc’
what(): St9bad_alloc [/quote]We now know it is a memory (allocation) problem. For this kind of problem a tool called valgrind usually get the best information (see valgrind.org) and use valgrind root.exe -b -l root [0] .exception root [1] .L hij_AuAu200.C+ root [2] hij_AuAu200 t; root [3] t.Loop(); Cheers,Philippe

great !, my code is now running successfully.

Thankx, Phillippe ,Axel & All…

Best regards,

Hi,

For the record, what was the problem, how did you fix it?

Cheers,
Philippe.

hi,Philippe

basically, I used ur suggestion, follows like

[nihar@node009 ]$ valgrind root.exe -b -l
==11909== Memcheck, a memory error detector.
==11909== Copyright © 2002-2005, and GNU GPL’d, by Julian Seward et al.
==11909== Using LibVEX rev 1575, a library for dynamic binary translation.
==11909== Copyright © 2004-2005, and GNU GPL’d, by OpenWorks LLP.
==11909== Using valgrind-3.1.1, a dynamic binary instrumentation framework.
==11909== Copyright © 2000-2005, and GNU GPL’d, by Julian Seward et al.
==11909== For more details, rerun with: -v
==11909==
root [0] .exception
G__catchexception=0
root [1] .L hij_AuAu200.C
root [2] hij_AuAu200 t;
root [3] t.Loop();
Internal Error: malloc failed for dataQprot7[10000000] hij_AuAu200.C:272:
*** Fatal error in interpreter… restarting interpreter ***
*** Fatal error in interpreter… restarting interpreter ***
root [4]

So, i felt that there may be problems in my root file(that contain tree ) or dataQprot7[10000000] in script file (_.C)

so i removed first two-three root files(that r in chain).

now, it’s executing.

regards,

Hi,Philippe & Axel

please, suggest ur opinion regarding this.
May be i’m wrong for correcting the code, but code is running ?

regards,

Hi Nihar,

Do you really need an array with 10 millions elements? The problem seems to be that you might be really running out of memory.

Cheers,
Philippe.

hi,Philippe

Now, i’m working with about 1 million events.
so, i need that amount of dimension of the variable.

Do you thing, that problem was due to very big array ?
if yes, how could i get ride to it for 1million array size ?

plz, suggest ?

regards,

Hi,

Yes, I think it could have been a problem with the memory and how you handled/managed it …

[quote]how could i get ride to it for 1million array size ?[/quote]It all depends on what you are trying to do with all those values, if you just want to histogram them, then you do not need to keep them all in memory, just accumulate directly into the histogram …

Cheers,
Philippe.

Hi…

let me check one things,
if i use all root files(that i hav removed in chain)
& decreasing dim. array dataQprot7[10000000] to dataQprot7[1000000] ,

what will happen ?
i’ll replay soon…

regards

hi,philippe…

you r wright…
Now, It is running evenif i use all root files.
Thankx again, for it.

But, i have a qurrey, when i need bigger dim. array for large statictics for my calculation.
Then, what should i do ?

regards, :slight_smile:

Hi,

Possibly use float *arr = new float[10000000];

Philippe.

hi…Philippe

Thankx, For your suggestion.

regards,