Error when running macro for a second time

Hello,

I am very new to ROOT so apologies if anything I say is incorrect or my issue is very obvious!

Until recently, my code would run fine. However earlier today, without seeming to edit anything, I encountered an issue where running my code once works perfectly fine, however any subsequent time it is ran (without closing ROOT) I get the following error:

IncrementalExecutor::executeFunction: symbol '_ZSt34__uninitialized_move_if_noexcept_aIPiS0_SaIiEET0_T_S3_S2_RT1_' unresolved while linking [cling interface function]!
You are probably missing the definition of int* std::__uninitialized_move_if_noexcept_a<int*, int*, std::allocator<int> >(int*, int*, int*, std::allocator<int>&)
Maybe you need to load the corresponding shared library?

Does anyone have any idea what may have caused this?

This is maybe related to ROOT-7393. Maybe @Axel can give more details.

1 Like

Hi,

Indeed, very likely! Can you give the shortest version of your script that I can run that exhibits the same problem?

Axel.

Certainly, here is my code: (I’m fairly new to coding and very new to ROOT so I apologise for how awful I’m sure this will look to you!)

include fstream
include iostream
include cmath
include string
include vector
include sstream
include TH3F.h
include TCanvas.h
include TH2F.h
include vector
include TH1F.h
include TMinuit.h
include TF1.h
include TROOT.h
include THistPainter.h
include TColor.h
include math.h
include TF2.h
include stdio.h
include stdlib.h
include cstdarg

//Perl_all_data.txt taken from the HiSPARC project (http://www.hisparc.nl/en/hisparc-data/)
//Detectors: 501 - Nikhef 

using namespace std;

void Sample_Analysis() {

  //////////////////////////////////////////////////////////////////////////////
  //Loads the sample period text file to allow the data to be read (PROCESS 1)//
  //////////////////////////////////////////////////////////////////////////////

  //Sample period chosen is 10 days either side of 5/5/15, date of X2.7 class solar flare

  cout<< endl;
  cout<< "====================="<<endl;
  cout<< "Detector 501 - Nikhef"<<endl;
  cout<< "====================="<<endl<<endl;;
  
  vector Int_t day1;
  vector Int_t month1;
  vector Int_t year1;
  vector Int_t hour1;
  vector Int_t count1;
  vector Int_t dayCount1;
  Float_t  a;
  Float_t b;
  Char_t c;

  
  
  ifstream in1("/home/user86/Documents/HiSPARC/Solar_Flare_Analysis/May_2015/Perl_Data/Perl_all_data.txt"); 
  cout<<"Attempting to read text file..." << endl;

   if (in1.is_open()){
     
     cout<<"File successfully opened"<<endl;

   }
     
   else {

     cout<<"File not found!!!"<<endl<<endl;
     return 0;

   }

   //Take the data from the text file and place it into vectors (process 1)
  
    for(Int_t i=0; !in1.eof(); i++){
      in1 >> a;
      day1.push_back(a);
      in1 >> a;
      b = fabs(a); //Removes negative sign from the perl script formating
      month1.push_back(b);
      in1 >> a;
      b = fabs(a);
      year1.push_back(b);
      in1 >> c;  //Removes comma between different information
      in1 >> a;
      hour1.push_back(a);
      in1 >> c;
      in1 >> a;
      count1.push_back(a);

   }
}

Hope this helps!

Thanks, but: can you attach the file? There seem to be some weird character losses (#, <, >) in your copy&paste operation…

Certainly, here you go

Sample_Analysis.C (15.2 KB)

I have commented out some code to show the small section producing this error.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

Excellent, thanks for sharing that file. I’ve submitted it at https://sft.its.cern.ch/jira/browse/ROOT-9014