# Illegal pointer to class object back 0x0 165

**URL:** <https://root-forum.cern.ch/t/illegal-pointer-to-class-object-back-0x0-165/21084>\
**Category:** ROOT\
**Created:** [May 4, 2016, 7:13am UTC](https://root-forum.cern.ch/t/illegal-pointer-to-class-object-back-0x0-165/21084 "2016-05-04T07:13:30Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![Pepe\_Le\_Pew](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pepe_le_pew/32/12365_2.png) [@Pepe\_Le\_Pew](https://root-forum.cern.ch/u/Pepe_Le_Pew)\
**Post date:** [May 11, 2016, 6:58am UTC](https://root-forum.cern.ch/t/illegal-pointer-to-class-object-back-0x0-165/21084/17 "2016-05-11T06:58:59Z")

</div>

Your “Mau AF11225\_5x20x20.TKA” and “Khongbia.TKA” data files are also needed in order to run your macro.

The first problem that I see is that you have:  
const int n = 2000000;  
Double\_t y1[n],y[n];  
and this uses more than 30MB on “stack” (quite often, the “stack” is limited to something like 8MB).  
See, for example: [No error when macro crashes](https://root-forum.cern.ch/t/no-error-when-macro-crashes/14931/2)

You also try to create two TFile objects with names which end with “.pdf” (which suggests “Adobe PDF” files, not ROOT files).

Notes:

1. Always try to precompile your macro using ACLiC, in order to find source code problems, e.g. try something like (inspect all reported warnings and errors):  
root [0] .L YourRootMacro.cxx++
2. You can “debug” many problems using “valgrind”. See, for example: [Segmentation Fault depending on linux distribution](https://root-forum.cern.ch/t/segmentation-fault-depending-on-linux-distribution/18020/6)

---

_[View the full topic](https://root-forum.cern.ch/t/illegal-pointer-to-class-object-back-0x0-165/21084)._
