Running macro stops without any error message

Dear experts

I made a macro that when I run it ROOT will quit immediately without output any message, but I put a message output at the very start of my macro, why?

Here I attach my macro.
makeXTGraphs.cxx (27.9 KB)

Hello @Crisps,
I tried running your macro and it does emit the output for me.
Which version of ROOT are you using, on which platform and how are you calling the macro?

if(!f_ionization_std || f_ionization_std->IsZombie()) { // failed to open file

static bool boundaryMap[nShift][nx][ny] = {0}; // too big for the stack

Oh, that’s something I missed…after I make the static bool variable smaller it worked. But why there was no error message, even one warning tell “stack overflow”?

You do not need to make the variable “smaller”. It is sufficient to make it “static”.

1 Like

That’s just how it is on most systems, the stack size is limited be default and when ROOT reaches it it just stops.

If you want to make your code as it is, you can set the stack size to unlimited. Here is how to do this on Linux, for example:

ulimit -S -s unlimited