I encountered this warning many times while running a program with ROOT library, but I don’t know how to locate the problematic code, how should I debug to find the problem?
Warning in <TBufferFile::WriteObjectAny>: An object of type 13TStreamerInfo (from type_info) passed through a TObject pointer was truncated (due a missing dictionary)!!!
Warning in <TBufferFile::WriteObjectAny>: An object of type 13TStreamerInfo (from type_info) passed through a TObject pointer was truncated (due a missing dictionary)!!!
Warning in <TBufferFile::WriteObjectAny>: An object of type 13TStreamerInfo (from type_info) passed through a TObject pointer was truncated (due a missing dictionary)!!!
Warning in <TBufferFile::WriteObjectAny>: An object of type 13TStreamerInfo (from type_info) passed through a TObject pointer was truncated (due a missing dictionary)!!!
......
ROOT Version: 6.24.02 Platform: linux Compiler: gcc 11.5.0-5
This message is very surprising as it claims that ROOT does not know about one of its internal classes (TStreamerInfo). The two main potential causes are either:
An inconsistent build, where 2 version of ROOT are being used to build part of the libraries (for example, if you upgraded ROOT but did not rebuild your own code).
Some sort of memory corruption that cripple the ROOT meta data store. For this consider running the failing example with `valgrind –suppressions=$ROOTSYS/etc/valgrind-root.supp…
Thank you for the answer, I tried to rebuild the entire program, but these warnings still exist. And then I ran the valgrind as you suggested with root option, but no special output I got…here is the output file:
Error in <TList::Clear>: A list is accessing an object (0xc6fc9d20) already deleted (list name = TList)
You can either
Download the tip of the v6-24-00-patches branch and build that version of ROOT
or
Disable the new behavior when writing the files, by to calling file->SetBit(TFile::k630forwardCompatibility);. Alternatively The rootrc key TFile.v630forwardCompatibility can be used to change the default to have the bit set for all TFiles
You should fix this before moving on.
The next observation is that the error message:
```
Warning in TBufferFile::WriteObjectAny: An object of type 13TStreamerInfo (from type_info) passed through a TObject pointer was truncated (due a missing dictionary)!!!
```
is happening at the end of the process. So this begs the questions on whether the TFile are all properly written and closed (the TFile object being deleted) before the end of main.