My program crashes, probably an object ownership issue

Dear Root Experts,

Basically my code crashes at a part which can be simplified as
TFile * out = new TFile(“somename”, “recreate”);
TH1F * h = new TH1F(“htemp”, “my temp”, 100, 0, 1);
h->Write(); // crashes here!!

The crash occurs only when I add a certain library to the Makefile.
That library is added only in Makefile, not a single function from
that library is called in my code.
(I learned from Axel Naumann that this might imply an object ownership issue.)

I am attaching a text file which simply shows the output of running
gdb on the core file generated from the crash.
My best conclusion from the gdb message is that

  1. it creats a key and
  2. follows a seemingly wrong path thereafter and
  3. eventually ends up calling “delete” on a null pointer or so…

If anyone can guess what might have causeed this problem
or can translate the message into a bit easier one,
it will be very helpful to me…

Thanks very much.

D0, Fermilab
coretxt.txt (3.42 KB)