Macro stopped without error when looping over large number of files/events using TChain

That’s often an issue with either running out of memory or invalid memory accesses. The former you can check by looking at your machine’s memory usage / free memory. For the latter you can use valgrind, see Valgrind and ROOT