Double free or corruption - on quit

Dear experts,

I am experiencing a crash after ROOT exits. Using ROOT 5.26/00d (tags/v5-26-00d@34963, Aug 24 2010, 13:30:22 on linux)

The error message is:

Looks like it should be a pointer problem? I have tried using valgrind, but also tried with running in debug mode gDebug = 1, but have not succeeded in tracking down the problem.

I have made a minimal version of the various classes I am using and it can all be found:
tid.uio.no/~maikenp/pages/forsup … alysis.tgz

a test root file and all that is needed is inside the tar file.

just unpack and run like this:

 root -l -q runD3PDSelector_mynew.C  

I also attach the full crash-report and the output when running with the debugger.

I would greatly appreciate some help in understanding this problem, as I have not been able to solve it myself.

Kind regards
Maiken
output.txt (103 KB)
crashreport.txt (32.6 KB)

Hi,

I see that the tasks it a bit too unclear or even not suited for this forum, and that is possibly why no one has yet answered. But I think I have solved the problem.

I have some global variables defined in MyGlobalVariables.h

vector<int> gstatus_cosmicMu;
vector<int> gstatus_tightEl;
vector<int> gstatus_isoEl;

In MyNewSelector.C I initialize these in the method Process() (which is in the TSelector event-loop, and in Process I call the function InitiEvtWiseVars()) There I do

gstatus_cosmicMu.clear();
gstatus_cosmicMu.assign(mu_staco_n,0);
 gstatus_tightEl.clear();
 gstatus_tightEl.assign(el_n,0);
 gstatus_isoEl.clear();
 gstatus_isoEl.assign(el_n,1);

If I comment out the assign statement I do not experience the crash at the end anymore. I have not completely understood why, but that I will figure out later I am sure.

Thanks to those who had a look anyway!

Maiken