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

**URL:** <https://root-forum.cern.ch/t/macro-stopped-without-error-when-looping-over-large-number-of-files-events-using-tchain/34707>\
**Category:** ROOT\
**Tags:** tree\
**Created:** [June 19, 2019, 8:05pm UTC](https://root-forum.cern.ch/t/macro-stopped-without-error-when-looping-over-large-number-of-files-events-using-tchain/34707 "2019-06-19T20:05:17Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [June 20, 2019, 2:16pm UTC](https://root-forum.cern.ch/t/macro-stopped-without-error-when-looping-over-large-number-of-files-events-using-tchain/34707/2 "2019-06-20T14:16:03Z")

</div>

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](https://root-forum.cern.ch/t/valgrind-and-root/28506)

---

_[View the full topic](https://root-forum.cern.ch/t/macro-stopped-without-error-when-looping-over-large-number-of-files-events-using-tchain/34707)._
