Seg fault when accessing std::vector elements in event loop

Check the structure of your tree (branches) using something like: wk()->tree()>Print();

If you don’t know how to deal with your tree, see how various flavours of automatically generated “analysis skeletons” deal with it.