Check how much RAM you are trying to allocate (if “p” is big …).
For a single TH1F histogram, if p = nentries = 1.9845e+6 then there should be no problem (the amount of RAM used by such a TH1F would be something like 8 MB without “Sumw2” and something like 24 MB with “Sumw2”).
I must edit my post. The error only occurs when I want to draw the hist, writing isn’t a problem. But when I want to open the hist with the root browser nothing happens.
Methods like “inspect” works fine, all written entries are shown correctly. When I click on “draw panel” or any other method which would show me the hist, root crashes.
So, I tried my above macro with p = nentries = 1.9845e+7 and I get no problems (ROOT v5-34-19 / Linux x86_64 gcc 4.8.2).
Try to check:
[bash]$ ulimit -S -a
[bash]$ ulimit -H -a
[tcsh]$ limit
[tcsh]$ limit -h
and make sure that you do not exceed any limits (e.g. try to increase the “stack size” soft limit).