Segfault while reading tree

Hi all,

I’m getting a strange segfault while reading a TTree in v5.22.
I’m adding pointers to STL vectors in the tree branches, but then when I try to read them, I get a segfault.
The shortest possible script is attached along with the file I’m using.

.x shortjpsi.c++ will generate a segfault.
If I remove any one of the vector* lines, the code runs well.

What am I doing wrong?

FillGenNtuple.root (282 KB)
shortjpsi.c (1.42 KB)

Found it. The vectors were not initialized.