root-project / root

The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
https://root.cern
Other
2.71k stars 1.29k forks source link

Unnecessary (?) warnings reading `unique_ptr` #9188

Open Axel-Naumann opened 3 years ago

Axel-Naumann commented 3 years ago

From https://root-forum.cern.ch/t/segmentation-error-when-i-try-to-draw-a-histogram/47392

Opening https://root-forum.cern.ch/uploads/short-url/vue07kduqCLe9dhZ3MGW8pLWja0.root shows

root [0] 
Attaching file file05.root as _file0...
Warning in <TStreamerInfo::Build>: unique_ptr<TH1F,default_delete<TH1F> >: __uniq_ptr_data<TH1F,default_delete<TH1F>,true,true> has no streamer or dictionary, data member "_M_t" will not be saved
Warning in <TClass::Init>: no dictionary for class __compressed_pair<TH1F*,default_delete<TH1F> > is available
Warning in <TClass::Init>: no dictionary for class __compressed_pair_elem<TH1F*,0,false> is available
Warning in <TClass::Init>: no dictionary for class __compressed_pair_elem<default_delete<TH1F>,1,true> is available
(TFile *) 0x5617370bbe70

That's on Ubuntu 20.04.

linev commented 3 years ago

Here is content of the file (thanks to @bellenot one can now browse files from forum):

https://root.cern/js/latest/?file=https://root-forum.cern.ch/uploads/short-url/vue07kduqCLe9dhZ3MGW8pLWja0.root&item=StreamerInfo

Seems to be, not TH1F but std::unique_ptr<TH1F> was written into the file. Not sure if such usecase handled by I/O.

dpiparo commented 3 months ago

Can't reproduce. Probably fixed in the last few months.

linev commented 3 months ago

Issue is still there. Just do:

wget  https://root-forum.cern.ch/uploads/short-url/vue07kduqCLe9dhZ3MGW8pLWja0.root 
root vue07kduqCLe9dhZ3MGW8pLWja0.root